query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
actions that can be taken on the page
public void insertEmailAdress (String emailAdress) { getEmailFieldForLogin().clear(); getEmailFieldForLogin().sendKeys(emailAdress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HomePageActions() {\n\t\tPageFactory.initElements(driver,HomePageObjects.class);\n\t}", "public void actionOffered();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public Page addUiAction(RetailscmUserContext userContext, String pageId, String code, String icon, String title, int displayOrder, String brief, String imageUrl, String linkToUrl, String extraData , String [] tokensExpr) throws Exception;", "@Override\n \tpublic void addActions() {\n \t\t\n \t}", "@Override\n protected boolean executeAction(SUT system, State state, Action action){\n // adding the action that is going to be executed into HTML report:\n htmlReport.addSelectedAction(state.get(Tags.ScreenshotPath), action);\n return super.executeAction(system, state, action);\n }", "public void userAction(ElementInstance ei) {\r\n\t\t\r\n\t}", "@Override\n public String getActions() {\n\treturn \"\";\n }", "@Override\n\tpublic void action() {\n\n\t}", "public interface Actions {\n void initScreen();\n void getRevenues(String date, String accessToken);\n void requestWithdrawl(String accessToken, float amount);\n\n }", "public void includeAction(){\n actions.showActions();\n }", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "public interface Actions {\n void initScreen();\n void submitReview(String accessToken,\n String productID,\n String rating,\n String orderDID,\n String comment);\n }", "@Override\n\tpublic void performActions() throws IOException\n\t{\n\t\tSystem.out.println(\"these are the moviegoer actions\");\n\t\tboolean loggedIn = true;\n\t\twhile(loggedIn)\n\t\t{\n\t\t\tSystem.out.println(\"\\n=========== MovieGoer MENU ===========\");\n\t\t\tSystem.out.println(\"1: Rate a movie\");\n\t\t\tSystem.out.println(\"2: Display available movies in all Cineplexes\");\n\t\t\tSystem.out.println(\"3: Book a movie\");\n\t\t\tSystem.out.println(\"4: Retrieve booking history\");\n\t\t\tSystem.out.println(\"5: List movies ordered by sold tickets\");\n\t\t\tSystem.out.println(\"6: List movies by ratings\");\n\t\t\tSystem.out.println(\"8: Logout\");\n\t\t\tSystem.out.println(\"\\n=============================================\");\n\n\n\t\t\t\n\t\t\tint actionChoice = UserInputs.getValidIntegerInput();\n\t\t\t\n\t\t\tswitch(actionChoice)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\tgiveRating();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tpage.listMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.bookMovie();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tBooking.retrieveHistory(userLogedIn.getUsername());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tpage.listTicketOrderMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tpage.listRatingOrderMovies();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tloggedIn = false;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Please enter one of the valid options\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public ActionList getActions();", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "protected boolean validateActions(PDPage page, DocumentHandler handler,\n List<ValidationError> result) throws ValidationException {\n // ---- get AA (additional actions) entry if it is present\n List<AbstractActionManager> lActions = this.actionFact.getActions(page\n .getCOSDictionary(), handler.getDocument().getDocument());\n for (AbstractActionManager action : lActions) {\n if (!action.valid(true, result)) {\n return false;\n }\n }\n\n return true;\n }", "private String performTheAction(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tString servletPath = request.getServletPath();\r\n\t\tString action = getActionName(servletPath);\r\n\t\t// Let the logged in user run his chosen action\r\n\t\treturn Action.perform(action, request);\r\n\t}", "private void setActions(){\n login.setOnAction(e->login());\n simulate.setOnAction(e->simulate());\n scoreBoardButton.setOnAction(e->scoreBoard());\n viewBracket.setOnAction(e->viewBracket(selectedBracket, playerMap));\n clearButton.setOnAction(e->clear());\n resetButton.setOnAction(e->reset());\n finalizeButton.setOnAction(e->finalizeBracket());\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "HtmlPage clickLink();", "@Override\n protected Action preSelectAction(State state, Set<Action> actions){\n // adding available actions into the HTML report:\n htmlReport.addActions(actions);\n return(super.preSelectAction(state, actions));\n }", "public void action() {\n action.action();\n }", "public void executeAction( String actionInfo );", "public void performAction();", "public abstract void executeActionButton();", "public void action() {\n }", "void determineNextAction();", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public interface HasContextActions extends Page {\n\n List<Action> getContextActions();\n\n interface ContextActionListener {\n void onUpdate();\n }\n}", "protected void onClick() {\n for(Runnable action : onClick) action.run();\n }", "@Override\n\tpublic void preProcessAction(GwtEvent e) {\n\t\t\n\t}", "boolean hasHas_action();", "void doNextPlannedAction(ArrayList<WebElement> possibleTargets) {\n String action = futureTargets.pop();\n\n if (action.equals(composeWebviewBackMessage())) {pathFromStart.remove(pathFromStart.size()-1);}\n else if (isClickButton(action) && !isInput(possibleTargets.get(0))) {pathFromStart.add(action);}\n\n doAction(action, possibleTargets);\n }", "public void toSelectingAction() {\n }", "String[] getActions();", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "protected static void initializePageActions() throws Exception {\n\t\tloginPageAction = new LoginPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tcomplianceReportsPageAction = new ComplianceReportsPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tmanageLocationPageActions = new ManageLocationPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tsetReportsPage((ComplianceReportsPage)complianceReportsPageAction.getPageObject());\n\t}", "void showOthersActions(String message);", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "private void registerActions() {\n // File menu :\n new NewAction();\n new LoadOIFitsAction();\n new LoadFitsImageAction();\n\n new ExportOIFitsAction();\n new ExportFitsImageAction();\n\n // Edit menu :\n new DeleteSelectionAction();\n\n // Processing menu :\n new RunAction();\n new ResampleImageAction();\n\n // Interop menu :\n // Send OIFits (SAMP) :\n new SendOIFitsAction();\n // Send Fits (SAMP) :\n new SendFitsAction();\n }", "@Test(priority = 1)\n\tpublic void navigateToBulkUploadLandingPage() {\n\t\tlog.info(line);\n\t\tAssert.assertTrue(clickAllActionButton.navigateToBulkUploadLandingPage(),\n\t\t\t\t\"Bulk upload Landing page is displayed\");\n\t}", "public abstract void pageDisplayed();", "abstract public void performAction();", "public abstract Action getAction();", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "public void clickBulkActions() {\n btnBulkActions.click();\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public void updatePageAccessibilityActions() {\n int itemCount;\n ViewPager2 viewPager2 = ViewPager2.this;\n int i = 16908360;\n ViewCompat.removeAccessibilityAction(viewPager2, 16908360);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908361);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908358);\n ViewCompat.removeAccessibilityAction(viewPager2, 16908359);\n if (ViewPager2.this.getAdapter() != null && (itemCount = ViewPager2.this.getAdapter().getItemCount()) != 0 && ViewPager2.this.isUserInputEnabled()) {\n if (ViewPager2.this.getOrientation() == 0) {\n boolean isRtl = ViewPager2.this.isRtl();\n int i2 = isRtl ? 16908360 : 16908361;\n if (isRtl) {\n i = 16908361;\n }\n if (ViewPager2.this.mCurrentItem < itemCount - 1) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(i2, (CharSequence) null), (CharSequence) null, this.mActionPageForward);\n }\n if (ViewPager2.this.mCurrentItem > 0) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(i, (CharSequence) null), (CharSequence) null, this.mActionPageBackward);\n return;\n }\n return;\n }\n if (ViewPager2.this.mCurrentItem < itemCount - 1) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(16908359, (CharSequence) null), (CharSequence) null, this.mActionPageForward);\n }\n if (ViewPager2.this.mCurrentItem > 0) {\n ViewCompat.replaceAccessibilityAction(viewPager2, new AccessibilityNodeInfoCompat.AccessibilityActionCompat(16908358, (CharSequence) null), (CharSequence) null, this.mActionPageBackward);\n }\n }\n }", "protected Page click() throws IOException {\n\n if( isDisabled() == true ) {\n return getPage();\n }\n\n final String onClick = getOnClickAttribute();\n final HtmlPage page = getPage();\n if( onClick.length() == 0 || page.getWebClient().isJavaScriptEnabled() == false ) {\n return doClickAction();\n }\n else {\n final ScriptResult scriptResult = page.executeJavaScriptIfPossible(\n onClick, \"onClick handler for \"+getClass().getName(), true, this);\n scriptResult.getJavaScriptResult();\n return doClickAction();\n }\n }", "public void performAbility() { return; }", "public void checkActions() {\n\t\tfor (BaseAction ba : this.actions) {\n\t\t\tba.checkAction();\n\t\t}\n\t}", "@Override\r\n\tpublic void action() throws Exception {\n\t\tthis.pageAction();\r\n\t\t//when action finished \r\n\t\tInteger currentPageNumber = (Integer) context.get(\"currentPageNumber\");\r\n\t\tString currentPageContent = (String)context.get(\"currentPageContent\");\r\n\t if(currentPageNumber!=null){\r\n\t\t\tcontext.remove(currentPageNumber);\r\n\t\t}\r\n\t\tif(currentPageContent!=null){\r\n\t\t\tcontext.remove(currentPageContent);\r\n\t\t}\r\n\t\t//action end\r\n\t\t//after action remove the previous variables\r\n\t\t\r\n\t\tcontext.remove(\"pageUrlRegex\");\r\n\t\tcontext.remove(\"contentRegex\");\r\n\r\n\t\tcontext.remove(\"pageSize\");\r\n\r\n\t\tcontext.remove(\"totalRecorderNumber\");\r\n\t\tcontext.remove(\"currentFieldName\");\r\n\r\n\t}", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "public List<Action> getActions(){return actions;}", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "public void provideAccess() {\n\t\tint choice = View.NO_CHOICE;\n\t\twhile (choice != View.EXIT) {\n\t\t\tview.displayMenu();\n\t\t\tchoice = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\texecuteChoice(choice);\n\t\t}\n\t}", "public void doAction(){}", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "private void authorize() {\r\n\r\n\t}", "public static boolean isAddPagesAction(Context context, String info) {\n/* 986 */ if (context != null && !Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 988 */ JSONObject jsonObj = new JSONObject(info);\n/* 989 */ if (jsonObj.has(\"Action event\")) {\n/* 990 */ String action = jsonObj.getString(\"Action event\");\n/* 991 */ if (\"add_pages\".equals(action)) {\n/* 992 */ return true;\n/* */ }\n/* */ } \n/* 995 */ } catch (Exception e) {\n/* 996 */ if (!info.equals(\"state not found\")) {\n/* 997 */ AnalyticsHandlerAdapter.getInstance().sendException(e, \"info: \" + info);\n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* 1002 */ return false;\n/* */ }", "@Override\n public void doAction(User user) {\n }", "protected static void initializePageActions() throws Exception {\n\t\tloginPageAction = new LoginPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tmanageLocationPageAction = ActionBuilder.createManageLocationPageAction();\n\t\teqReportsPageAction = new EQReportsPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\teqReportsPage = (EQReportsPage)eqReportsPageAction.getPageObject();\n\t\tsetReportsPage(eqReportsPage);\n\t}", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }", "public interface Action {\r\n\r\n /**\r\n * Execute the Action based on http request and response\r\n *\r\n * @param req the request\r\n * @param res the response\r\n * @return the jsp page to redirect the user\r\n */\r\n String execute(HttpServletRequest req, HttpServletResponse res);\r\n}", "public int getAccessibleActionCount() {\n return 1;\n }", "public abstract void init_actions() throws Exception;", "public void goToPermissions(String action) {\n boolean allowed = false;\n if (selectedSubject instanceof Subject) {\n allowed = isAuthorized((Subject) selectedSubject, \"grant\".equals(action) ? Action.GRANT : Action.REVOKE);\n } else {\n allowed = isAuthorized((Role) selectedSubject, \"grant\".equals(action) ? Action.GRANT : Action.REVOKE);\n }\n if (!allowed) {\n return;\n }\n if (selectedSubject != null\n && (!selectedActions.isEmpty() || (!selectedCollectionActions.isEmpty() && isSelectedFields(selectedCarrierModel.getCollectionFields().values())))) {\n\n if (getTabEntity() instanceof Carrier) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, selectedCarrierModel, carriers);\n } else {\n if (getTabEntity() instanceof Party) {\n if (partyModel.getEntity().getId() != null) {\n List<RowModel> ret = new ArrayList<RowModel>();\n ret.add(new RowModel(partyModel.getEntity(), partyModel.isSelected(), \"Party-\" + ((Party) partyModel.getEntity()).getPartyField1() + \", \"\n + ((Party) partyModel.getEntity()).getPartyField2()));\n if (isSelected(ret)) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, partyModel, ret);\n } else {\n System.err.println(\"Select party\");\n }\n }\n } else {\n if (getTabEntity() instanceof Contact) {\n if (isSelected(contacts)) {\n goToObjectResourceManagement(action, (IdHolder<?>) selectedSubject, selectedActions, selectedCollectionActions, selectedContactModel, contacts);\n } else {\n System.err.println(\"Select contact\");\n }\n }\n }\n }\n }\n\n }", "@Test(priority=1)\n public void adminPage(){\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/nav/a[5]\")).click();\n\t}", "@Override\n\tpublic String[] getActions(EntityData entityData)\n\t{\n\t\treturn new String[] { \"attack\", \"punch\" };\n\t}", "public void checkOutFlight() {\n confirmationPage.checkButton();\n }", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "private void setActions() {\n\t\tfor (IContributionItem item : actionToolBarManager.getContributions()) {\n\t\t\tif (zoomInAction != null && zoomOutAction != null && zoomActualAction != null)\n\t\t\t\treturn;\n\t\t\tif (ZoomInAction.ID.equals(item.getId()) && item instanceof ActionContributionItem) {\n\t\t\t\tzoomInAction = (AReportAction) ((ActionContributionItem) item).getAction();\n\t\t\t} else if (ZoomOutAction.ID.equals(item.getId()) && item instanceof ActionContributionItem) {\n\t\t\t\tzoomOutAction = (AReportAction) ((ActionContributionItem) item).getAction();\n\t\t\t} else if (ZoomActualSizeAction.ID.equals(item.getId()) && item instanceof ActionContributionItem) {\n\t\t\t\tzoomActualAction = (AReportAction) ((ActionContributionItem) item).getAction();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void executeAction(int slot, InventoryClickEvent event)\n {\n if (slot == 45 && page > 1) {\n backPage();\n }\n if (slot == 53 && this.page < this.getPages(this.contents.size())) {\n forwardPage();\n }\n }", "public int getActionType();", "public void setAction(String action) { this.action = action; }", "public static boolean isEditPageAction(Context context, String info) {\n/* 1112 */ if (context != null && !Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 1114 */ JSONObject jsonObj = new JSONObject(info);\n/* 1115 */ if (jsonObj.has(\"Action event\")) {\n/* 1116 */ String action = jsonObj.getString(\"Action event\");\n/* 1117 */ if (\"add_pages\".equals(action) || \"delete_pages\"\n/* 1118 */ .equals(action) || \"rotate_pages\"\n/* 1119 */ .equals(action) || \"move_page\"\n/* 1120 */ .equals(action) || \"crop_pages\"\n/* 1121 */ .equals(action) || \"action\"\n/* 1122 */ .equals(action) || \"page_label_changed\"\n/* 1123 */ .equals(action)) {\n/* 1124 */ return true;\n/* */ }\n/* */ } \n/* 1127 */ } catch (Exception e) {\n/* 1128 */ if (!info.equals(\"state not found\")) {\n/* 1129 */ AnalyticsHandlerAdapter.getInstance().sendException(e, \"info: \" + info);\n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* 1134 */ return false;\n/* */ }", "public void clickDemandSideManagement();", "@Override\n\tpublic void checkPage() {\n\t}", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "protected Actions exec() {\n return actions;\n }", "public void clickAction() throws InterruptedException{\n\t\tThread.sleep(1000);\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"actionsbtn\"), \"Actions Button\");\n\t\tThread.sleep(1000);\n\t}" ]
[ "0.639501", "0.63477844", "0.63468784", "0.62124836", "0.62124836", "0.62124836", "0.61579454", "0.6138766", "0.61174995", "0.6112968", "0.6092786", "0.60770816", "0.60270184", "0.60264194", "0.60181427", "0.60154384", "0.60094166", "0.6002767", "0.5984432", "0.59646785", "0.5930645", "0.5920869", "0.59088165", "0.58988255", "0.58988255", "0.58863497", "0.5880318", "0.5875847", "0.58689886", "0.5864662", "0.58641106", "0.58636206", "0.58344454", "0.58291143", "0.582281", "0.58170396", "0.58170396", "0.58170396", "0.58170396", "0.58170396", "0.58170396", "0.58170396", "0.58170396", "0.57882303", "0.5763827", "0.57629645", "0.57414544", "0.5738807", "0.5735253", "0.5722485", "0.57150286", "0.5707231", "0.57034546", "0.5702538", "0.5702538", "0.5702538", "0.5702538", "0.5696912", "0.5677632", "0.5676166", "0.5672705", "0.56723505", "0.5659583", "0.5655919", "0.5651003", "0.5650787", "0.564009", "0.56400204", "0.56296855", "0.5628432", "0.56272453", "0.5626255", "0.5625173", "0.5622745", "0.5613734", "0.5606447", "0.5589106", "0.5584232", "0.55762374", "0.55713695", "0.55706275", "0.5558956", "0.5558077", "0.5551231", "0.5549485", "0.55431205", "0.5538164", "0.5525088", "0.55241257", "0.55235475", "0.55125004", "0.5505071", "0.5491924", "0.5487854", "0.5487506", "0.54831004", "0.5478172", "0.5478167", "0.54736894", "0.5472062", "0.54655695" ]
0.0
-1
verification that the login function wasn't successful
public String textFromErrorLoginMessage () { return getErrorLoginMessage().getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}", "boolean hasLoginResponse();", "private void checkValidLogin(String username, String password) {\r\n //The check username will check to see if a password was returned. That means the user\r\n //exists. If a void is returned, then the user does not exist.\r\n String actualPassword = checkUsername(username);\r\n\r\n //If a null was passed back, then the username does not exist. We signal the user.\r\n if (actualPassword == null) {\r\n signalInvalidUser();\r\n return;\r\n }\r\n\r\n //We check to see if the password that was type is equal to the 1 we got from the DB. If\r\n //not we signal the user.\r\n if (!checkPassword(password, actualPassword)){\r\n signalInvalidPassword();\r\n return;\r\n }\r\n\r\n //If everything worked, we go to the landing page.\r\n goToLandingPage();\r\n }", "boolean hasLogin();", "boolean hasLogin();", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "@Test(priority = 1)\n\tpublic void checkInvalidLogin() {\n\t\ttest = report.createTest(\"CheckInvalidLogin\");\n\t\t\n\t\tloginpage = loginpage.setLanguage(ChangeLanguageFields.ENGLISH);\n\t\ttest.log(Status.INFO, \"Set language\");\n\t\t\n\t\tloginpage = loginpage.unSuccessfullLogin(UserContainer.getInvalidData());\n\t\ttest.log(Status.INFO, \"Filled in invalid credentials and clicked 'Sig in'\");\n\t\t\n\t\tAssert.assertTrue(loginpage.getErrorMessage().getText().contains(\"Wrong login or password\"));\n\t\ttest.log(Status.PASS, \"Verified error message is correct\");\n\t}", "@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "@Test\r\n\tpublic void testLogin5() {\r\n\t\tassertFalse(t1.login(\"userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\", \"passssssssssssssssssssssssssssssssssssssssss\"));\r\n\t}", "private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }", "@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}", "@Test\n\tpublic void testLoginUser(){\n\t\t\n\t\tboolean passed = true;\n\t\t\n\t\ttry {\n\t\t\tps.loginUser(new UserLoginInput(\"Sam\", \"sam\"));\n\t\t} catch (ServerException e) {\n\t\t\te.printStackTrace();\n\t\t\tpassed = false;\n\t\t}\n\t\t\n\t\tassertTrue(passed);\n\t}", "public boolean loginUser();", "void successLogin();", "public abstract boolean isLoginRequired();", "@Test\r\n\tpublic void testLogin1() {\r\n\t\tassertFalse(t1.login(\"\", \"pass\"));\t\r\n\t}", "private boolean validateLogin() {\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n if (\"\".equals(userName)) {\n userText.setError(\"You must enter a username\");\n return false;\n }\n if (\"\".equals(userPass)) {\n passwordText.setError(\"You must enter a password\");\n return false;\n }\n return true;\n }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "public void verifyFalseLogin() {\n alertElement.waitForState().present(30);\n alertElement.assertContains().text(\"Please Enter a Valid User ID\");\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "boolean isLogin(String username, String password)\n {\n String endURL = \"login/\" + username + \"/\" + password;\n return (request(\"GET\", \"\", endURL).equals(\"SUCCESSFUL\"));\n }", "boolean hasLoginRequest();", "public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }", "boolean hasLoginapisuccessfulhitcount();", "void loginDone();", "private void loginSuccess(String uname) {\n }", "public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "boolean hasLoginapiavgrtt();", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "public void failedLogin(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"ID does not exist. \\n\"\n\t\t\t\t+ \"Enter your account ID: \\n\");\n\t}", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}", "@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }", "private boolean validLogin() {\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tif(principal.equals(IConstant.LOGIN_STATUS.ANONYMOUS_USER)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tUserDetails userDetails = (UserDetails) principal;\r\n\t\t\treturn userDetails.isAccountNonExpired() &&\r\n\t\t\t\t\tuserDetails.isAccountNonLocked() &&\r\n\t\t\t\t\tuserDetails.isCredentialsNonExpired() &&\r\n\t\t\t\t\tuserDetails.isEnabled();\r\n\t\t}\r\n\t}", "public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "private boolean SecuenciaValidacion() {\n String cuenta = jTextFieldUser.getText().trim();\n String contrasenia = new String(jPasswordFieldPswd.getPassword());\n\n JDialogSplash jDialogSplash = new JDialogSplash(this, ModalityType.APPLICATION_MODAL);\n jDialogSplash.setLocationRelativeTo(this);\n jDialogSplash.setVisible(true);\n\n if (cuenta.equals(id) && contrasenia.equals(pass)) {\n LOG.info(\"Logging successful\");\n return true;\n } else {\n LOG.info(\"Logging failed\");\n return false;\n }\n }", "public boolean hasLoginAdvice();", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "private void loginError(HttpServletRequest _req, HttpServletResponse _res)\n throws IOException, ServletException {\n\n session.setAttribute(\"validUser\", \"n\");\n session.setAttribute(\"loginError\", \"y\");\n gotoPage(\"/ch5/login.jsp\", _req, _res);\n\n }", "private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}", "@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }", "public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }", "private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }", "@Override\n public void check() {\n if(StringUtils.isBlank(username)||StringUtils.isBlank(password)){\n logger.error(\"登陆失败!\");\n throw new InyuException(ExceptionEnum.INVALID_PARAM.getIndex(),\"用户名或密码为空!\");\n }\n }", "private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}", "private void checkRep(){\n assert !this.username.equals(\"\");\n assert !this.password.equals(\"\");\n assert accessLevel != null;\n }", "public static boolean login() {\n\t\t// DB\n\t\tString[] usr = { \"NICOLAS\", \"CELESTE\" };\n\t\tString[] pass = { \"cerveza\", \"fernet\" };\n\t\tString usrAuth = \"\";\n\t\tboolean auth = false;\n\t\tint intentos = 1;\n\n\t\tdo {\n\t\t\tJTextField usuario = new JTextField();\n\t\t\tJTextField password = new JPasswordField();\n\t\t\tObject[] ingresarUsuarioPassword = { \"Usuario: \", usuario, \"Password\", password };\n\t\t\tint ingresarLogin = JOptionPane.showConfirmDialog(null, ingresarUsuarioPassword,\n\t\t\t\t\t\"Ingrese credenciales de usuario\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif (ingresarLogin == JOptionPane.OK_OPTION) {\n\t\t\t\t// Busca el usuario en un bucle For\n\t\t\t\tfor (int i = 0; i < usr.length; i++) {\n\t\t\t\t\t// Si encuentra el usuario, verifica si el usuario y la contraseña coinciden\n\t\t\t\t\tif (usr[i].equals(usuario.getText().toUpperCase()) && pass[i].equals(password.getText())) {\n\t\t\t\t\t\tusrAuth = usr[i];\n\t\t\t\t\t\tauth = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no coincide, muestra los intentos restantes y vuelve a pedir credenciales\n\t\t\t\tif (!auth) {\n\t\t\t\t\tif (intentos < 3) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + (3 - intentos) + \" Intentos restantes\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + \"Se supero en numero de intentos\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Cierra si no se selecciona OK\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!auth & (intentos <= 3));\n\t\t// Si autentica, muestra mensaje de bienvenida\n\t\tif (auth)\n\t\t\tJOptionPane.showMessageDialog(null, \"Bienvenido \" + usrAuth, \"Bienvenido\", JOptionPane.INFORMATION_MESSAGE);\n\t\treturn auth;\n\t}", "public boolean checkLoginCredential(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd())},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public int checkLogin(Account formAccount) {\n Account account = getAccountByAccountNo(formAccount.getAccountNo());\n //return 1 if account not found\n if (account == null) {\n return 1;\n } else if (account.getLocked() == 1) {\n return 3; // return 3 if account is locked\n } else if (account.getPin() != formAccount.getPin()) {\n if (account.getIncorrectAttempts() < 2) {\n account.setIncorrectAttempts(account.getIncorrectAttempts() + 1);\n saveOrUpdate(account);\n return 2; //return 2 if incorrect pin but account is not locked yet\n } else {\n account.setIncorrectAttempts(account.getIncorrectAttempts() + 1);\n account.setLocked(1);\n saveOrUpdate(account);\n return 3; //lock account on 3rd incorrect attempt and return 3\n }\n\n } else {\n return 0; // return 0 if login successful\n }\n\n }", "@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }", "private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }", "public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }", "@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}", "private int logIn()\r\n\t{\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tint index;\r\n\t\t\r\n\t\t//prompt user for username and password\r\n\t\tSystem.out.println(\"Enter your username\");\r\n\t\tusername = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your password\");\r\n\t\tpassword = input.nextLine();\r\n\t\t\r\n\t\tindex = checkUserExists(username);\t\t\t\t\t\t\t\t\t//get the index of the username so we can find the password\r\n\t\tif (index == -1 || !userAccounts[1][index].equals(password))\t\t//username or password is incorrect\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nIncorrect Username/Password\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tSystem.out.println(\"Login Successful\");\r\n\t\treturn 1;\r\n\t}", "@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "boolean verificarLogin(FichaDocente regDcnt);", "@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login 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 showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }", "public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}", "@Test\n public void testLogin1() {\n System.out.println(\"login method tests empty string user input\");\n String accNo = \"\";\n String pinNo = \"\";\n assertEquals(\"Invalid entries should return false\",false, Account.login(accNo, pinNo));\n }", "RequestResult loginRequest() throws Exception;", "public boolean validateUserCredentials(String login, String password) throws SQLException;", "private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }", "void loginAttempt(String email, String password);", "@Override\n\tpublic int checkLogin(User user) {\n\t\tint msg=0;\n\t\ttry{\n\t\t\tUser user2=uDao.loginUser(user.getUsername().toString());\n\t\t\tString pwd=getEncodTool.decodeHexTest(user2.getPassword());\n\t\t\tif(pwd.equals(user.getPassword())){\n\t\t\tmsg=1;\n\t\t\t}else{\n\t\t\t\tmsg=3;\t\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tmsg=2;\n\t\t}\t\n\t\treturn msg;\n\t}", "@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }", "public boolean logIn() { // boolean need to check \"exit\"\n System.out.println();\n System.out.println(\"Enter your card number:\");\n String tryNum = s.nextLine();\n if (tryNum.equals(\"\")) {\n tryNum = s.nextLine();\n }\n System.out.println(\"Enter your PIN:\");\n String tryPin = s.nextLine();\n if (data.selectNum(tryNum) && data.selectPin(tryNum).equals(tryPin)) { //check contain cardNum in DB and correct pin for this cardNum\n this.cardNum = tryNum;\n this.pin = tryPin;\n this.balance = data.selectBalance(cardNum);\n System.out.println();\n System.out.println(\"You have successfully logged in!\");\n return operaion();\n } else {\n System.out.println(\"Wrong card number or PIN!\");\n return false;\n }\n }", "public boolean login() throws LoginException\n {\n System.out.println(\"*** Logging in user ***\");\n System.out.println(\"isIdentityAssertion = \" + isIdentityAssertion);\n // only called (once!) after initialize\n\n // loginSucceeded should be false\n // principalsInSubject should be false\n\n // Call a method to get the callbacks.\n // For authentication, it will have one for the\n // username and one for the password.\n Callback[] callbacks = getCallbacks();\n\n // Get the user name.\n String userName = getUserName(callbacks);\n\n if (userName.length() > 0) {\n // We have a user name\n\n\n // Get the password for this login attempt\n // and make sure it matches the password for the user.\n try {\n if (isIdentityAssertion == false) {\n String passwordWant = null;\n try {\n database.openConnection();\n passwordWant = database.getUserPassword(userName);\n } catch (Exception e) {\n String errMsg = \"Authentication Failed: \"+e.getMessage();\n throwFailedLoginException(errMsg);\n }\n\n String passwordHave = getPasswordHave(userName, callbacks);\n if (passwordWant == null || !passwordWant.equals(passwordHave)) {\n String errMsg = \"Authentication Failed: User \"+userName +\n \" bad password or User \"+userName+\" doesn't exist.\";\n throwFailedLoginException(errMsg);\n }\n } else {\n try {\n database.openConnection();\n if (!database.validateUserExists(userName)) {\n String errMsg = \"Authentication Failed: user does not exist\";\n throwFailedLoginException(errMsg);\n }\n } catch (Exception e) {\n String errMsg = \"Authentication Failed: \"+e.getMessage();\n throwFailedLoginException(errMsg);\n }\n }\n loginSucceeded = true;\n\n // since the login succeeded, add the user and its groups to the\n // list of principals we want to add to the subject.\n principalsForSubject.add(new WLSUserImpl(userName));\n\n addGroupsForSubject(userName);\n } finally {\n // Close database connection after all processing is done.\n database.closeConnection();\n }\n }\n\n return loginSucceeded;\n }", "@Test\n public void wrongPassword() {\n assertEquals(false, testBase.signIn(\"testName\", \"false\"));\n }", "private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }", "public void loginStatus(Boolean success) {\n if (success.equals(true))\n System.out.println(\"Login Successful\");\n else {\n System.out.println(\"Login Failed -> Username or password may be incorrect\");\n }\n }", "private boolean verifyCredentials() {\n\n boolean bCredentialsValid = false;\n strUserMailID = strUserName = \"\";\n\n // Get the account information, if existing\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accInfo = dbHandler.getAccountInfo(m_tfUserEmailID.getText().toString());\n\n if(accInfo != null) {\n\n // Compute the hash for the user entered password\n OperationsHelper helper = new OperationsHelper();\n String strHashPwd = helper.getHashedPassword(m_tfUserPassword.getText().toString(), accInfo.getSaltValue());\n if(strHashPwd.equals(accInfo.getPassword())) {\n\n bCredentialsValid = true;\n strUserMailID = accInfo.getEmail();\n strUserName = accInfo.getName();\n\n // If Always login option is checked, update the value in the database\n if( ! (m_cbAutoLogon.isChecked() == accInfo.getIfAlwaysSignIn()) ) {\n\n accInfo.setAlwaysSignIn(m_cbAutoLogon.isChecked());\n dbHandler.updateAlwaysSignOnOption(accInfo);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Incorrect Password\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(getApplicationContext(), \"No such account exists. \\n\" +\n \" Create one to login\", Toast.LENGTH_LONG).show();\n }\n\n return bCredentialsValid;\n }", "boolean isLoginAvailable();", "@Order(1)\n\t@Test\n\tpublic void Attempt_LoginSuccess() throws AuthException\n\t{\n\t\t//Test to make certain we login correctly.\n\t\tString user = \"null\", pass = \"andVoid\";\n\t\tboolean expected = true, actual = as.authenticateUser(user, pass);\n\t\tassertEquals(expected,actual,\"This is the correct login credentials for the System Admin\");\n\t}", "@Test\n public void authenticateTestFailure2() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, \"other_token\");\n assertFalse(device.authenticate());\n DatabaseTest.cleanDatabase();\n }", "private boolean checkLogin() {\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = firebaseAuth.getCurrentUser();\n if(currentUser == null) {\n //show login activity\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n return false;\n } else {\n verifyUserPII(currentUser);\n return true;\n }\n }", "@Test\n public void test5() {\n userFury.login(\"45ab\");\n assertFalse(userFury.getLoggedIn());\n }", "@Override\n\tprotected boolean onLoginFailure(AuthenticationToken token,\n\t\t\tAuthenticationException ae, ServletRequest request,\n\t\t\tServletResponse response) {\n\t\t// is user authenticated or in remember me mode ?\n\t\tSubject subject = getSubject(request, response);\n\t\tif (subject.isAuthenticated() || subject.isRemembered()) {\n\t\t\ttry {\n\t\t\t\tissueSuccessRedirect(request, response);\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"Cannot redirect to the default success url\", e);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tWebUtils.issueRedirect(request, response, failureUrl);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.error(\"Cannot redirect to failure url : {}\", failureUrl,\n\t\t\t\t\t\te);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean authNeeded();", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private boolean attemptRegistration() {\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String name = mFullName.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String confPassword = mPasswordConf.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(!TextUtils.isEmpty(confPassword) && !password.equals(confPassword)){\n mPasswordConf.setError(\"The passwords do not match\");\n focusView = mPasswordConf;\n cancel = true;\n }\n\n if(TextUtils.isEmpty(name)){\n mFullName.setError(getString(R.string.error_field_required));\n focusView = mFullName;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n return !cancel;\n }", "@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }", "protected void login() {\n\t\t\r\n\t}", "@Override\n\tprotected boolean checkLogin(String loginResult,HttpClient client,String user, String password, int tryCount, String captcha){\n\t\tif (StringUtil.isNull(loginResult)) {\n\t\t\t// Login success\n\t\t\treturn true;\n\t\t}\n\n\t\tint result = getCode(loginResult, \"result\"), status = getCode(loginResult, \"status\");\n\n\t\tif (result == 1 && status == 1) {\n\t\t\t// Login success\n\t\t\treturn true;\n\t\t}else if (result == 0 && status == -2) {\n\t\t\t// Password Error\n\t\t\tput2RtnMap(ERROR, \"login fail! Username or password is wrong!\");\n\t\t\treturn false;\n\t\t}else if (result == 0 && (status == -3 || status == -1)) {\n\t\t\t// status(-3): Need captcha verification status(-1): Wrong\n\t\t\t// captcha\n\t\t\tcaptcha = VerifyUtil.getVerifyCode(client, website);\n\t\t\treturn login(client, user, password, tryCount + 1, captcha);\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "private boolean checkLogin(String username, String passwordMD5) {\n try {\n Statement stmt = GUITracker.conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from account where username='\" + username + \"' and password='\" + passwordMD5 + \"'\");\n if (rs.next()) {\n //iduser = rs.getInt(\"Id\");\n return true;\n } else {\n return false;\n } \n \n// if ((username.equals(usernamePeer)) && (passwordMD5.equals(passwordPeer))) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}", "@Override\n public boolean checkLogin(String login, String password) throws DaoException {\n User user = userDao.getByEmail(login);\n boolean result = false;\n if (user != null && user.getPassword().equalsIgnoreCase(DigestMD5Helper.computeHash(password))) {\n log.info(\"User {} {} has successfully logged in\", user.getFirstName(), user.getLastName());\n result = true;\n }\n return result;\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }", "private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n mUsrView.setError(null);\n mPasswordView.setError(null);\n\n String usr = mUsrView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n Tuple<String, String> creds = /*getCredentials()*/ SERVER_CREDENTIALS;\n\n boolean cancel = false;\n View focusView = null;\n\n if (!TextUtils.isEmpty(password)) {\n if (!mPasswordView.getText().toString().equals(creds.y)) {\n if (Util.D) Log.i(\"attemptLogin\", \"pwd was \" + mPasswordView.getText().toString());\n mPasswordView.setError(getString(R.string.error_incorrect_creds));\n cancel = true;\n }\n focusView = mPasswordView;\n }\n\n if (TextUtils.isEmpty(usr)) {\n mUsrView.setError(getString(R.string.error_field_required));\n focusView = mUsrView;\n cancel = true;\n } else if (!usr.equals(creds.x)) {\n mUsrView.setError(getString(R.string.error_incorrect_creds));\n focusView = mUsrView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n if (prefs != null)\n prefs.edit().putBoolean(getString(R.string.settingAuthorized), true);\n showProgress(true);\n mAuthTask = new UserLoginTask(usr, password);\n mAuthTask.execute((Void) null);\n }\n }" ]
[ "0.7466942", "0.7466942", "0.72751737", "0.72287583", "0.7179769", "0.7159749", "0.7159749", "0.7080823", "0.70679384", "0.7013599", "0.69911516", "0.69784504", "0.6965308", "0.6944275", "0.69399416", "0.69308627", "0.69268876", "0.6899427", "0.6880537", "0.6841815", "0.679781", "0.67643356", "0.67617905", "0.6753984", "0.67466223", "0.6746152", "0.67454696", "0.67408204", "0.67406887", "0.6730847", "0.67308074", "0.6722316", "0.6718172", "0.66976756", "0.6690574", "0.6686196", "0.66760284", "0.6674698", "0.6671529", "0.6668087", "0.66450876", "0.66430277", "0.6636301", "0.6633431", "0.6633384", "0.6633217", "0.66318995", "0.6627621", "0.66218746", "0.66168135", "0.65878373", "0.658644", "0.6584827", "0.65843827", "0.65800935", "0.6569242", "0.65680665", "0.656727", "0.656339", "0.6556923", "0.65531945", "0.65378356", "0.6534146", "0.65249777", "0.65238726", "0.6521981", "0.6516919", "0.65156204", "0.6515376", "0.6512849", "0.65110356", "0.6509362", "0.65066385", "0.6505656", "0.65056217", "0.6504156", "0.649544", "0.6492618", "0.64806384", "0.6480418", "0.64801985", "0.64754146", "0.64752835", "0.6467928", "0.6467381", "0.6463215", "0.64605427", "0.64585584", "0.6457773", "0.64559776", "0.64500666", "0.6449437", "0.64488924", "0.64457774", "0.6441072", "0.6440238", "0.64339024", "0.6427607", "0.6426333", "0.6415264", "0.640857" ]
0.0
-1
A adapter for table.
public interface MyTableAdapter { public final static int IGNORE_ITEM_VIEW_TYPE = -1; public int getRowCount(); public int getColumnCount(); public View getView(int row, int column, View convertView, ViewGroup parent); public int getWidth(int column); public int getHeight(int row); public int getItemViewType(int row, int column); public int getViewTypeCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Table getTable();", "public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header starting with 0\n * @param name the name to be used for this column\n * @return this to allow chaining\n */\n Table setColumn(int index, String name);\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Retrieve the value of the given row and column\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n\n String getValue(String column, int row);\n\n /**\n * Retrieve the configuration parameters of this table.\n *\n * As there can be many implementations of a table and these implementations are configured in a different manner,\n * this is the place where these parameters can be retrieved in a uniform manner and passed to other layers, e.g. to\n * configure appropriate writers and readers or simply to setup the respective factories.\n *\n * @return the not-null list of (key, value) pairs that configure this particular table\n */\n Map<String, String> getParameters();\n}", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "public TableEx() {\r\n setStyleName(\"gwtEx-Table\");\r\n rf = getRowFormatter();\r\n this.addClickHandler(tableClickTable);\r\n }", "public Table<Integer, Integer, String> getData();", "public interface ITableAdapter {\n\n int getColumnHeaderItemViewType(int position);\n\n int getRowHeaderItemViewType(int position);\n\n RecyclerView.ViewHolder onCreateCellViewHolder(ViewGroup parent, int viewType);\n\n void onBindCellViewHolder(RecyclerView.ViewHolder holder, int p_nXPosition, int p_nYPosition);\n\n RecyclerView.ViewHolder onCreateColumnHeaderViewHolder(ViewGroup parent, int viewType);\n\n void onBindColumnHeaderViewHolder(RecyclerView.ViewHolder holder, int position);\n\n RecyclerView.ViewHolder onCreateRowHeaderViewHolder(ViewGroup parent, int viewType);\n\n void onBindRowHeaderViewHolder(RecyclerView.ViewHolder holder, int position);\n\n View onCreateCornerView();\n\n ITableView getTableView();\n\n}", "public TableImpl() { columns = new Column[0]; }", "public interface MultiValueTableAdapter {\n\t//public void setComplexTable( ComplexTable table );\n\tpublic Object[] extract( Object o );\n\tpublic Object extractEvenNoValueExist( Object o );\n\tpublic void combine( Object o, Object[] extractValues );\n\tpublic ObjectNewer getObjectNewer();\n}", "public Row(BaseTable table) {\n this.table = table;\n }", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "Table getBaseTable();", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public Mytable() {\n this(DSL.name(\"mytable\"), null);\n }", "public Table asTable() {\n Table table = Table.create(this.name());\n for (Column<?> column : this.columns()) {\n table.addColumns(column);\n }\n return table;\n }", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "public String getTable()\n {\n return table;\n }", "public void initTable();", "public DefaultTableColumnModelExt() {\r\n super();\r\n }", "Table createTable();", "public CellTable<Attribute> getTable() {\n\n\t\tretrieveData();\n\n\t\t// Table data provider.\n\t\tdataProvider = new ListDataProvider<Attribute>(list);\n\n\t\t// Cell table\n\t\ttable = new PerunTable<Attribute>(list);\n\n\t\t// Connect the table to the data provider.\n\t\tdataProvider.addDataDisplay(table);\n\n\t\t// Sorting\n\t\tListHandler<Attribute> columnSortHandler = new ListHandler<Attribute>(dataProvider.getList());\n\t\ttable.addColumnSortHandler(columnSortHandler);\n\n\t\t// set empty content & loader\n\t\ttable.setEmptyTableWidget(loaderImage);\n\n\t\t// checkbox column column\n\t\tif (checkable) {\n\t\t\t// table selection\n\t\t\ttable.setSelectionModel(selectionModel, DefaultSelectionEventManager.<Attribute> createCheckboxManager(0));\n\t\t\ttable.addCheckBoxColumn();\n\t\t}\n\n\t\t// Create ID column.\n\t\ttable.addIdColumn(\"Attr ID\", null, 90);\n\n\t\t// Name column\n\t\tColumn<Attribute, Attribute> nameColumn = JsonUtils.addColumn(new PerunAttributeNameCell());\n\n\t\t// Description column\n\t\tColumn<Attribute, Attribute> descriptionColumn = JsonUtils.addColumn(new PerunAttributeDescriptionCell());\n\n\t\t// Value column\n\t\tColumn<Attribute, Attribute> valueColumn = JsonUtils.addColumn(new PerunAttributeValueCell());\n\t\tvalueColumn.setFieldUpdater(new FieldUpdater<Attribute, Attribute>() {\n\t\t\tpublic void update(int index, Attribute object, Attribute value) {\n\t\t\t\tobject = value;\n\t\t\t\tselectionModel.setSelected(object, object.isAttributeValid());\n\t\t\t}\n\t\t});\n\n\t\t// updates the columns size\n\t\tthis.table.setColumnWidth(nameColumn, 200.0, Unit.PX);\n\n\t\t// Sorting name column\n\t\tnameColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(nameColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_NAME));\n\n\t\t// Sorting description column\n\t\tdescriptionColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(descriptionColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_DESCRIPTION));\n\n\t\t// Add sorting\n\t\tthis.table.addColumnSortHandler(columnSortHandler);\n\n\t\t// Add the columns.\n\t\tthis.table.addColumn(nameColumn, \"Name\");\n\t\tthis.table.addColumn(valueColumn, \"Value\");\n\t\tthis.table.addColumn(descriptionColumn, \"Description\");\n\n\t\treturn table;\n\n\t}", "private EstabelecimentoTable() {\n\t\t\t}", "private Table(Builder builder) {\n super(builder);\n }", "public Mytable(String alias) {\n this(DSL.name(alias), MYTABLE);\n }", "public Table getTable() { return this.table; }", "public BasicTable(String name) {\n setId(name);\n }", "ReturnTable(TableModel dm) {\n super(dm);\n }", "public void newRow();", "public interface TableModel<T> extends Pageable {\n\n\t/**\n\t * @return number of rows.\n\t */\n\tint getRowCount();\n\t\n\t/**\n\t * @return number of columns.\n\t */\n\tint getColumnCount();\n\t\n\tTableColumn getTableColumn(int column);\n\t\n T getRowValue(int row);\n\t\n\tValueModel<Criterion> getFilterModel();\n\tValueModel<Order> getOrderModel();\t\n\t\n\tvoid addListener(TableModelListener listener);\n\tvoid removeListener(TableModelListener listener);\n}", "private static DataTable createDataTable() throws Exception {\n DataTable t = new DataTable(\"Items\");\r\n\r\n // Add two columns\r\n DataColumn c;\r\n\r\n // First column\r\n c = t.getColumns().Add(\"id\", TClrType.getType(\"System.Int32\"));\r\n c.setAutoIncrement(true);\r\n\r\n // Second column\r\n t.getColumns().Add(\"item\", TClrType.getType(\"System.String\"));\r\n\r\n // Set primary key\r\n t.setPrimaryKey(new DataColumnArray(new DataColumn[]{t.getColumns().getItem(0)}));\r\n\r\n // Add twelve rows\r\n for (int i = 0; i < 10; i++) {\r\n DataRow row = t.NewRow();\r\n row.setItem(0, i);\r\n row.setItem(1, String.format(\"%s\", i));\r\n t.getRows().Add(row);\r\n }\r\n DataRow row = t.NewRow();\r\n row.setItem(0, 11);\r\n row.setItem(1, \"abc\");\r\n t.getRows().Add(row);\r\n\r\n row = t.NewRow();\r\n row.setItem(0, 15);\r\n row.setItem(1, \"ABC\");\r\n t.getRows().Add(row);\r\n\r\n return t;\r\n }", "public ATExpression base_tableExpression();", "public TableFactory getTableFactory() { return new BasicTableFactory(); }", "DataTable createDataTable();", "public Mytable(Name alias) {\n this(alias, MYTABLE);\n }", "TableInstance createTableInstance();", "@Override\n\tpublic void configTable() {\n\t\tString[][] colNames = { { \"Name\", \"name\" }, { \"Ward No\", \"wardNo\" }, { \"Max. patients\", \"maxPatients\" }, { \"No of Patients\", \"patientCount\" },\n\t\t\t\t{ \"No of Employees\", \"employeeCount\" }};\n\n\t\tfor (String[] colName : colNames) {\n\t\t\tTableColumn<Ward, String> col = new TableColumn<>(colName[0]);\n\t\t\tcol.setCellValueFactory(new PropertyValueFactory<>(colName[1]));\n\t\t\ttable.getColumns().add(col);\n\t\t}\n\n\t\ttable.setItems(tableData);\n\t\t\n\t}", "public String getTable() {\n return table;\n }", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public String getTable() {\n return table;\n }", "TableImpl(int id) {\n this.id = id;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public DataTable(JTable t) {\r\n initComponents();\r\n setupComponents(t);\r\n }", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "@Override\n public Iterator<Iterable<T>> iterator() {\n return new TableIterator();\n }", "public DataTableModel() {\n super();\n LanguageObservable.getInstance().attach(this);\n setLocalizedResourceBundle(\"ch.ethz.origo.jerpa.jerpalang.perspective.ededb.EDEDB\");\n initColumns();\n data = new LinkedList<DataRowModel>();\n }", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "void initTable();", "public TableObject()\r\n {\r\n\tsuper(ObjectType.Table);\r\n\tglobal = false;\r\n }", "TableId table();", "public AllFieldsTableHandler(){}", "public interface StringTable {\n List<StringRecord> getAllRecords();\n List<StringRecord> getRecordsWhere(Predicate<StringRecord> predicate);\n void addFieldEncoder(FieldEncoder encoder);\n}", "public final Table getTable()\n {\n return table;\n }", "public void setTable(Table table)\n {\n this.table = table;\n }", "public Table getTable() {\n return table;\n }", "public TwoTieredTable(String name) \n\t{\n\t\tthis.name = name;\n\t}", "public AttlistTableModel () {\n super();\n }", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "@Override\n public void tableRows_()\n {\n }", "public TableRows (t_connect con, String dbTable) {\n\n\tsetDbTable(dbTable);\n \n\trows = new Vector();\n\n try {\n\t DatabaseMetaData md = con.con.getMetaData();\n\t ResultSet cols = md.getColumns(null,null,getDbTable(),\"%\");\n\t while (cols.next()) {\n\t\t rows.addElement(cols.getString(4));\n\t }\n\t this.setListData(rows);\n\t this.setSelectedIndex(0);\n\t } catch (Exception exception) {\n\t \n }\n \n }", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Table getTable() {\n return table;\n }", "public TempTable() {\r\n\t\t\tsuper();\r\n\t\t\tthis.clauses = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "protected abstract void initialiseTable();", "TABLE createTABLE();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "private String getTableName() {\n return this.tableName;\n }", "public DataTable() {\n\n\t\t// In this application, we use HashMap data structure defined in\n\t\t// java.util.HashMap\n\t\tdc = new HashMap<String, DataColumn>();\n\t}", "BTable createBTable();", "public String getTableName() {\n return this.tableName;\n }", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "private Table(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Override\n protected void initResultTable() {\n }", "Tablero consultarTablero();", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "private ByaTableModel() {\n\t}", "String getTableName();", "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "public String getTableName() {\n return tableName; \n }", "public TableView getTableView()\n {\n TableView table = new TableView();\n table.setEditable(true);\n table.setPrefHeight(300);\n table.setMaxHeight(500);\n table.getStyleClass().add(\"table-row-cell\");\n\n TableColumn<Hike, String> locationCol = new TableColumn<>(\"Location\");\n locationCol.setPrefWidth(150);\n TableColumn<Hike, String> dateCol = new TableColumn<>(\"Date\");\n dateCol.setPrefWidth(150);\n TableColumn<Hike, String> stepsCol = new TableColumn<>(\"Steps\");\n stepsCol.setPrefWidth(100);\n TableColumn<Hike, String> heartrateCol = new TableColumn(\"Avg Heart Rate\");\n heartrateCol.setPrefWidth(150);\n TableColumn optionsCol = new TableColumn(\"Options\");\n optionsCol.setPrefWidth(200);\n\n locationCol.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\n dateCol.setCellValueFactory(new PropertyValueFactory<>(\"datePlanned\"));\n stepsCol.setCellValueFactory(new PropertyValueFactory<>(\"stepsTaken\"));\n heartrateCol.setCellValueFactory(new PropertyValueFactory<>(\"heartRateAverage\"));\n \n table.getColumns().addAll(\n locationCol,\n dateCol,\n stepsCol,\n heartrateCol,\n optionsCol);\n\n TableColumn viewCol = new TableColumn(\"View Hike\");\n TableColumn fitbitCol = new TableColumn(\"FitBit Data\");\n\n optionsCol.getColumns().addAll(viewCol, fitbitCol);\n return table;\n }", "public TableImpl(Column[] c) { columns = c; }", "public DatabaseTable(String tableName) {\n this.tableName = tableName;\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate TableLayout buildTable() {\n\t\t// Initialize table\n\t\tTableLayout table = new TableLayout(this);\n\t\tLayoutParams tableParams = new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tLayoutParams.WRAP_CONTENT);\n\t\ttable.setLayoutParams(tableParams);\n\t\ttable.setPadding(10, 10, 10, 10);\n\n\t\t// Initialize generic row params\n\t\tLayoutParams genericRowParams = new TableRow.LayoutParams(\n\t\t\t\tLayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);\n\n\t\tfillTable(table, genericRowParams);\n\t\treturn table;\n\t}", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "private TableAccessET() {\n\n }", "public void doCreateTable();", "public BudgetCustTranGetDataRowImpl() {\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "private HashMap<Long, String> getTable() {\n return table;\n }", "public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }", "public SwitchColTable() {\r\r\r\r\n }", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "public Table(ElementStructure structure) {\n\t\tsuper(structure);\n\t\tfields = structure.data.fieldArray(vis.positionFields());\n\t\tpadding = ModelUtil.getPadding(vis, StyleTarget.makeElementTarget(null), 2);\n\t\tpadding.top += 15; // For the titles\n\t\tfraction = divideColumnSpace(fields);\n\t\tStyleTarget styleTarget = StyleTarget.makeElementTarget(\"text\");\n\t\tfontSize = ModelUtil.getFontSize(vis, styleTarget, 12);\n\t}", "private AlarmDeviceTable() {}", "private JTable getJTableDbTable() {\r\n\t\tif (jTableDbTable == null) {\r\n\t\t\tString [] colName = {\"字段\",\"导入值\"};\r\n\t\t\tdbTableModel = new DefaultTableModel(colName);\r\n\t\t\tdbTableModel.setEditColumns(new int[]{1});\r\n\t\t\tjTableDbTable = new JTable(dbTableModel);\r\n\t\t\tjTableDbTable.setRowHeight(25);\r\n\t\t\tTableUtil.setTableAlign(jTableDbTable, JLabel.CENTER);\r\n\t\t}\r\n\t\treturn jTableDbTable;\r\n\t}", "public interface HTableWrapper {\n\n /**\n * To get the table name.\n * \n * @return\n */\n public byte[] getName();\n\n /**\n * To get a row.\n * \n * @param get\n * @return\n * @throws IOException\n */\n public Result get(Get get) throws IOException;\n\n /**\n * To get a row using lockId.\n * \n * @param get\n * @param lockId\n * @return\n * @throws IOException\n */\n public Result get(Get get, Integer lockId) throws IOException;\n\n /**\n * To rollback a row.\n * \n * @param row\n * @param startId\n * @param lockId\n * @throws IOException\n */\n public void rollbackRow(byte[] row, long startId, Integer lockId)\n throws IOException;\n\n /**\n * To commit a row.\n * \n * @param row\n * @param startId\n * @param commitId\n * @param isDelete\n * @param lockId\n * @throws IOException\n */\n public void commitRow(byte[] row, long startId, long commitId,\n boolean isDelete, Integer lockId) throws IOException;\n\n}", "public String getTableName() {\n return this.tableName;\n }", "public String getTableName() {\n return this.tableName;\n }" ]
[ "0.68618214", "0.67700803", "0.66125685", "0.6569817", "0.64878005", "0.6486409", "0.64660853", "0.6409886", "0.63641495", "0.63549465", "0.6334326", "0.63306767", "0.6321895", "0.62722915", "0.62619925", "0.62225014", "0.6149665", "0.6141678", "0.6106824", "0.6099912", "0.60975903", "0.6086064", "0.60759205", "0.60580003", "0.6043424", "0.60283756", "0.59896314", "0.5985961", "0.5985448", "0.598065", "0.5971284", "0.5967854", "0.5963777", "0.5960451", "0.5953498", "0.59480125", "0.5941786", "0.5937273", "0.5930035", "0.5921712", "0.59137964", "0.59015983", "0.58977103", "0.5884747", "0.58798325", "0.58789957", "0.58789957", "0.585975", "0.5857701", "0.5857197", "0.58523124", "0.5851535", "0.58456427", "0.58365965", "0.58275753", "0.5824197", "0.5823935", "0.5823756", "0.5810247", "0.58063734", "0.5805372", "0.5803203", "0.57825667", "0.577007", "0.57676935", "0.5761792", "0.57597166", "0.5740771", "0.57398707", "0.5736994", "0.57356673", "0.5724569", "0.572098", "0.5718834", "0.5714875", "0.5708388", "0.57068294", "0.57039857", "0.56838995", "0.5683078", "0.56777596", "0.5674952", "0.5670021", "0.5666879", "0.5661993", "0.56606746", "0.5659055", "0.56579703", "0.5656272", "0.5656272", "0.565392", "0.5642899", "0.5640879", "0.5636822", "0.5630014", "0.56149936", "0.56148636", "0.56147164", "0.561027", "0.561027" ]
0.64765865
6
/ vrne string v katerem so izdeleki ter njihova kolicina. format pa je " izdelek1 kolicina1, izdelek2 kolicina2."
public String vrniStanje() { String tmp; StringBuffer stanje = new StringBuffer(); for(Enumeration<String> en = izdelki.keys(); en.hasMoreElements(); ){ tmp = en.nextElement(); stanje.append(" "+tmp); stanje.append(" "+izdelki.get(tmp)+","); } if(stanje.length() == 0) return "."; stanje.replace(stanje.length()-1, stanje.length(), "."); return stanje.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals(\"\")) {\r\n\t\t\t\t\t++licznik;\r\n\t\t\t\t}\r\n\r\n\t\t\ttablicaWynik = new String[2 * licznik];\r\n\r\n\t\t\tm = 0;\r\n\r\n\t\t\tfor (String str : bufor)\r\n\t\t\t\tif (!str.equals(\"\")) {\r\n\t\t\t\t\ttablicaWynik[m] = str;\r\n\t\t\t\t\ttablicaWynik[m + 1] = \" \";\r\n\t\t\t\t\t++m;\r\n\t\t\t\t\t++m;\r\n\t\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(tablicaWynik);\r\n\t\t}\r\n\t}", "protected String seuraavaBittijono(String binaarina, int i) {\n int loppu = Math.min(binaarina.length(), i + merkkienPituus);\n return binaarina.substring(i, loppu);\n }", "private CharSequence replacewithZawgyi(String zawgyi, String myString1) {\n\t\ttry {\n JSONArray rule_array = new JSONArray(zawgyi);\n int max_loop = rule_array.length();\n \n myString1 = myString1.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString1 = myString1.replaceAll(from, to);\n myString1 = myString1.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\t\tmyString1 = myString1.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString1;\n \n\t}", "@Override\r\n\t\tpublic GeometrijskiLik stvoriIzStringa(String parametri) {\r\n\r\n\t\t\tString[] parametriNiz = parametri.split(\"\\\\s+\");\r\n\t\t\tif (parametriNiz.length != 4) {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Netocan broj argumenata.\");\r\n\t\t\t}\r\n\t\t\tint[] parametriBrojevi = new int[4];\r\n\t\t\tfor (int i = 0; i < parametriNiz.length; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparametriBrojevi[i] = Integer.parseInt(parametriNiz[i]);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Nisu dani integer brojevi.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new Elipsa(parametriBrojevi[0], parametriBrojevi[1],\r\n\t\t\t\t\tparametriBrojevi[2], parametriBrojevi[3]);\r\n\t\t}", "@Test\n public void kaasunKonstruktoriToimiiOikeinTest() {\n assertEquals(rikkihappo.toString(),\"Rikkihappo Moolimassa: 0.098079\\n tiheys: 1800.0\\n lämpötila: 298.15\\n diffuusiotilavuus: 50.17\\npitoisuus: 1.0E12\");\n }", "public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) {\n if (kaikki.length() < 3) {\n return \"k\";\n }\n\n String viimKivi = viimeisimmat + \"k\";\n String viimPaperi = viimeisimmat + \"p\";\n String viimSakset = viimeisimmat + \"s\";\n \n int viimKiviLkm = 0;\n int viimPaperiLkm = 0;\n int viimSaksetLkm = 0;\n String arvaus = \"k\";\n int viimValueMax = 0;\n /*\n Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä\n syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan\n kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi.\n Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee \n pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, \n tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi.\n */\n if (muisti.containsKey(viimKivi)) {\n viimKiviLkm = muisti.get(viimKivi);\n }\n if (muisti.containsKey(viimPaperi)) {\n viimPaperiLkm = muisti.get(viimPaperi);\n }\n if (muisti.containsKey(viimSakset)) {\n viimSaksetLkm = muisti.get(viimSakset);\n }\n\n if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) {\n return \"p\";\n }\n if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) {\n return \"s\";\n }\n if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) {\n return \"k\";\n }\n\n return arvaus;\n }", "public static void main(String[] args) {\n\n String text= \"merhaba arkadaslar \";\n System.out.println( \"1. bolum =\" + text .substring(1,5));// 1 nolu indexten 5 e kadar. 5 dahil degil\n System.out.println(\"2. bolum =\"+ text.substring(0,3));\n System.out.println(\"3. bolum =\"+ text.substring(4));// verilen indexten sonun akadar al\n\n String strAlinan= text.substring(0,3);\n\n\n\n\n\n }", "private String tulostuksenApu(){\r\n String apu = \"Rivitiedosto: \";\r\n for(int i = 0; i<rivitiedot.length; i++){\r\n apu = apu + i+\": \";\r\n for(int k = 1; k <= rivitiedot[i].getKoko(); k++){\r\n apu = apu + \" \"+rivitiedot[i].get(k);\r\n }\r\n apu = apu + \" \";\r\n }\r\n\r\n return apu;\r\n }", "public final String dataTauluMerkkiJonoksi() {\r\n String data = \"\";\r\n\r\n for (int i = 0; i < this.riviAsteikko.length; i++) {\r\n for (int j = 0; j < this.sarakeAsteikko.length; j++) {\r\n if (this.dataTaulukko[i][j] < 10) {\r\n data = data + \" \" + dataTaulukko[i][j];\r\n } else if (this.dataTaulukko[i][j] >= 10\r\n && this.dataTaulukko[i][j] < 100) {\r\n data = data + \" \" + this.dataTaulukko[i][j];\r\n } else {\r\n data = data + \" \" + this.dataTaulukko[i][j];\r\n }\r\n }\r\n data = data + System.lineSeparator();\r\n }\r\n return data;\r\n }", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public String kalkulatu() {\n\t\tString emaitza = \"\";\n\t\tDouble d = 0.0;\n\t\ttry {\n\t\t\td = Double.parseDouble(et_sarrera.getText().toString());\n\t\t} catch (NumberFormatException e) {\n\t\t\tet_sarrera.setText(\"0\");\n\t\t}\n\t\tif (st_in.compareTo(\"m\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609.344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"km\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 100000.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1.609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.0000254);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"cm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 100.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 10.0);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 160934.4);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 2.54);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"mm\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000000.0);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1000.0);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 10.0);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 25.4);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"ml\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1.609344);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609.344);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 160934.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 1609344);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d / 0.000015782828);\n\t\t\t}\n\t\t} else if (st_in.compareTo(\"inch\") == 0) {\n\t\t\tif (st_out.compareTo(\"km\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0000254);\n\t\t\t} else if (st_out.compareTo(\"m\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.0254);\n\t\t\t} else if (st_out.compareTo(\"cm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 2.54);\n\t\t\t} else if (st_out.compareTo(\"mm\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 25.4);\n\t\t\t} else if (st_out.compareTo(\"ml\") == 0) {\n\t\t\t\temaitza = String.valueOf(d * 0.000015782828);\n\t\t\t} else if (st_out.compareTo(\"inch\") == 0) {\n\t\t\t\temaitza = String.valueOf(d);\n\t\t\t}\n\t\t}\n\t\treturn emaitza;\n\t}", "public void rozseparujDokladnie() {\r\n\t\tboolean wSpacjach, wWyrazie;\r\n\t\tString[] liniaRozseparowana = null;\r\n\t\tArrayList<Integer> lista = null;\r\n\t\tArrayList<String> lista2 = null;\r\n\r\n\t\tfor (String linia : calaZawartosc) {\r\n\t\t\twSpacjach = false;\r\n\t\t\twWyrazie = false;\r\n\r\n\t\t\tlista = new ArrayList<Integer>();\r\n\r\n\t\t\tfor (int i = 0; i < linia.length(); ++i) {\r\n\t\t\t\tif (Character.isWhitespace(linia.charAt(i))) {\r\n\t\t\t\t\tif (!wSpacjach) {\r\n\t\t\t\t\t\twSpacjach = true;\r\n\t\t\t\t\t\twWyrazie = false;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!wWyrazie) {\r\n\t\t\t\t\t\twSpacjach = false;\r\n\t\t\t\t\t\twWyrazie = true;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlista.add(linia.length());\r\n\r\n\t\t\tlista2 = new ArrayList<String>();\r\n\r\n\t\t\tfor (int i = 0; i < lista.size() - 1; ++i)\r\n\t\t\t\tlista2.add(linia.substring(lista.get(i), lista.get(i + 1)));\r\n\r\n\t\t\tliniaRozseparowana = new String[lista2.size()];\r\n\t\t\tfor (int i = 0; i < liniaRozseparowana.length; ++i) {\r\n\t\t\t\tliniaRozseparowana[i] = lista2.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(liniaRozseparowana);\r\n\t\t}\r\n\t}", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "public String cekReduplikasi(String kata) throws IOException{\n String res = \"\";\n if(!kata.contains(\"-\") && this.cekUlangSebagian(kata)){ // kata ulang sebagian\n if(this.cekAdaDiLexicon(kata.substring(2))){\n res = kata.substring(2);\n }\n else if(this.cekAdaDiLexicon(kata.substring(2, kata.length()-2))){\n res = kata.substring(2, kata.length()-2);\n }\n }\n else if(this.cekUlangSemu(kata)){ // kata ulang semu\n res = kata;\n }\n else if(kata.contains(\"-\")){\n int idxHubung = kata.indexOf(\"-\");\n String temp1 = kata.substring(0, idxHubung);\n String temp2 = kata.substring(idxHubung+1);\n if(temp1.equalsIgnoreCase(temp2)){ // kata ulang penuh\n res = temp1;\n }\n else if(this.cekAdaDiLexicon(temp1) && !this.cekAdaDiLexicon(temp2)){\n res = temp1;\n }\n else if(!this.cekAdaDiLexicon(temp1) && this.cekAdaDiLexicon(temp2)){\n res = temp2;\n }\n else{\n res = temp1;\n }\n }\n else{\n res = kata;\n }\n return res;\n }", "private String fjernSkilleTegn (String inputString) {\n\t\t\tfor (int i = 0; i < skilleTegn.length; i++) {\n\t\t\t\tinputString = inputString.replace(Character.toString(skilleTegn[i]), \"\");\n\t\t\t}\n\t\t\treturn inputString;\n\t}", "TipeLayanan(String deskripsi)\r\n {\r\n this.deskripsi = deskripsi;\r\n }", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String stroka1 = scanner.nextLine();\n Integer number1 = scanner.nextInt();\n Integer number2 = scanner.nextInt();\n\n System.out.println(stroka1.substring(number1, number2 + 1));\n\n }", "static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public String toString(){\r\n\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}", "public static void main(String[] args) {\n String a = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ#-\";\r\n //---------------------------------------------------------------------\r\n \r\n //Memanggil alfabet String yang diinginkan\r\n //Menentukan alfabet untuk Nama\r\n char hasil1 = a.charAt(0);\r\n char hasil2 = a.charAt(25);\r\n char hasil3 = a.charAt(7);\r\n char hasil4 = a.charAt(0);\r\n char hasil5 = a.charAt(17);\r\n char hasil6 = a.charAt(27);\r\n char hasil7 = a.charAt(1);\r\n char hasil8 = a.charAt(4);\r\n char hasil9 = a.charAt(17);\r\n char hasil10 = a.charAt(11);\r\n char hasil11 = a.charAt(8);\r\n char hasil12 = a.charAt(0);\r\n char hasil13 = a.charAt(13);\r\n char hasil14 = a.charAt(0);\r\n //---------------------------------------------------------------------\r\n \r\n //Menentukan alfabet untuk Kelas\r\n char hasil15 = a.charAt(23);\r\n char hasil16 = a.charAt(8);\r\n char hasil17 = a.charAt(8);\r\n char hasil18 = a.charAt(27);\r\n char hasil19 = a.charAt(17);\r\n char hasil20 = a.charAt(15);\r\n char hasil21 = a.charAt(11);\r\n char hasil22 = a.charAt(27);\r\n char hasil23 = a.charAt(1);\r\n //---------------------------------------------------------------------\r\n \r\n //Saat nya memanggil output yang telah di tentukan pada variable-variable diatas\r\n System.out.println(\"ALFABET TERSEDIA : \"+a);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Nama\r\n System.out.println(\"Nama : \"+hasil1+\"\"+hasil2+\"\"+hasil3+\"\"+hasil4+\r\n \"\"+hasil5+\"\"+hasil6+\"\"+hasil7+\"\"+hasil8+\"\"+hasil9+\"\"+hasil10+\"\"\r\n +hasil11+\"\"+hasil12+\"\"+hasil13+\"\"+hasil14);\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Kelas\r\n System.out.println(\"Kelas : \"+hasil15+\"\"+hasil16+\"\"+hasil17+\"\"+\r\n hasil18+\"\"+hasil19+\"\"+hasil20+\"\"+hasil21+\"\"+hasil22+\"\"+hasil23);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n }", "public String toString(){\r\n\t\treturn \"KORISNIK:\"+korisnik+\" PORUKA:\"+poruka;\r\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String word = \"Tenet\";\n String word3 = \"tenet\";\n System.out.println(\"word \" + word);\n word.toLowerCase(); //porównanie bez wielkosci znakow\n //charAt(0) - zero,\n String[] Tablica = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n Tablica[i] = String.valueOf(word.charAt(i));\n }\n String word2 = \"\";\n\n for (int i = (word.length() - 1); i >= 0; i--) {\n //System.out.print(Tablica[i]);\n word2 = word2 + Tablica[i];\n }\n //System.out.println();\n System.out.println(\"word 2 \" + word2);\n System.out.println(\"word 3 \" + word3);\n\n System.out.print(\"word 3 i word 2 \");\n if (word3.toLowerCase().equals(word2.toLowerCase())) {\n System.out.println(\"jest palidronem\");\n } else {\n System.out.println(\"nie jest palidronem\");\n }\n\n//koniec\n\n }", "public String ayadi_sandhi(String s1, String s2)\n {\n Log.info(\"Welcome to ayadi Sandhi\");\n\n if (!VowelUtil.isEjanta(s1)) Log.info(\"NOT ELIGIBLE FOR ayadi sandhi\");\n\n if (!VowelUtil.isAjadi(s2)) Log.info(\"NOT ELIGIBLE FOR ayadi sandhi\");\n // if 2nd string is not a Vowel, then cannot proceed.\n String return_me = s1 + s2;\n\n String stripped1;\n stripped1 = VarnaUtil.stripAntyaVarna(s1); // s1.substring(0, str_len1\n // - reduce_by1);\n\n String modified_anta = s1 + s2;\n\n if (s1.endsWith(\"e\") || s1.endsWith(\"e3\"))\n {\n modified_anta = stripped1 + \"ay\";\n }\n\n else if (s1.endsWith(\"E\") || s1.endsWith(\"E3\"))\n {\n modified_anta = stripped1 + \"Ay\";\n }\n\n else if (s1.endsWith(\"o\") || s1.endsWith(\"o3\"))\n {\n modified_anta = stripped1 + \"av\";\n }\n\n else if (s1.endsWith(\"O\") || s1.endsWith(\"O3\"))\n {\n modified_anta = stripped1 + \"Av\";\n }\n\n return_me = modified_anta + s2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.78\");\n comments.setSutraPath(\"eco.ayavAyAvaH\");\n comments.setSutraProc(\"ayAdi-Adesha\");\n comments.setSource(Comments.sutra);\n String cond1 = \"When a word terminating in an <ec> pratyahara \" + \"is followed by any vowel the <ec>as are replaced by ayadi.\" + \"\\n<ec>(e/ai/o/au) + any vowel = ay/Ay/av/Av respectively.\";\n comments.setConditions(cond1);\n\n // The words are furthur modified by the principle of yakkar-vakaar lopa\n return_me += \", \" + (new MixedSandhi()).shaakalya_ya_va_lopa(modified_anta, s2, comments);\n\n return return_me;\n }", "private String cadenaABinario(String cadena){\n String cb = \"\";\n int longitud;\n for(int i = 0; i < cadena.length(); i++){\n cb += String.format(\"%8s\",Integer.toBinaryString(cadena.charAt(i)));\n }\n cb = formato(cb);\n return cb;\n }", "public static void main(String arg[]) {\n String frase1 = \"Había vez circo alegraba el\";\n String frase2 = \"una un que siempre carazón sin temer jamás\";\n String frase3 = \"\";\n\n int inicio1 = 0;\n int fin1 = frase1.indexOf(\" \");\n int inicio2 = 0;\n int fin2 = frase2.indexOf(\" \");\n\n while ((fin1 != -1) || (fin2 != -1)) {\n if (fin1 != -1) {\n frase3 = frase3.concat(frase1.substring(inicio1, fin1 + 1));\n inicio1 = fin1 + 1;\n fin1 = frase1.indexOf(\" \", inicio1);\n }\n if (fin2 != -1) {\n frase3 = frase3.concat(frase2.substring(inicio2, fin2 + 1));\n inicio2 = fin2 + 1;\n fin2 = frase2.indexOf(\" \", inicio2);\n }\n }\n System.out.println(frase3);\n }", "private String sprawdzRozszerzenie(String adresPliku) {\r\n\t\tString[] tablica = adresPliku.split(\"\\\\.\");\r\n\r\n\t\treturn tablica[tablica.length - 1];\r\n\t}", "public String gjejZinxhirin(String start, String end) throws Exception {\n\t\tif (start.length() != end.length())\n\t\t\tthrow new RuntimeException(\"fjalet duhet te jene te te njejtes gjatesi\");\n\n\t\t// nese fjala e pare dhe fjala destinuese jane te njejta nuk ka nevoj per kerkim\n\t\tif (start.equals(end))\n\t\t\treturn start;\n\n\t\t// lexojm dhe i shtojm fjalet nga skedari ku gjinden te gjitha fjalet\n\t\tlexoFjaletNeKeteGjatesi(start.length());\n\n\t\t/*\n\t\t * Kontrollojm se a e ekziston ajo fjale ne fjalor qe te mos behet kerkimi per\n\t\t * dicka qe nuk ekziston\n\t\t */\n\t\tif (!fjalet.contains(start)) {\n\t\t\tthrow new Exception(\"Kjo fjale nuk ekziston ne fjalor\");\n\t\t}\n\t\tif (!fjalet.contains(end)) {\n\t\t\tthrow new Exception(\"Kjo fjale nuk ekziston ne fjalor\");\n\t\t}\n\n\t\t// riinicializojm kandidatet e ri dhe fjalet e shtuara\n\t\tkandidatet = new LinkedList<>();\n\t\tshtuar = new HashMap<>();\n\t\tnumerimi = 0;\n\n\t\tkandidatet.add(start);\n\t\tshtuar.put(start, null);\n\n\t\t/*\n\t\t * fillojm kerkimin e fjaleve por i vendosim nje limit deri 15000 fjale, qe te\n\t\t * mos mbetet programi duke kerkuar pafundesisht\n\t\t */\n\t\twhile (kandidatet.size() > 0) {\n\t\t\tif (numerimi++ > 15000)\n\t\t\t\tthrow new RuntimeException(\"exceeded search limit\");\n\n\t\t\tString c = (String) kandidatet.remove(0);\n\n\t\t\tIterator<String> iter = fjalet.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tString w = (String) iter.next();\n\t\t\t\tif (!shtuar.containsKey(w) && adjacent(c, w)) {\n\t\t\t\t\tshtuar.put(w, c);\n\n\t\t\t\t\tif (end.equals(w)) {\n\t\t\t\t\t\treturn rregulloParaqitjenEZinxhirit(w);\n\t\t\t\t\t}\n\n\t\t\t\t\tkandidatet.add(w);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\t}", "public CharSequence XtremeZawGyi(String myString1,Boolean Zawgyi) {\n\t\t\n String uni = \"[\"\n +\t\" {\\\"from\\\": \\\"\t\\u1000\t\\\",\\\"to\\\":\\\"\t\\u1E00\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1001\t\\\",\\\"to\\\":\\\"\t\\u1E01\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1002\t\\\",\\\"to\\\":\\\"\t\\u1E02\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1003\t\\\",\\\"to\\\":\\\"\t\\u1E03\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1004\t\\\",\\\"to\\\":\\\"\t\\u1E04\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1005\t\\\",\\\"to\\\":\\\"\t\\u1E05\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1006\t\\\",\\\"to\\\":\\\"\t\\u1E06\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1007\t\\\",\\\"to\\\":\\\"\t\\u1E07\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1008\t\\\",\\\"to\\\":\\\"\t\\u1E08\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1009\t\\\",\\\"to\\\":\\\"\t\\u1E09\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100A\t\\\",\\\"to\\\":\\\"\t\\u1E0A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100B\t\\\",\\\"to\\\":\\\"\t\\u1E0B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100C\t\\\",\\\"to\\\":\\\"\t\\u1E0C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100D\t\\\",\\\"to\\\":\\\"\t\\u1E0D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100E\t\\\",\\\"to\\\":\\\"\t\\u1E0E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u100F\t\\\",\\\"to\\\":\\\"\t\\u1E0F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1010\t\\\",\\\"to\\\":\\\"\t\\u1E10\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1011\t\\\",\\\"to\\\":\\\"\t\\u1E11\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1012\t\\\",\\\"to\\\":\\\"\t\\u1E12\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1013\t\\\",\\\"to\\\":\\\"\t\\u1E13\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1014\t\\\",\\\"to\\\":\\\"\t\\u1E14\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1015\t\\\",\\\"to\\\":\\\"\t\\u1E15\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1016\t\\\",\\\"to\\\":\\\"\t\\u1E16\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1017\t\\\",\\\"to\\\":\\\"\t\\u1E17\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1018\t\\\",\\\"to\\\":\\\"\t\\u1E18\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1019\t\\\",\\\"to\\\":\\\"\t\\u1E19\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101A\t\\\",\\\"to\\\":\\\"\t\\u1E1A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101B\t\\\",\\\"to\\\":\\\"\t\\u1E1B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101C\t\\\",\\\"to\\\":\\\"\t\\u1E1C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101D\t\\\",\\\"to\\\":\\\"\t\\u1E1D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101E\t\\\",\\\"to\\\":\\\"\t\\u1E1E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u101F\t\\\",\\\"to\\\":\\\"\t\\u1E1F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1020\t\\\",\\\"to\\\":\\\"\t\\u1E20\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1021\t\\\",\\\"to\\\":\\\"\t\\u1E21\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1023\t\\\",\\\"to\\\":\\\"\t\\u1E22\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1024\t\\\",\\\"to\\\":\\\"\t\\u1E23\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1025\t\\\",\\\"to\\\":\\\"\t\\u1E24\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1026\t\\\",\\\"to\\\":\\\"\t\\u1E25\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1027\t\\\",\\\"to\\\":\\\"\t\\u1E26\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1029\t\\\",\\\"to\\\":\\\"\t\\u1E27\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102A\t\\\",\\\"to\\\":\\\"\t\\u1E28\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102B\t\\\",\\\"to\\\":\\\"\t\\u1E29\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102C\t\\\",\\\"to\\\":\\\"\t\\u1E2A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102D\t\\\",\\\"to\\\":\\\"\t\\u1E2B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102E\t\\\",\\\"to\\\":\\\"\t\\u1E2C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u102F\t\\\",\\\"to\\\":\\\"\t\\u1E2D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1030\t\\\",\\\"to\\\":\\\"\t\\u1E2E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1031\t\\\",\\\"to\\\":\\\"\t\\u1E2F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1032\t\\\",\\\"to\\\":\\\"\t\\u1E30\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1033\t\\\",\\\"to\\\":\\\"\t\\u1E31\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1034\t\\\",\\\"to\\\":\\\"\t\\u1E32\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1036\t\\\",\\\"to\\\":\\\"\t\\u1E33\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1037\t\\\",\\\"to\\\":\\\"\t\\u1E34\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1038\t\\\",\\\"to\\\":\\\"\t\\u1E35\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1039\t\\\",\\\"to\\\":\\\"\t\\u1E36\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u103A\t\\\",\\\"to\\\":\\\"\t\\u1E37\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u103B\t\\\",\\\"to\\\":\\\"\t\\u1E38\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u103C\t\\\",\\\"to\\\":\\\"\t\\u1E39\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u103D\t\\\",\\\"to\\\":\\\"\t\\u1E3A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1040\t\\\",\\\"to\\\":\\\"\t\\u1E3B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1041\t\\\",\\\"to\\\":\\\"\t\\u1E3C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1042\t\\\",\\\"to\\\":\\\"\t\\u1E3D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1043\t\\\",\\\"to\\\":\\\"\t\\u1E3E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1044\t\\\",\\\"to\\\":\\\"\t\\u1E3F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1045\t\\\",\\\"to\\\":\\\"\t\\u1E40\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1046\t\\\",\\\"to\\\":\\\"\t\\u1E41\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1047\t\\\",\\\"to\\\":\\\"\t\\u1E42\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1048\t\\\",\\\"to\\\":\\\"\t\\u1E43\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1049\t\\\",\\\"to\\\":\\\"\t\\u1E44\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104A\t\\\",\\\"to\\\":\\\"\t\\u1E45\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104B\t\\\",\\\"to\\\":\\\"\t\\u1E46\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104C\t\\\",\\\"to\\\":\\\"\t\\u1E47\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104D\t\\\",\\\"to\\\":\\\"\t\\u1E48\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104E\t\\\",\\\"to\\\":\\\"\t\\u1E49\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u104F\t\\\",\\\"to\\\":\\\"\t\\u1E4A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u105A\t\\\",\\\"to\\\":\\\"\t\\u1E4B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1060\t\\\",\\\"to\\\":\\\"\t\\u1E4C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1061\t\\\",\\\"to\\\":\\\"\t\\u1E4D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1062\t\\\",\\\"to\\\":\\\"\t\\u1E4E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1063\t\\\",\\\"to\\\":\\\"\t\\u1E4F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1064\t\\\",\\\"to\\\":\\\"\t\\u1E50\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1065\t\\\",\\\"to\\\":\\\"\t\\u1E51\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1066\t\\\",\\\"to\\\":\\\"\t\\u1E52\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1067\t\\\",\\\"to\\\":\\\"\t\\u1E53\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1068\t\\\",\\\"to\\\":\\\"\t\\u1E54\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1069\t\\\",\\\"to\\\":\\\"\t\\u1E55\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106A\t\\\",\\\"to\\\":\\\"\t\\u1E56\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106B\t\\\",\\\"to\\\":\\\"\t\\u1E57\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106C\t\\\",\\\"to\\\":\\\"\t\\u1E58\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106D\t\\\",\\\"to\\\":\\\"\t\\u1E59\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106E\t\\\",\\\"to\\\":\\\"\t\\u1E5A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u106F\t\\\",\\\"to\\\":\\\"\t\\u1E5B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1070\t\\\",\\\"to\\\":\\\"\t\\u1E5C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1071\t\\\",\\\"to\\\":\\\"\t\\u1E5D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1072\t\\\",\\\"to\\\":\\\"\t\\u1E5E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1073\t\\\",\\\"to\\\":\\\"\t\\u1E5F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1074\t\\\",\\\"to\\\":\\\"\t\\u1E60\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1075\t\\\",\\\"to\\\":\\\"\t\\u1E61\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1076\t\\\",\\\"to\\\":\\\"\t\\u1E62\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1077\t\\\",\\\"to\\\":\\\"\t\\u1E63\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1078\t\\\",\\\"to\\\":\\\"\t\\u1E64\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1079\t\\\",\\\"to\\\":\\\"\t\\u1E65\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107A\t\\\",\\\"to\\\":\\\"\t\\u1E66\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107B\t\\\",\\\"to\\\":\\\"\t\\u1E67\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107C\t\\\",\\\"to\\\":\\\"\t\\u1E68\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107D\t\\\",\\\"to\\\":\\\"\t\\u1E69\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107E\t\\\",\\\"to\\\":\\\"\t\\u1E6A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u107F\t\\\",\\\"to\\\":\\\"\t\\u1E6B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1080\t\\\",\\\"to\\\":\\\"\t\\u1E6C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1081\t\\\",\\\"to\\\":\\\"\t\\u1E6D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1082\t\\\",\\\"to\\\":\\\"\t\\u1E6E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1083\t\\\",\\\"to\\\":\\\"\t\\u1E6F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1084\t\\\",\\\"to\\\":\\\"\t\\u1E70\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1085\t\\\",\\\"to\\\":\\\"\t\\u1E71\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1086\t\\\",\\\"to\\\":\\\"\t\\u1E72\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1087\t\\\",\\\"to\\\":\\\"\t\\u1E73\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1088\t\\\",\\\"to\\\":\\\"\t\\u1E74\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1089\t\\\",\\\"to\\\":\\\"\t\\u1E75\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108A\t\\\",\\\"to\\\":\\\"\t\\u1E76\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108B\t\\\",\\\"to\\\":\\\"\t\\u1E77\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108C\t\\\",\\\"to\\\":\\\"\t\\u1E78\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108D\t\\\",\\\"to\\\":\\\"\t\\u1E79\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108E\t\\\",\\\"to\\\":\\\"\t\\u1E7A\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u108F\t\\\",\\\"to\\\":\\\"\t\\u1E7B\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1090\t\\\",\\\"to\\\":\\\"\t\\u1E7C\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1091\t\\\",\\\"to\\\":\\\"\t\\u1E7D\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1092\t\\\",\\\"to\\\":\\\"\t\\u1E7E\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1094\t\\\",\\\"to\\\":\\\"\t\\u1E7F\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1095\t\\\",\\\"to\\\":\\\"\t\\u1E80\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1096\t\\\",\\\"to\\\":\\\"\t\\u1E81\t\\\"},\"\n +\t\" {\\\"from\\\": \\\"\t\\u1097\t\\\",\\\"to\\\":\\\"\t\\u1E82\t\\\"}\" + \"]\";\n if(!Zawgyi)\n {\n \tString temp = (String) ZawGyiToUni(myString1, false);\n \treturn replacewithSan(uni, temp);\n }\n else {\n return replacewithSan(uni, myString1);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n System.out.println(\"lutfen 15 karakterli bir sifre giriniz\");\n String sifre = scan.next();\n \n int sayac=0;\n \n if (sifre.length() == 15) {\n for (char karakter = ' '; karakter < '~'; karakter++) { \n if (sifre.indexOf(karakter) != -1 && sifre.lastIndexOf(karakter) == sifre.indexOf(karakter)) {\n \t sayac++; \n \t \n }\n \n }\n if (sayac==15) {\n \tSystem.out.println(\"gecerli sifre\");\n } else {\n \tSystem.out.println(\"gecersiz sifre\");\n }\n } \n else {\n System.out.println(\"girdiginiz kelime 15 karakterden olusmuyor lutfen 15 karakter giriniz\");\n\t }\n scan.close(); \n\t}", "private static CharSequence makeCarierString(CharSequence plmn, CharSequence spn) {\n final boolean plmnValid = !TextUtils.isEmpty(plmn);\n final boolean spnValid = !TextUtils.isEmpty(spn);\n if (plmnValid && spnValid) {\n return plmn + \"|\" + spn;\n } else if (plmnValid) {\n return plmn;\n } else if (spnValid) {\n return spn;\n } else {\n return \"\";\n }\n }", "public static void main(String[] args) {\n\t\tString s = \"Esto es una cadena de caracteres\";\n\t\tString s1 = s.substring(0,7);\n\t\tString s2 = s.substring(8,12);\n\t\tString s3 = s.substring(8);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t}", "public static void main(String[] args) {\n\t\tScanner ulaz = new Scanner(System.in);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Unesite Vas ssn u formatu DDD-DD-DDDD gdje D predstavlja broj:\");\r\n\t\tString ssn = ulaz.nextLine();\r\n\t\t// prebaci string u niz\r\n\t\tchar[] SSN = ssn.toCharArray();\r\n\t\t// ispitaj da li je na odgovarajucim mjestima broj ili crtica\r\n\t\tif ((Character.isDigit(SSN[0])) && (Character.isDigit(SSN[1]))\r\n\t\t\t\t&& (Character.isDigit(SSN[2])) && (SSN[3] == '-')\r\n\t\t\t\t&& (Character.isDigit(SSN[4])) && (Character.isDigit(SSN[5]))\r\n\t\t\t\t&& (SSN[6] == '-') && (Character.isDigit(SSN[7]))\r\n\t\t\t\t&& (Character.isDigit(SSN[8])) && (Character.isDigit(SSN[9]))\r\n\t\t\t\t&& (Character.isDigit(SSN[10]))) {\r\n\t\t\t// ako su svi uslov tacni ispisi poruku\r\n\t\t\tSystem.out.println(\"Uneseni ssn je ispravan.\");\r\n\t\t} else {\r\n\t\t\t// ako jedan ili vise uslova nije tacan ispisi poruku\r\n\t\t\tSystem.out.println(\"\\nUneseni ssn nije ispravan.\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static String formatarCEP(String codigo) {\r\n\r\n\t\tString retornoCEP = null;\r\n\r\n\t\tString parte1 = codigo.substring(0, 2);\r\n\t\tString parte2 = codigo.substring(2, 5);\r\n\t\tString parte3 = codigo.substring(5, 8);\r\n\r\n\t\tretornoCEP = parte1 + \".\" + parte2 + \"-\" + parte3;\r\n\r\n\t\treturn retornoCEP;\r\n\t}", "public String ordainketaKudeatu(String ordainketa) {\r\n\t\tString dirua;\r\n\t\tdouble dirua1;\r\n\t\tdouble ordainketa1;\r\n\t\tdirua = deuda();\r\n\t\tordainketa = ordaindu();\r\n\t\tdirua1 = Double.parseDouble(dirua);\r\n\t\tordainketa1 = Double.parseDouble(ordainketa);\r\n\t\tkenketa = kenketa_dirua(dirua1, ordainketa1);\r\n\r\n\t\tSystem.out.println(kenketa);\r\n\t\tif (kenketa == 0.0) {\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t\ttextField.setText(\"0.00\");\r\n\r\n\t\t}\r\n\t\tif (kenketa < 0) {\r\n\t\t\ttextField_2.setText(\"Itzulerak: \" + Math.abs(kenketa));\r\n\t\t\tbtnAurrera.setEnabled(true);\r\n\t\t}\r\n\t\tif (kenketa > 0) {\r\n\t\t\tkenketa = Math.abs(kenketa);\r\n\t\t\ttextField.setText(String.valueOf(kenketa));\r\n\t\t}\r\n\t\treturn ordainketa;\r\n\t}", "private static String criaStringDeSaida(Graph grafo, ArrayList<Integer> busca) {\r\n\t\tint[] ordenaSaida = new int[grafo.getVertexNumber() * 3 + 3];\r\n\r\n\t\tfor (int i = 0; i < busca.size(); i += 3) {\r\n\t\t\tordenaSaida[busca.get(i) * 3] = busca.get(i); // vertice\r\n\t\t\tordenaSaida[busca.get(i) * 3 + 1] = busca.get(i + 1); // nivel\r\n\t\t\tordenaSaida[busca.get(i) * 3 + 2] = busca.get(i + 2); // pai\r\n\t\t}\r\n\r\n\t\tString retorno = \"\";\r\n\r\n\t\tfor (int i = 3; i < ordenaSaida.length; i += 3) {\r\n\t\t\tretorno += ordenaSaida[i] + \" - \" + ordenaSaida[i + 1] + \" \";\r\n\t\t\tif (ordenaSaida[i + 2] == 0) {\r\n\t\t\t\tretorno += \"-\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tretorno += ordenaSaida[i + 2];\r\n\t\t\t}\r\n\r\n\t\t\tretorno += \"\\n\";\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "private static String zzgr(String string2) {\n int n = string2.length();\n StringBuilder stringBuilder = new StringBuilder(n);\n int n2 = 0;\n while (n2 < n) {\n char c = string2.charAt(n2);\n if (c >= ' ' && c <= '~' && c != '\\\"' && c != '\\'') {\n stringBuilder.append(c);\n } else {\n stringBuilder.append(String.format(\"\\\\u%04x\", c));\n }\n ++n2;\n }\n return stringBuilder.toString();\n }", "public String encriptarMensajeArchivo(String mensaje){\n \n String textoEncriptado=\"\";\n \n for (int i = 0; i < mensaje.length(); i++) {\n String letra = mensaje.charAt(i)+\"\";\n System.out.println(letra);\n if(!letra.equals(\" \")){\n for (Map.Entry<String, String> entry : diccionarioEncriptado.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n if(letra.equals(key)){\n textoEncriptado+=value;\n }\n } \n }else{\n textoEncriptado+=\"-\";\n } \n } \n return textoEncriptado;\n }", "public String vystiskniCestu(){\n\t\t\n\t\tString vypis = \"Euleruv tah : \" + cesta.get(cesta.size()-1);\n\t\tfor(int i = cesta.size()-2 ; i >= 0;i--){\n\t\t\tvypis += \" -> \" + cesta.get(i);\n\t\t}\n\t\t\n\t\treturn vypis;\n\t}", "public static void main(String[] args) {\n\n\t\tString cadena1 = \" She sells sea shells on the sea shore \";\n\t\tSystem.out.println(\"Cadena: \" + cadena1);\n\t\t//String cadena2 = \"\"; \n\t\tcadena1 = cadena1.substring(1,10);\n\t\t\n\t\tSystem.out.println(\"Cadena recortada: \" + cadena1);\n\t\t\n\t\t\n\t\t\n\t}", "public String pemangkatan(int bil1, int bil2) {\n return functions.pangkat_2(bil1, bil2) + \"\";\n }", "String getVorlesungKennung();", "private String getDuzMetinSozlukForm(Kok kok) {\n String icerik = kok.icerik();\r\n if (kok.asil() != null)\r\n icerik = kok.asil();\r\n\r\n StringBuilder res = new StringBuilder(icerik).append(\" \");\r\n\r\n // Tipi ekleyelim.\r\n if (kok.tip() == null) {\r\n System.out.println(\"tipsiz kok:\" + kok);\r\n return res.toString();\r\n }\r\n\r\n if (!tipAdlari.containsKey(kok.tip())) {\r\n System.out.println(\"tip icin dile ozel kisa ad bulunamadi.:\" + kok.tip().name());\r\n return \"#\" + kok.icerik();\r\n }\r\n\r\n res.append(tipAdlari.get(kok.tip()))\r\n .append(\" \")\r\n .append(getOzellikString(kok.ozelDurumDizisi()));\r\n return res.toString();\r\n }", "private String quitaEspacios(String cadena) {\n String unspacedString = \"\";\t//Variable donde lee la función\n\n for (int i = 0; i < cadena.length(); i++) {\t//Le quita los espacios a la espresión que leyó\n //Si el caracter no es un espacio lo pone, sino lo quita.\n if (cadena.charAt(i) != ' ') {\n unspacedString += cadena.charAt(i);\n }\n }\n\n return unspacedString;\n }", "@Test\n\tpublic void testToString2() {\n\t\t\n\t\tString saideira = \"3 - sono infinito\";\n\t\tassertEquals(contato2.toString2(), saideira);\n\t}", "public static void main(String[] args) {\n String[] Ime={\"Marko\", \"Petar\", \"Milan\"};\n String[] Prezime= {\"Markovic\", \"Petrovic\",\"Milanovic\"}; \n \n // kratka forma for petlje\n // ovo ce biti dovoljno za sad\n for(int i=0;i<Ime.length;i++){ \t \n \n \t\t \tSystem.out.println(Ime[i]+\" \"+Prezime[i]);\n \t \n }\n \n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString name=\"Merzet\";\n\t\t\n\t\t//rze\n\t\tSystem.out.println( name.substring(2, 5));\n\t\t\n\t\t//System.out.println(name.substring(5,1)); wrong\n\t\t\n\t\t//System.out.println( name.substring(1, 10));wrong no 10 letters Merzet\n\t\t\n\t\tSystem.out.println( name.substring(1, 6)); //answer erzet sebabi o dan baslap sanayar\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main (String args []) {\n\r\n String str = \"\\\"क\\\", \\\"का\\\", \\\"कि\\\", \\\"की\\\", \\\"कु\\\", \\\"कू\\\", \\\"के\\\", \\\"कै\\\", \\\"को\\\", \\\"कौ\\\", \\\"कं\\\", \\\"क:\\\"\" ;\r\n String strEng = \"\\\"ka\\\", \\\"kā\\\", \\\"ki\\\", \\\"kī\\\", \\\"ku\\\", \\\"kū\\\", \\\"kē\\\", \\\"kai\\\", \\\"ko\\\", \\\"kau\\\", \\\"kṁ\\\", \\\"ka:\\\"\" ;\r\n\r\n String additionalConsonants = \"\\\"क़\\\", \\\"क़ा\\\", \\\"क़ि\\\", \\\"क़ी\\\", \\\"क़ु\\\", \\\"क़ू\\\", \\\"क़े\\\", \\\"क़ै\\\", \\\"क़ो\\\", \\\"क़ौ\\\", \\\"क़ं\\\", \\\"क़:\\\"\"; \r\n String additionalConsonantsEng = \"\\\"qa\\\", \\\"qā\\\", \\\"qi\\\", \\\"qī\\\", \\\"qu\\\", \\\"qū\\\", \\\"qē\\\", \\\"qai\\\", \\\"qo\\\", \\\"qau\\\", \\\"qṁ\\\", \\\"qa:\\\"\" ;\r\n\r\n //String str = \"क, का, कि, की, कु, कू, के, कै, को, कौ, कं, क:\" ;\r\n \r\n \r\n \r\n //generateNP(str);\r\n //generateEN(strEng);\r\n //System.out.println();\r\n generateNPAdditionalConsonants(additionalConsonants);\r\n generateENAdditionalConsonants(additionalConsonantsEng);\r\n\r\n\r\n\r\n }", "public static String duplicaApostrofi(String input) {\r\n \t\r\n \tString result = input;\r\n \tint massimo = result.length() - 1;\r\n \tchar apice = '\\'';\r\n \t\r\n \tfor (int i = 0; i <= massimo; i++) {\r\n \t\tif (result.charAt(i) == apice ) {\r\n \t\t\tresult = result.substring(0, i+1) + apice + result.substring(i+1);\r\n \t\t\tmassimo++;\r\n \t\t\ti++;\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn result;\r\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\r\n\t\t// uzimamo unos od korisnika\r\n\t\tSystem.out.print(\"Unesite prvi string: \");\r\n\t\tString str1 = input.nextLine();\r\n\t\tSystem.out.print(\"Unesite drugi string: \");\r\n\t\tString str2 = input.nextLine();\r\n\r\n\t\t// zatvaramo scanner\r\n\t\tinput.close();\r\n\r\n\t\tif (str1.contains(str2)) {\r\n\t\t\t// ako prvi string sadrzi drugi string ispisujemo odgovarajucu\r\n\t\t\t// poruku\r\n\t\t\tSystem.out.println(\"'\" + str2 + \"' je substring '\" + str1\r\n\t\t\t\t\t+ \"' stringa.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"String '\" + str2 + \"' nije substring '\" + str1\r\n\t\t\t\t\t+ \"' stringa.\");\r\n\t\t}\r\n\r\n\t}", "public static String formatar(String str, String mascara) throws ParseException {\n if (Util.isNullOuVazio(str)) {\n return null;\n }\n /*\n * Caracteres de pontuacao da mascara (escapeados): ()/\\.,;:-_ (espaco) Se for necessario, basta incluir outro caracter\n */\n\n StringBuffer resultado = new StringBuffer();\n\n String mascaraReduzida = mascara.replaceAll(MascaraUtil.PONTUACAO, \"\").substring(0, str.length());\n\n for (int i = 0; i < mascaraReduzida.length(); i++) {\n char m = mascaraReduzida.charAt(i);\n char s = str.charAt(i);\n\n if (m == MascaraUtil.DIGITO && Character.isDigit(s)) {\n resultado.append(s);\n } else if ((m == MascaraUtil.LETRA || m == MascaraUtil.LETRA_CAIXA_ALTA || m == MascaraUtil.LETRA_CAIXA_BAIXA) && Character.isLetter(s)) {\n if (m == MascaraUtil.LETRA_CAIXA_ALTA) {\n resultado.append(Character.toUpperCase(s));\n } else if (m == MascaraUtil.LETRA_CAIXA_BAIXA) {\n resultado.append(Character.toLowerCase(s));\n } else {\n resultado.append(s);\n }\n } else if (m == MascaraUtil.ALFANUMERIFCO && Character.isLetterOrDigit(s)) {\n resultado.append(s);\n } else {\n throw new ParseException(\"Valor invalido para a posicao \" + i + \" da mascara.\", i);\n }\n }\n\n for (int i = 0; i < resultado.length(); i++) {\n char m = mascara.charAt(i);\n if (Pattern.matches(MascaraUtil.PONTUACAO, Character.toString(m))) {\n resultado.insert(i, m);\n }\n }\n\n return resultado.toString();\n }", "public static void main(String[] args) {\n\t\tScanner ip = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Welcome to the Katapayadi Wizard! Enter the 1st syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString F = ip.nextLine();\r\n\t\tSystem.out.println(\"Great! Now enter the 2nd syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString S = ip.nextLine();\r\n\t\t//int firstIndex; \r\n\t\t\r\n\t\tString [] [] alphabets = {{\"nya\", \"ka\", \"kha\", \"ga\", \"gha\", \"nga\", \"cha\", \"ccha\", \"ja\", \"jha\"}, \r\n\t\t\t\t\t\t\t\t {\"na\", \"ta\", \"tah\",\"da\", \"dah\", \"nna\", \"tha\", \"ttha\", \"dha\", \"ddha\"},\r\n\t\t\t\t\t\t\t\t {\"null\",\"pa\", \"pha\",\"ba\",\"bha\",\"ma\", \"null\", \"null\", \"null\", \"null\", },\r\n\t\t\t\t\t\t\t\t {\"null\",\"ya\", \"ra\", \"la\", \"va\", \"se\", \"sha\", \"sa\", \"ha\",\"null\"}};\r\n\t\t\r\n\t\tint firstNum = getFirstIndex(alphabets, F);\r\n\t\tint secondNum = getSecondIndex(alphabets, S); \r\n\t\tint finalIndex = concat(firstNum, secondNum);\r\n\t\t\r\n\t\tString swaras1= swaraSthanam1(finalIndex);\r\n\t\t//String finalanswer = The [index]th melakartha: aro [swaras1] and ava [swaras2].\r\n\t\tSystem.out.println(firstNum);\r\n\t\tSystem.out.println(secondNum);\r\n\t\t\r\n\t\tSystem.out.println(finalIndex);\r\n\t\t\r\n\t\tSystem.out.println(swaras1);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n String frase;\n String frase2 = \"\";//debe ser inicializada\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Ingrese una frase\");\n frase = sc.nextLine();\n\n int i = 0;\n\n while (i < frase.length()) {//ou con for et if y else, los i++ estarian solo en el for\n if (frase.charAt(i) != ' ') {\n frase2 = frase2.concat(frase.substring(i, i + 1));\n } else {//el else solo pedia tranformar los espacios en alterisco que se hace solo con\n frase2 = frase2.concat(\"*\");//esto//y esto\n while (frase.charAt(i) == ' ') {\n i++;\n }\n frase2 = frase2.concat(frase.substring(i, i + 1));\n }\n i++;\n }//faltaria una primera condicion como en los 2 ejercicios precedentes pa que no imprima asteriscos antes de la 1era letra\n System.out.println(frase2);\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public String toString() {\n\t\treturn \"Kori \" + malli + \". Omenien yhteispaino: \" + Omena.kokopaino +\"g.\\n\"\r\n\t\t\t\t+ \"Omenia korissa \" + Omena.nimi +\", \"+Omena.paino;\r\n\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tString[] PrviNiz = {\"Vasa\", \"vana plurimum\", \"sonant\"};\r\n\t\tString[] DrugiNiz = new String[4];\r\n\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tfor (int i = 0; i < DrugiNiz.length; i++) {\r\n\r\n\t\t\tSystem.out.println(\"Unesite string za \"+ i +\" element niza: \");\r\n\t\t\tDrugiNiz[i] = sc.nextLine();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(PrviNiz[0] + \" \" + PrviNiz[1] + \" \" + PrviNiz[2]);\r\n\t\tfor (int i = 0; i < DrugiNiz.length; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(DrugiNiz[i]);\r\n\r\n\t\t}\r\n\t}", "public String splitAdresse(String adresse) {\n String[] array = adresse.split(\" \");\n adresse = \"\";\n int i = 0;\n for (String morceau : array) {\n morceau = Normalizer.normalize(morceau, Normalizer.Form.NFD).replaceAll(\"\\\\p{InCombiningDiacriticalMarks}+\", \"\"); // On enlève tous les accents\n adresse = adresse + morceau;\n if (i < array.length - 1) adresse = adresse + \"+\";\n i++;\n }\n return adresse;\n }", "private static String interpretujWyraz(final String wyraz) {\r\n\t\tStringBuilder wynik = new StringBuilder(wyraz);\r\n\t\tif (wyraz.length() > 1) {\r\n\t\t\tif (wyraz.charAt(0) == '\\\\') {\r\n\t\t\t\twynik.deleteCharAt(0);\r\n\t\t\t} else if ((wyraz.charAt(0) == '\\'')\r\n\t\t\t\t\t&& (wyraz.charAt(wyraz.length() - 1) == '\\'')) {\r\n\t\t\t\twynik.deleteCharAt(0);\r\n\t\t\t\twynik.deleteCharAt(wynik.length() - 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn wynik.toString();\r\n\t}", "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "@Override\r\n\tpublic String desencriptar(String string) {\n\r\n\t\tString palabra = string;\r\n\t\tString[] parts = string.split(\",\");\r\n String newName=\"\";\r\n for (int i = 0; i < parts.length; i++) {\r\n // instrucción switch con tipo de datos int\r\n switch (parts[i]) \r\n {\r\n case \"1\" : newName+=\"a\";\r\n break;\r\n case \"2\" : newName+=\"b\";\r\n break;\r\n case \"3\" : newName+=\"c\";\r\n break;\r\n case \"4\" : newName+=\"d\";\r\n break;\r\n case \"5\" : newName+=\"e\";\r\n break;\r\n case \"6\" : newName+=\"f\";\r\n break;\r\n case \"7\" : newName+=\"g\";\r\n break;\r\n case \"8\" : newName+=\"h\";\r\n break;\r\n case \"9\" : newName+=\"i\";\r\n break;\r\n case \"10\" : newName+=\"j\";\r\n break;\r\n case \"11\" : newName+=\"k\";\r\n break;\r\n case \"12\" : newName+=\"l\";\r\n break;\r\n case \"13\" : newName+=\"m\";\r\n break;\r\n case \"14\" : newName+=\"n\";\r\n break;\r\n case \"15\" : newName+=\"ñ\";\r\n break;\r\n case \"16\" : newName+=\"o\";\r\n break;\r\n case \"17\" : newName+=\"p\";\r\n break;\r\n case \"18\" : newName+=\"q\";\r\n break;\r\n case \"19\" : newName+=\"r\";\r\n break;\r\n case \"20\" : newName+=\"s\";\r\n break;\r\n case \"21\" : newName+=\"t\";\r\n break;\r\n case \"22\" : newName+=\"u\";\r\n break;\r\n case \"23\" : newName+=\"v\";\r\n break;\r\n case \"24\" : newName+=\"w\";\r\n break;\r\n case \"25\" : newName+=\"x\";\r\n break;\r\n case \"26\" : newName+=\"y\";\r\n break;\r\n case \"27\" : newName+=\"z\";\r\n break;\r\n case \"0\" : newName+=\" \";\r\n break;\r\n case \"28\" : newName+=\" \";\r\n break;\r\n \r\n \r\n }\r\n \r\n }\r\n \r\n return newName ;\r\n\t}", "public String ocurrencia() {\n String palabra = \"\";\n int retorno = 0;\n for (int i = 0; i < getCadena().length(); i++) {\n\n if ((getCadena().charAt(i) == ' ') || (i > getCadena().length() - 2)) {\n if (palabra.equals(getBuscar())) {\n retorno++;\n palabra = \"\";\n } else {\n palabra = \"\";\n }\n\n } else {\n palabra += getCadena().charAt(i);\n\n }\n }\n return (\"La cantida de ocurrencias son de:\" + '\\n' + retorno);\n }", "public String toString2 () {\n\t\tString a = \"ChampionnatComplexe : [\";\n\t\ta = a + \" { ( \" ;\n\t\tfor ( int i = 0 ; i < 3 ; i++ ) {\n\t\t\ta = a + grpA1 [i] +\" \" ;\n\t\t}\n\t\ta = a + \") ( \" ;\n\t\tfor ( int i = 0 ; i < 3 ; i++ ) {\n\t\t\ta = a + grpA2 [i] +\" \" ;\n\t\t}\n\t\ta = a + \") } { ( \" ;\n\t\tfor ( int i = 0 ; i < 3 ; i++ ) {\n\t\t\ta = a + grpB1 [i] +\" \" ;\n\t\t}\n\t\ta = a + \") ( \" ;\n\t\tfor ( int i = 0 ; i < 3 ; i++ ) {\n\t\t\ta = a + grpB2 [i] +\" \" ;\n\t\t}\n\t\ta = a + \") } ] \\n\" ;\n\t\ta = a + \"\\tNote Equilibre:\\t\"+this.getNoteEquilibre()+\"\\n\" ;\n\t\ta = a + \"\\tNote Distance:\\t\"+this.getNoteDistance()+\"\\n\" ;\n\t\ta = a + \"\\tMoyenne pondérée:\\t\" +getNoteMoyennePondereeEqDist()+\" (coefDist=\"+opt.getPourcentageDistance()+\", coefEq=\"+(100-opt.getPourcentageDistance())+\")\\n\" ;\n\t\treturn a;\n\t}", "public static void mesajiSenVer(String mesaj){\n System.out.println(mesaj);\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Lütfen adinizi giriniz\");\n\t\tString isim=scan.next();\n\t\t\n\t\tSystem.out.println(\"Lütfen soyadinizi giriniz\");\n\t\tString soyisim=scan.next();\n\t\t\n\t\tSystem.out.println(\"Lütfen kart numaranizi giriniz\");\n\t\tString kart=scan.next();\n\t\t\n\t\tchar isimIlkHarf=isim.toUpperCase().charAt(0);\n\t\tString isimGeriKalan=isim.substring(1).replaceAll(\"\\\\w\", \"*\");\n\t\tString soyisimIlkHarf=soyisim.toUpperCase().substring(0, 1);\n\t\tString soyisimGeriyeKalan=soyisim.substring(1).replaceAll(\"\\\\w\", \"*\");\n\t\tString kartIlk=\"**** **** **** \";\n\t\tString kartSon=kart.substring(kart.length()-4);\n\t\t\n\t\tSystem.out.println(\"Adiniz ve Soyadiniz: \"+isimIlkHarf+isimGeriKalan+\" \"+soyisimIlkHarf+soyisimGeriyeKalan);\n\t\tSystem.out.println(\"Kart Numarasi: \"+kartIlk+kartSon);\n\t\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private CharSequence replacewithSan(String uni1, String myString2) {\n try {\n JSONArray rule_array = new JSONArray(uni1);\n int max_loop = rule_array.length();\n myString2 = myString2.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString2 = myString2.replaceAll(from, to);\n myString2 = myString2.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n myString2 = myString2.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString2;\n }", "public abstract String dohvatiKontakt();", "public String makeKey ()\n {\n String stop = \"*\"; // default\n\n if (stopFormat.length() > 0)\n stop = String.valueOf(stopFormat.charAt(0));\n\n key = \"<BR>\";\n\n if (code.equals(\"Standard\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><B><FONT COLOR=red>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Drosophila Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Vertebrate Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Yeast Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Mold Protozoan Coelenterate Mycoplasma Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Invertebrate Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Ciliate Dasycladacean Hexamita Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Echinoderm Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Euplotid Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n }\n\n else if (code.equals(\"Bacterial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>I L M V</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Alternative Yeast Nuclear\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M S</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Ascidian Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else if (code.equals(\"Flatworm Mitochondrial\"))\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n else\n {\n key += (\"<HR><B>Key:</B><BR>Start: <TT><FONT COLOR=red><B>M</B></FONT></TT>\" +\n \"<BR>Stop: <TT><FONT COLOR=blue><B>\" + stop + \"</B></FONT></TT>\");\n\n }\n\n if (unknownStatus == 1)\n key += (\"<BR>Unknown codon: <TT><FONT COLOR=#ff6633><B>u</B></FONT><BR></TT>\");\n\n\n return (key + \"<HR>\");\n\n}", "public Papagaj(String meno, int pocetKoncatin, double vaha, String farba) {\r\n super(\"Papagaj\", \"Voliera\", pocetKoncatin); // volanie konstruktora predka\r\n this.meno = meno; // nastavenie nazvu zivocicha\r\n this.farba = farba; // nastavenie farby\r\n this.vaha = vaha; // nastavenie vahy\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}", "private CharSequence replacewithUni(String uni1, String myString2) {\n\t\ttry {\n JSONArray rule_array = new JSONArray(uni1);\n int max_loop = rule_array.length();\n\n myString2 = myString2.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString2 = myString2.replaceAll(from, to);\n myString2 = myString2.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\t\tmyString2 = myString2.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString2;\n }", "public String apavada_prakruti_bhava(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 3**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n // 249\n if (VowelUtil.isPlutanta(X_anta) && X_adi.equals(\"iti\"))\n {// checked:29-6\n\n return_me = prakruti_bhava(X_anta, X_adi) + \", \" + utsarga_sandhi(X_anta, X_adi) + \"**\";\n ;\n /*\n * sandhi_notes = usg1 + sandhi_notes + \"\\nRegular Sandhis which\n * were being blocked by \" + \"pluta-pragRRihyA-aci-nityam(6.1.121)\n * are allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\" + \"\\n\" +\n * usg2 ;\n * \n * sandhi_notes+= Prkr + apavada + depend + sutra +\n * \"pluta-pragRRihyA aci nityam' (6.1.121)\" + \"\\nCondition: Only if\n * String 1 is a Vedic Usage(Arsha-prayoga)\";\n * \n * //This note below goes after the Notes returned fropm\n * utsarga_sandhi above String cond1 = \"\\nRegular Sandhis which were\n * being blocked by \" + \"'pluta-pragRRihyA-aci-nityam'(6.1.121) are\n * allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\";\n * vowel_notes.append_condition(cond1); ;\n */\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"Prakruti Bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pluta-ending word or a pragRRihya followed by any Vowel result in Prakruti bhava sandhi.\\n\" + \"<pluta-ending> || pragRRihya + vowel = prakruti bhava.\";\n comments.setConditions(cond1);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.2.125\");\n comments.setSutraPath(\"apluta-vadupasthite\");\n comments.setSutraProc(\"utsargic Sandhis Unblocked\");\n comments.setSource(Comments.sutra);\n String cond2 = depend + \"According to 6.1.121 plutantas followed by Vowels result in prakruti-bhaava\\n\" + \"However if the word 'iti' used is non-Vedic, then regular sandhis block 6.1.121.\";\n\n comments.setConditions(cond2);\n\n }\n\n // 250\n else if ((X_anta.endsWith(\"I3\") || X_anta.endsWith(\"i3\")) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 250\");\n return_me = utsarga_sandhi(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n /*\n * sandhi_notes += apavada + sutra + \"'I3 cAkravarmaNasya'\n * (6.1.126)\" + \"Blocks 'pluta-pragRRihyA aci nityam' (6.1.121)\";\n */\n // vowel_notes.start_adding_notes();\n // vowel_notes.set_sutra_num(\"6.1.126\") ;\n // vowel_notes.setSutraPath(\"I3 cAkravarmaNasya\") ;\n // vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n // vowel_notes.set_source(tippani.sutra) ;\n String cond1 = \"According to chaakravarman pluta 'i' should be trated as non-plutanta.\\n\" + \"Given in Panini Sutra 'I3 cAkravarmaNasya' (6.1.126). This sutra allows General Sandhis to operate by blocking\" + \"'pluta-pragRRihyA aci nityam' (6.1.121)\";\n comments.append_condition(cond1);\n\n }\n // prakrutibhava starts\n // 233-239 Vedic Usages\n // 243 : error (now fixed) shivA# isAgacha printing as sh-kaar ha-kaar\n // ikaar etc should be shakaar ikaar\n // **********ELSE IF****************//\n else if ((VowelUtil.isPlutanta(X_anta) || this.pragrhya == true) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using Vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 243\");\n return_me = prakruti_bhava(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n // sandhi_notes = Prkr + sutra + \"pluta-pragRRihyA aci nityam'\n // (6.1.121)\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"prakruti bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pragRRihyas or plutantas followed by any vowel result in NO SANDHI which is prakruti bhava\"; // Fill\n // Later\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && adi.equals(\"indra\")) // Avan~Na Adesh\n {// checked:29-6\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me = guna_sandhi(avang_adesh, X_adi);\n // We have to remove guna_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.120\");\n comments.setSutraPath(\"indre ca\");\n comments.setSutraProc(\"ava~nga Adesha followed by Guna Sandhi\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Blocks Prakruti Bhava, and Ayadi Sandhi.\\n go + indra = go + ava~N + indra = gava + indra = gavendra.\"; // Fill\n // Later\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 241 242 Vik.\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && VowelUtil.isAjadi(X_adi))\n {// checked:29-6\n\n return_me = utsarga_sandhi(X_anta, X_adi); //\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me += \", \" + utsarga_sandhi(avang_adesh, X_adi);\n\n // We have to remove utsarga_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.119\");\n comments.setSutraPath(\"ava~N sphoTayanasya\");\n comments.setSutraProc(\"ava~nga Adesha followed by Regular Vowel Sandhis\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"View Only Supported by Sphotaayana Acharya.\\n\" + \"padanta 'go' + Vowel gets an avana~N-adesh resulting in gava + Vowel.\"; // Fill\n // Later...filled\n comments.setConditions(cond1);\n\n if (X_adi.startsWith(\"a\"))\n {\n return_me += \", \" + prakruti_bhava(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.118\");\n comments.setSutraPath(\"sarvatra vibhaaSaa goH\");\n comments.setSutraProc(\"Optional Prakruti Bhava for 'go'(cow)implying words ending in 'e' or 'o'.\");\n comments.setSource(Comments.sutra);\n String cond2 = \"Padanta Dependency. Prakruti bhava if 'go' is followed by any other Phoneme.\"; // Fill\n // Later\n comments.setConditions(cond2);\n\n return_me += \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond3 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond3);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n // 243\n\n // 244\n\n // 246 -250 , 253-260\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA3s**********\");\n\n return return_me; // apavada rules formulated by Panini\n }", "public static void main(String[] args){\r\n String first = \"jin\";\r\n String last = \"jung\";\r\n String ay = \"ay\";\r\n/*\r\n use substring() and toUpperCase methods to reorder and capitalize\r\n*/\r\n\r\n String letFirst = first.substring(0,1);\r\n String capFirst = letFirst.toUpperCase();\r\n String letLast = last.substring(0,1);\r\n String capLast = letLast.toUpperCase();\r\n\r\n String nameInPigLatin = first.substring(1,3) + capFirst + ay + \" \" + last.substring(1,4) + capLast + ay;\r\n\r\n/*\r\n output resultant string to console\r\n*/\r\n\r\n System.out.println(nameInPigLatin);\r\n\r\n }", "public static String formatearRut(String rut){\r\n int cont = 0;\r\n String format;\r\n rut= rut.replace(\".\", \"\");\r\n rut = rut.replace(\"-\", \"\");\r\n format= \"-\" + rut.substring(rut.length()-1);\r\n for(int i = rut.length()-2; i>=0;i--){\r\n format=rut.substring(i,i+1)+format;\r\n cont++;\r\n if(cont==3 && i!=0){\r\n format= \".\"+format;\r\n cont=0;\r\n }\r\n }\r\n return format;\r\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public String pemangkatan(double bil1, double bil2) {\n return functions.pangkat(bil1, bil2) + \"\";\n }", "public String getResultadostring(){\n\t\tif (golesEquipo1>golesEquipo2){\n\t\t\treturn equipo1;\n\t\t}else if (golesEquipo1<golesEquipo2){\n\t\t\treturn equipo2;\n\t\t}\n\t\treturn \"a\";\n\t}", "private void dodajEpsilonPrijelaz(int pocetno, int sljedece) {\n String key = pocetno + \",$$\";\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + new Integer(sljedece).toString();\n prijelazi.put(key, value);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"문자를 입력하세요: \");\t\t\n\t\tString i = sc.next();\n\t\tString k=\"\";\t\t//초기화\n\t\tSystem.out.println(\"문자는: \"+i); \n\t\t\n\t\tint l = i.length();\t\t\n\t\tSystem.out.println(\"길이는: \"+l); \n\t\t\n\t\tString str_array[]= new String[l];\n\t\t\n\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\n\t\t\t str_array[j] = i.substring(j, j+1);\n\t\t\t \n\t\tSystem.out.println(str_array[j]);\n\t\t\t}\n\t\t\n\t\tfor(int m=0 ; m<l ; m++) {\n\t\t k += str_array[m];\n\t\t}\n\t\t\n\t\tSystem.out.println(k);\n\t}", "private String Interpretar(String num) {\r\n\t\tif(num.length() > 3)\r\n\t\t\treturn \"\";\r\n\t\tString salida=\"\";\r\n\t\t\r\n\t\tif(Dataposi(num,2) != 0)\r\n\t\t\tsalida = Centenas[Dataposi(num,2)-1];\r\n\t\t\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(num,1))+String.valueOf(Dataposi(num,0)));\r\n\r\n\t\tif(k <= 20)\r\n\t\t\tsalida += Numero[k];\r\n\t\telse {\r\n\t\t\tif(k > 30 && Dataposi(num,0) != 0)\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + \"Y \" + Numero[Dataposi(num,0)];\r\n\t\t\telse\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + Numero[Dataposi(num,0)];\r\n\t\t}\r\n\t\t//Caso especial con el 100\r\n\t\tif(Dataposi(num,2) == 1 && k == 0)\r\n\t\t\tsalida=\"CIEN\";\r\n\t\t\r\n\t\treturn salida;\r\n\t}", "public SenzorTlakaZraka(String mjernaJedinica, byte preciznost, String opis) {\r\n\t\tsuper(mjernaJedinica, preciznost);\r\n\t\tthis.opis = opis;\r\n\r\n\t}", "public String make_hrasvanta(String s1)\n {\n String return_me = s1;\n if (!VowelUtil.isAjanta(s1)) Log.info(\"ERROR: not a Vowel.Cant make hrasvanta\");\n\n String stripped = VarnaUtil.stripAntyaVarna(s1);\n\n if (VowelUtil.isAkaranta(s1))\n return_me = stripped + \"a\";\n else if (VowelUtil.isIkaranta(s1))\n return_me = stripped + \"i\";\n else if (VowelUtil.isUkaranta(s1))\n return_me = stripped + \"u\";\n else if (VowelUtil.isRRikaranta(s1)) return_me = stripped + \"f\";\n\n return return_me;\n\n }", "public String ingresarUbigeo24() {\n\t\t\tlog.info(\"ingresarUbigeo :D a --- \" + idUbigeo);\r\n\t\t\tIterator it = comboManager.getUbigeoDeparItems().entrySet().iterator();\r\n\t\t\tIterator it2 = comboManager.getUbigeoProvinItems().entrySet().iterator();\r\n\t\t\tIterator it3 = comboManager.getUbigeoDistriItems().entrySet().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it.next();\r\n\t\t\tlog.info(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idDepartamento24)) {\r\n\t\t\tubigeoDefecto24 = (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo depa \" + ubigeoDefecto24);\r\n\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\twhile (it2.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it2.next();\r\n\t\t\tlog.info(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idProvincia24)) {\r\n\t\t\tubigeoDefecto24 += \"- \" + (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo prov \" + ubigeoDefecto24);\r\n\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\twhile (it3.hasNext()) {\r\n\t\t\tMap.Entry e = (Map.Entry) it3.next();\r\n\t\t\tlog.info(\"key \" + e.getKey() + \" value \" + e.getValue());\r\n\t\tif (e.getValue().toString().equals(idUbigeo+\"\")) {\r\n\t\t\tubigeoDefecto24 += \"- \" + (String) e.getKey();\r\n\t\t\tlog.info(\"ubigeo distrito \" + ubigeoDefecto24);\r\n\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tlog.info(\"ubigeo ------> :D \" + ubigeoDefecto);\r\n\t\treturn getViewMant();\r\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.print(\"Unesi ime: \");\n\t\tScanner unos = new Scanner(System.in);\n\t\tString ime = unos.next();\n\t\t\n\t\t//prvi red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t System.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//drugi red crtica\n\t\tSystem.out.println(\": : : TABLICA MNOZENJA : : :\");\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tSystem.out.print(\" * |\");\n\t\tfor(int j=1;j<=9;j++){\n\t\t\tSystem.out.printf(\"%3d\",j);\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//treci red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tfor(int i=1;i<=9;i++){\n\t\t\tSystem.out.printf(\"%2d |\",i);\n\t\t\tfor(int j=1;j<=9;j++){\n\t\t\t\tSystem.out.printf(\"%3d\",i*j);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//cetvrti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int k=0;k<8;k++){\n\t\t\tSystem.out.printf(\": \");\n\t\t}\n\t\tSystem.out.print(\":by \"+ime);\n\t\tSystem.out.println();\n\t\t\n\t\t//peti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\tunos.close();\n\t}", "void LoesungAusgeben (String strA) { createOutput ()\n //\n // println(\"strA = \"+strA);\n //\n String[] list1 = { \n strA\n };\n list1=split(strA, ',');\n // now write the strings to a file, each on a separate line\n // saveStrings (\"c:\\\\soft\\\\SolProcess\\\\result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n // saveStrings (\"result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n saveStrings (\"result.txt\", list1);\n}", "public void dodajPrijelaz(int pocetno, int sljedece, String s) {\n String key = pocetno + \",\" + s;\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + Integer.toString(sljedece);\n prijelazi.put(key, value);\n }\n }", "@Test(expected = NemaKonfiguracije.class)\n public void testUcitajKonfiguraciju_String() throws Exception {\n System.out.println(\"ucitajKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.ucitajKonfiguraciju(datKonf.getName());\n }", "public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}", "@Test \n\tpublic void testToString() {\n\t\t\n\t\tString saida = \"decio neto - 56554522\";\n\t\tassertEquals(contato1.toString(), saida);\n\t}", "public void setKota1(String tempatKerja) {\n\t\t\n\t}", "public static void main (String[] args)\n\t{\n\t\tString bat;\n\t\tString bi;\n\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"\\n Intruoduce el el primer string: \");\n\t\tbat = sc.nextLine();\n\n\t\n\t\tSystem.out.print(\"\\n Introduce el segundo string: \");\n\t\tbi = sc.nextLine();\n\n\n\n\t\t// con el siguiente objeto concatena el string bat con el string 2\n \t\tString concatenado = bat.concat(bi);\n \t\tSystem.out.println(\"\\n El texto concatenado es: \" + concatenado);\n\n\t\t\n\t\t// para imprimir los dos strings ya concatenados\n\t\tSystem.out.println(\"\\n Primer valor de la cadena concatenada: \" + concatenado);\n\t\t\n\n\t\t//para convertir en mayusculas o minusculas los caracteres del string\n\t\tString minus = concatenado.toLowerCase();\n\t\tString mayus = concatenado.toUpperCase();\n\n\t\tSystem.out.print(\"lo concatenado en minuscula: \" + minus);\n\t\tSystem.out.print(\"\\nlo concatenado en mayuscula: \" + mayus);\n\n\n\n\n\n\t\t//para comparar los dos Strings si son iguales da igual mayuscula o minuscula\n\t\tif (bat.equalsIgnoreCase(bi) ) // igual con mayuscula y minusculas bat.equals(bi)\n\t\t\tSystem.out.println(\"\\nLos dos strings son iguales\");\n\t\telse\n\t\t\tSystem.out.println(\"\\nlos dos strings son diferentes\");\n\n\t\t//si el string esta vacio para ello lo escrito por teclado tiene que ser de tipo nextLine\n\t\tif (bat.isEmpty())\n\t\t\tSystem.out.println(\"el string bat esta vacio\");\n\n\t\tif (bi.isEmpty())\n\t\t\tSystem.out.println(\"el string bi esta vacio\");\n\n\t\t//para convertir datos de cualquier tipo a string\n\t\tSystem.out.print(\"\\n Intruoduce un numero para convertirlo a string \");\n\t\tint zenbaki = sc.nextInt();\n\n\t\tString berria = String.valueOf(zenbaki);\n\t\tSystem.out.print(zenbaki);\n\t\t\n\n\t\t\n\t\t\t\n\t}", "public String ingresarLetra(String letra, String palabra)throws MyException{\n String respuesta=\"\";\n if(Integer.toString(1).equals(letra)||Integer.toString(2).equals(letra)||Integer.toString(3).equals(letra)||Integer.toString(4).equals(letra)||Integer.toString(5).equals(letra)||Integer.toString(6).equals(letra)||Integer.toString(7).equals(letra)||Integer.toString(8).equals(letra)||Integer.toString(9).equals(letra)||Integer.toString(0).equals(letra)||letra.equals(letra.toUpperCase())){\n throw new MyException(\"Debe ingresar una letra en minúsculas(a-z)\");\n }else{\n if(palabra.contains(letra)){\n if(this.palabra.contains(\"-\")){\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n }else{\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n this.palabra=respuesta;\n }\n }else{\n respuesta=this.ocultarPalabra(this.palabra);\n this.oportunidades-=1;\n try{\n this.cambiarEstadoImagen();\n }\n catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"No se pudo actualizar la imagen del ahorcado :(\\n\\n Imagen no encontrada\");\n }\n }\n return respuesta;\n }\n }", "public final String deu() {\n String str;\n AppMethodBeat.i(26738);\n String str2 = \"\";\n synchronized (this) {\n try {\n if (this.iPr == null || this.iPr.size() <= 0) {\n str = \"\";\n } else {\n int i = 0;\n while (i < this.iPr.size()) {\n com.tencent.mm.plugin.wenote.model.a.c cVar = (com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i);\n switch (cVar.getType()) {\n case -1:\n str = str2 + \"<hr/>\";\n break;\n case 1:\n i iVar = (i) cVar;\n if (!bo.isNullOrNil(iVar.content)) {\n str2 = str2 + iVar.content;\n if (i + 1 < this.iPr.size() && ((com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i + 1)).getType() == 1 && !bo.isNullOrNil(((i) this.iPr.get(i + 1)).content)) {\n str = str2 + \"<br/>\";\n break;\n }\n }\n str = str2 + \"<br/>\";\n break;\n case 2:\n str = str2 + dO(((f) cVar).uOo, 2);\n break;\n case 3:\n str = str2 + dO(((g) cVar).uOo, 3);\n break;\n case 4:\n l lVar = (l) cVar;\n str = str2 + dO(lVar.uOo, lVar.getType());\n break;\n case 5:\n str = str2 + dO(((d) cVar).uOo, 5);\n break;\n case 6:\n str = str2 + dO(((k) cVar).uOo, 6);\n break;\n case 20:\n str = str2 + dO(((com.tencent.mm.plugin.wenote.model.a.b) cVar).uOo, 20);\n break;\n default:\n str = str2;\n break;\n }\n i++;\n str2 = str;\n }\n str = str2.replaceAll(IOUtils.LINE_SEPARATOR_UNIX, \"<br/>\");\n AppMethodBeat.o(26738);\n }\n } finally {\n while (true) {\n AppMethodBeat.o(26738);\n }\n }\n }\n return str;\n }", "@Test\r\n\tpublic void testGetString() {\r\n\t\tString s = lattice1.getString();\r\n\t\tString ss = \"[10. 6. 4.](12.328828005937952)\"\r\n\t\t\t\t+ \"[7. 11. 5.](13.96424004376894)\"\r\n\t\t\t\t+ \"[6.8 -4. -9.](11.968291440301744)\";\r\n\t\tAssert.assertEquals(\"getString\", s, ss);\r\n\t}", "public static void main(String[] args) {\n\t\t//int num = 1;\n\t\t//String nombre = \"Daniel\";\n\t\t//String resultado = (num > 0)?nombre:\"\";\n\t\tString uno = \"ABRAZADERA OMEGA\";\n\t\tString dos = \"DE 2\\\"\";\n\t\tString datos = (uno.equals(dos))?uno:uno+\" \"+dos;\n\t\tSystem.out.println(datos);\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "String mo3176a(String str, String str2);", "public static void main(String[] args) {\r\n\t\tString mens = String.format( \"Se puede maquetar un string incluyendo %s internos\", \"elementos\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"Los elementos %s y %s se referencian en el mismo orden\", \"uno\", \"dos\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"O se pueden cambiar poniendo su posición y $: %2$s y %1$s\", \"uno\", \"dos\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"Observa que tras la cadena de formateo se pueden indicar 'n' parámetros: %s, %s, %s, %s...\", \"uno\", \"dos\", \"tres\", \"cuatro\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"Los formateadores más habituales son 3. El primero es s para strings: %%s %s\", \"= string\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tSystem.out.println( \" (Observa cómo para indicar un % en el string de formato tienes que poner dos (%%)\" );\r\n\t\tSystem.out.println( \"Y cada formateador tiene modificadores.\" );\r\n\t\tmens = String.format( \" Por ejemplo la longitud con un número n rellena a blancos %%10s -> '%10s'\", \"dato\" );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"El segundo es d para enteros decimales %%d -> '%d'\", 15 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \" Con modificador de longitud: %%10d -> '%10d'\", 15 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \" Rellenando a ceros con un 0 por delante: %%010d -> '%010d'\", 15 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \" Con . de miles: %%,10d -> '%,10d'\", 1500000 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"Y el más interesante es f para números reales (flotantes) %%f -> '%f'\", 2.5 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \" Con modificador de longitud y decimales: %%7.2f -> '%7.2f'\", 2.5 );\r\n\t\tSystem.out.println( mens );\r\n\t\tSystem.out.println( \" (Observa que redondea a los decimales que se indiquen)\" );\r\n\t\tmens = String.format( \" Con puntos de miles y coma decimal: %%,12.2f -> '%,12.2f'\", 25000.0 );\r\n\t\tSystem.out.println( mens );\r\n\t\tmens = String.format( \"Y por supuesto %s %d son combinables de %.1f maneras\", \"los\", 3, 1000.1 );\r\n\t\tSystem.out.println( mens );\r\n\t\tSystem.out.println( \"\" );\r\n\t\tmens = String.format( \"Tienes una descripción completa de las posibilidades de la cadena de formato en\\n %s\", \"https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html#syntax\" );\r\n\t\tSystem.out.println( mens );\r\n\t}", "public static void main(String args[]) {\n String S = \"fjg-eer-sas-f\";\n int k = 3;\n System.out.println(createNewString(removeDashes(S), k));\n }" ]
[ "0.6073625", "0.6026517", "0.6020089", "0.60175085", "0.592685", "0.5923973", "0.585585", "0.5844056", "0.57995725", "0.5793948", "0.5747885", "0.5710484", "0.5706906", "0.5643303", "0.56068295", "0.5606262", "0.55952525", "0.5545141", "0.55446506", "0.5521447", "0.5497688", "0.54954463", "0.5493444", "0.54930085", "0.549127", "0.54875785", "0.5469078", "0.54526347", "0.54482913", "0.5426746", "0.53977937", "0.53828025", "0.53817934", "0.5374388", "0.53704137", "0.53695303", "0.5360959", "0.5353832", "0.5344364", "0.5342646", "0.5335919", "0.5333474", "0.5329182", "0.5318271", "0.53167325", "0.5315745", "0.5310011", "0.530238", "0.5301705", "0.5295364", "0.52853703", "0.5284794", "0.5279916", "0.52770257", "0.52640057", "0.5258476", "0.52505136", "0.5248871", "0.5240089", "0.5219463", "0.52172947", "0.5216721", "0.5207793", "0.52044386", "0.52043694", "0.52004963", "0.51987934", "0.5194727", "0.51913595", "0.5189206", "0.51865983", "0.517958", "0.51705515", "0.5169859", "0.5167497", "0.51664394", "0.51650226", "0.5160015", "0.5159746", "0.51596373", "0.51581496", "0.5153157", "0.51515454", "0.51494527", "0.51361185", "0.5135483", "0.51304656", "0.51281863", "0.51280874", "0.5127385", "0.512616", "0.5124343", "0.51206964", "0.51204896", "0.5115431", "0.510595", "0.5103976", "0.5103425", "0.51029515", "0.50939965" ]
0.60241145
2
/ vrne stanje dolocenega izdelka vrnjena vrednsot je tipa int
public int vrniStanje(String izdelek) { if(izdelki.containsKey(izdelek)) return izdelki.get(izdelek); else return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "public int intip() {\r\n return elemen[ukuran - 1];\r\n }", "public int rekisteroi() {\n this.tunnusNro = seuraavaNro;\n Tuote.seuraavaNro++;\n return tunnusNro;\n }", "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "Integer getNLNDreu();", "public int liczbaelnastosie() {\n\t\treturn 0;\n\t}", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "int getMindestvertragslaufzeit();", "public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }", "public void somaVezes(){\n qtVezes++;\n }", "public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "public int obtenirVie();", "public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else if (columna==15 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else{v=esquinas();}\n return v;\n }", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "protected int maakTrein(int positie){\r\n for (int i = 0; i <= treinaantal; i++){\r\n if (treinlijst[i] == null){\r\n treinlijst[i] = new Trein(positie, treinaantal++);\r\n baan.addTrein(treinlijst[i].getId());\r\n //update naar gui\r\n int trein[] = new int[1];\r\n trein[0] = treinlijst[i].getId();\r\n int[] arg = new int[1];\r\n arg[0] = positie;\r\n main.updateGui(\"trein\", trein, arg);\r\n return treinlijst[i].getId();\r\n }\r\n }\r\n return 0;\r\n }", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }", "public int getVonalAzonosito()\r\n\t{\r\n\t\treturn vonalAzonosito;\r\n\t}", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "public static int getVelocidade() {\n return velocidade;\n }", "int funkcjaRynkuGetIndex(float cena)\n\t{\n\t\tArrayList<Point> L1 =listaFunkcjiUzytecznosci.get(0);\n\n\t\tint a=0;\n\t\twhile (cena>L1.get(a).getPrice())\n\t\t{\n\t\t\ta++;\n\t\t}\n\t\t\n\t\tif(a>0)\n\t\t{\n\t\t\ta--;\n\t\t}\n\t\t\n\t\tif (a==L1.size())\n\t\t{\n\t\t\ta--;\t\n\t\t}\n\t\t\n\t\t\n\t\t//getInput(\"funkcjaRynkuGetIndex \"+a+\" cena \"+ cena);\n\t\t\t\n\t\treturn a;\n\t}", "public static int neparni(int broj) {\n\t\tString velicina = \"\" + broj;\n\t\tint velicinaBroja = velicina.length();\n\t\tint zbir = 0;\n\t\tint ostatak;\n\t\twhile (velicinaBroja > 0) {\n\t\t\tif (broj % 2 != 0) {\n\t\t\t\tostatak = broj % 10;\n\t\t\t\tzbir = 10 * zbir + ostatak;\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t\tif (broj % 2 == 0) {\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t}\n\n\t\treturn zbir;\n\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public int lancia() {\r\n\t\tlancio = dado.tiraDado();\r\n\t\tthis.numLanci++;\r\n\t\treturn lancio;\r\n\t}", "private static int zamijeniDvijeKarte(int[] spil) {\n\t\tint prva =randomKarta (spil);\n\t\tint druga = randomKarta (spil);\n\t\tzamijeni (spil, prva, druga);\n\t\t\n\t\treturn spil, prva, druga;\n\t}", "public int koko() {\n return this.arvoja;\n }", "public int getminutoStamina(){\n return tiempoReal;\n }", "public int getValore() {\n return valore;\n }", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "public int alturaInterativa() {\n if (this.esArbolVacio()) {\n return 0;\n }\n int alturaDelArbol = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(raiz);\n while (!colaDeNodos.isEmpty()) {\n int nroDeNodosDelNivel = colaDeNodos.size();\n while (nroDeNodosDelNivel > 0) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n nroDeNodosDelNivel--;\n }\n alturaDelArbol++;\n }\n return alturaDelArbol; //Altura total del arbol\n }", "@Override\r\n\tpublic int operar() {\n\t\treturn this.valor;\r\n\t}", "public int getCantidadAvenidas();", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "private void dodajEpsilonPrijelaz(int pocetno, int sljedece) {\n String key = pocetno + \",$$\";\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + new Integer(sljedece).toString();\n prijelazi.put(key, value);\n }\n }", "public static int NajveciZajednickiDjelilac(int a, int b) {\n\t\tint nzd = 0;\r\n\t\t// krecemo od prvog broja 1 i ispitujemo uslove\r\n\t\tint i = 1;\r\n\t\t// dokle god je i manje od prvog i drugog broja\r\n\t\twhile (i <= a && i <= b) {\r\n\t\t\t// ispitujemo ostatk djeljenja sa i i ako je nula\r\n\t\t\tif (a % i == 0 && b % i == 0) {\r\n\t\t\t\tnzd = i;\r\n\t\t\t} // povecavamo nzd za jedan\r\n\t\t\ti++;\r\n\t\t} // metoda vraca nzd\r\n\t\treturn nzd;\r\n\t}", "public int puntosRestantes() {\n // TODO implement here\n return 0;\n }", "public static int getLicznikTur() { return LicznikTur; }", "@Override\n\tpublic int sacameVida(ElementoFuente a) {\n\t\treturn 10;\n\t}", "private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }", "public int recuperar() {\r\n\t if (raiz == null)\r\n\t return -99999;\r\n\t ;\r\n\t int x = raiz.dato;\r\n\t raiz = raiz.sig;\r\n\t return x;\r\n\t }", "protected int getTreinAantal(){\r\n return treinaantal;\r\n }", "public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}", "public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}", "public int getTilaa() {\r\n return maara - matkustajia;\r\n }", "public int obtenerSegundo() { return segundo; }", "public int getZgrada() {\n return zgrada;\n }", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }", "public long getIdVozilo() {\n return idVozilo;\n }", "public int extraer ()\n {\n if (raiz!=null)\n {\n int informacion = raiz.edad;\n raiz = raiz.sig;\n return informacion;\n }\n else\n {\n System.out.println(\"La lista se encuentra vacia\");\n return 0;\n }\n }", "public static int oceniPozicijo(Igra igra, Igralec jaz, int globina) {\n\t\tint N = Igra.N;\n\t\tint vrednost_rdeci;\n\t\tint vrednost_modri;\n\n\t\t// Vrednost za redecega in modrega lahko doloci s pomocjo ene izmed dveh funkcij za oceno pozicije.\n\t\tif (Inteligenca.nacinLokalno == true) {\n\t\t\tvrednost_rdeci = oceni_rdec(igra).vrednost - 1;\n\t\t\tvrednost_modri = oceni_moder(igra).vrednost - 1;\t\n\t\t}\n\t\telse {\n\t\t\tvrednost_rdeci = BfsIskanje.BfsIskanjePotiRdec(igra).size() - 1;\n\t\t\tvrednost_modri = BfsIskanje.BfsIskanjePotiModer(igra).size() - 1;\n\t\t}\n\n\t\t// Tu sta implementirani dve razlicni funkciji, odlocila sva se za prvo, drugo pa pustila,\n\t\t// saj je malo naprednejsa in bi se lahko izkazala za boljso, a tudi prva deluje odlicno.\n\t\tint a = POLNO / (N * N);\n\t\tint b = -a;\n\t\t\n// --- (druga funkcija) ---\n//\t\tdouble alpha = (double) a;\n//\t\tdouble n = (double) N;\n// ---\n\t\t\n\t\t// Ce je zmagovalec znan.\n\t\tif (jaz == Igralec.Rdec) {\n\t\t\tif (vrednost_modri == POLNO || vrednost_rdeci == 0) return POLNO;\n\t\t\tif (vrednost_rdeci == POLNO || vrednost_modri == 0) return -POLNO;\n\t\t\t\n// ---\n//\t\t\tif (vrednost_modri > vrednost_rdeci) {\n//\t\t\t\tdouble z = (2/(n * n - 2) * 1 - 1 / (n * n - 2) * 2 + 1 - 2/(n * n - 2) * vrednost_rdeci + 1 / (n * n - 2) * vrednost_modri) / (2 / (n * n * alpha));\n//\t\t\t\n//\t\t\t\treturn (int) z;\n//\t\t\t} else if (vrednost_modri < vrednost_rdeci) {\n//\t\t\t\tdouble z = ((2/3) * 2 - (1/3) * 1 - (2/3) * vrednost_rdeci + (1/3) * vrednost_modri ) / \n//\t\t\t\t\t\t(2 * (n * n - 2)/(3 * n * n * alpha));\n//\t\t\t\t\t\t\n//\t\t\t\treturn (int) z;\n//\t\t\t} else return 0;\n// ---\t\n\t\t\t\n\t\t\t// Ocena z ravnino in dodatkom. V bistvu gre za funkcijo f:NxN->N, ki mora ustrezati nekaterim\n\t\t\t// pogojem: npr. ce ima rdeci manj do konca kot modri mora vrniti nekaj pozitivnega in obratno\n\t\t\t// dodatek zadaj pa nam se izboljsa funkcijo, kadar smo na diagonali na ravnini.\n\t\t\treturn -(a * vrednost_rdeci + b * vrednost_modri ) + 10 * vrednost_rdeci;\n\t\t\t\n\t\t}\n\t\t// Analogno, a za modrega.\n\t\telse {\n\t\t\tif (vrednost_modri == POLNO || vrednost_rdeci == 0) return -POLNO;\n\t\t\tif (vrednost_rdeci == POLNO || vrednost_modri == 0) return POLNO;\n\t\t\t\n// ---\t\t\t\n//\t\t\tif (vrednost_modri > vrednost_rdeci) {\n//\t\t\t\tdouble z = -(2/(n * n - 2) * 1 - 1 / (n * n - 2) * 2 + 1 - 2/(n * n - 2) * vrednost_rdeci + 1 / (n * n - 2) * vrednost_modri) / (2 / (n * n * alpha));\n//\t\t\t\n//\t\t\t\treturn (int) z;\n//\t\t\t} else if (vrednost_modri < vrednost_rdeci) {\n//\t\t\t\tdouble z = -((2/3) * 2 - (1/3) * 1 - (2/3) * vrednost_rdeci + (1/3) * vrednost_modri ) / \n//\t\t\t\t\t\t(2 * (n * n - 2)/(3 * n * n * alpha));\n//\t\t\t\t\t\t\n//\t\t\t\treturn (int) z;\n//\t\t\t} else return 0;\n// ---\n\t\t\t\n\t\t\treturn (a * vrednost_rdeci + b * vrednost_modri ) + 10 * vrednost_modri;\n\t\t}\n\t}", "public Integer getLongitud()\n/* 37: */ {\n/* 38:55 */ return this.longitud;\n/* 39: */ }", "@Override\n public int altura() {\n return altura(this.raiz);\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "@Override\n\tpublic int sacameVida(ElementoSoldado a) {\n\t\treturn 0;\n\t}", "int getCantidad();", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "public int usaAtaque() {\n\t\treturn dano;\n\t}", "public static int altura(Arvore no) \n { \n if (no == null) \n return 0; \n else\n { \n /* Calcula a altura de cada subarvore */\n int alturaEsq = altura(no.esquerda); \n int alturaDir = altura(no.direita); \n \n /* usa a altura maior */\n if (alturaEsq > alturaDir) \n return(alturaEsq+1); \n else \n return(alturaDir+1); \n } \n }", "public int getTipusPartida() {\r\n\t\treturn tipus;\r\n\t}", "public int getNumeroAnterior()\r\n/* 200: */ {\r\n/* 201:210 */ return this.numeroAnterior;\r\n/* 202: */ }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "public static int podBroj(int broj, boolean parnost) {\n\t\tint zbir = 0;\n\t\tif (parnost) {// Ukoliko je boolean parnost = true, pozivamo parnu\n\t\t\t\t\t\t// funkciju i okrecemo cifre.\n\t\t\tint broj1 = parni(broj);\n\t\t\tString velicina = \"\" + broj1;\n\n\t\t\tint ostatak;\n\t\t\tint velicinaBroja = velicina.length();\n\t\t\twhile (velicinaBroja > 0) {\n\t\t\t\tostatak = broj1 % 10;\n\t\t\t\tzbir = 10 * zbir + ostatak;\n\t\t\t\tbroj1 = broj1 / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\t\t\tSystem.out.println(zbir);\n\n\t\t}\n\n\t\tif (!parnost) { // //Ukoliko je boolean parnost = false, pozivamo\n\t\t\t\t\t\t// neparnu funkciju i okrecemo cifre.\n\t\t\tint broj1 = neparni(broj);\n\t\t\tString velicina = \"\" + broj1;\n\t\t\tint ostatak;\n\t\t\tint velicinaBroja = velicina.length();\n\t\t\twhile (velicinaBroja > 0) {\n\t\t\t\tostatak = broj1 % 10;\n\t\t\t\tzbir = 10 * zbir + ostatak;\n\t\t\t\tbroj1 = broj1 / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t\tSystem.out.println(zbir);\n\t\t}\n\n\t\treturn zbir;\n\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "protected void podesiIDPredstave(String nazivPredstave) {\n\t\tfor (Predstave p:Kontroler.getInstanca().vratiRepertoar())\r\n\t\t\tif(p.getNazivPredstave().equals(nazivPredstave))\r\n\t\t\t\tID_Pred=p.getId();\r\n\t}", "public int resta(){\r\n return x-y;\r\n }", "public int getNumero()\r\n/* 190: */ {\r\n/* 191:202 */ return this.numero;\r\n/* 192: */ }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public int getCyclomaticNumber() {\n\t\treturn (this.getKrawedzie().size() - this.getWierzcholki().size() + this.iloscSpojnychSkladowych());\n\t}", "@Override\n public int getSalida() {\n return 0;\n }", "public int controlloRuote() {\n\n\t\t// restituisce:\n\t\t// 0 -> se tutto ok\n\t\t// 1 -> se vanno controllate le ruote\n\t\t// 2 -> se vanno gonfiate le ruote\n\t\t// 3 -> se vanno sia controllate che gonfiate\n\n\t\treturn ruote.controlloRuote();\n\n\t}", "public abstract int getCntPoa();", "public java.math.BigInteger getCantidadCUVErrado(){\n return localCantidadCUVErrado;\n }", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public static int parni(int broj) {\n\t\tString velicina = \"\" + broj;\n\t\tint velicinaBroja = velicina.length();\n\t\tint zbir = 0;\n\t\tint ostatak;\n\t\twhile (velicinaBroja > 0) {\n\t\t\tif (broj % 2 == 0) {\n\t\t\t\tostatak = broj % 10;\n\t\t\t\tzbir = 10 * zbir + ostatak;\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t\tif (broj % 2 != 0) {\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t}\n\n\t\treturn zbir;\n\t}", "public int declassataPedina(int pezzo)\n {\n switch (pezzo)\n {\n case PEDINA_NERA: case DAMA_NERA: return PEDINA_NERA;\n case PEDINA_BIANCA: case DAMA_BIANCA: return PEDINA_BIANCA;\n }\n return VUOTA;\n }", "long buscarAnterior(long id);", "public static Pot oceni_rdec(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\t\t\n\t\t// Najbolsa pot za rdecega.\n\t\tSet<Vrednost> rdeca_pot = new HashSet<Vrednost>();\n\t\t// Tabela za dinamicno iskanje najkrajse poti, elementi so objetki razreda Vrednosti.\n\t\tVrednost[][] tabela_dolzin_rdeci = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_rdeci[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstico, napolnimo rocno.\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tif (plosca[0][j].polje == Polje.Rdec) tabela_dolzin_rdeci[0][j].vrednost = 0;\n\t\t\tif (plosca[0][j].polje == Polje.PRAZNO) tabela_dolzin_rdeci[0][j].vrednost = 1;\n\t\t}\n\t\t\n\t\t// Ostalo pa dinamicno.\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\n\t\t\t\t// definiramo polja, ki nas zanimajo\n\t\t\t\tint levo_levo_zg;\n\t\t\t\tint levo_zg;\n\t\t\t\tint desno_desno_zg;\n\t\t\t\tint desno_zg;\n\t\t\t\tint zgoraj;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Dolocimo vrednosti polj, ki nas zanimajo, tu so nekatera polja od nasega oddaljena za dve polji,\n\t\t\t\t// to je glavna skrivnost argumenta, saj ce nam nasprotnik ne more prepreciti povezave dveh polj, ki nista\n\t\t\t\t// takojsnji sosedi ju smatramo kot ze povezani (tu pridejo v igro objekti razreda Skok).\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo_levo_zg = tabela_dolzin_rdeci[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo_levo_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo_levo_zg = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { levo_zg = tabela_dolzin_rdeci[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo_zg = POLNO; }\n\t\t\t\ttry { desno_zg = tabela_dolzin_rdeci[i - 1][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i][j + 1].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdesno_desno_zg = tabela_dolzin_rdeci[i - 1][j + 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse desno_desno_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { desno_desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tzgoraj = tabela_dolzin_rdeci[i - 2][j + 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse zgoraj = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { zgoraj = POLNO; }\n\t\t\t\t\n\t\t\t\t// Preverimo, katero polje je najboljse (cez katerega bomo najhitreje povezali obe strani).\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(levo_levo_zg, Math.min(levo_zg, Math.min(desno_zg, Math.min(desno_desno_zg, zgoraj))));\n\t\t\t\t\n\t\t\t\t// Ce to polje ni v neposredni blizini, v tabelo shranimo ustrezen Skok, da vemo, da tu se nimamo povezave,\n\t\t\t\t// a nas nasprotnik ne more zapreti.\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == levo_levo_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo_zg) pointer = tabela_dolzin_rdeci[i - 1][j];\n\t\t\t\t\tif (vrednost_polja == desno_desno_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j + 2];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == desno_zg) pointer = tabela_dolzin_rdeci[i - 1][j + 1];\n\t\t\t\t\tif (vrednost_polja == zgoraj) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 2][j + 1];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t// Ponovni pregled. Prej smo gledali le polja nad nasim poljem, sedaj pa pogledamo se oba soseda v \n\t\t\t// smeri, ki ni neposredno smer napredovanja. Vse naredimo enako kot zgoraj, le da sedaj nimamo Skokov.\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tint levo;\n\t\t\t\tint desno;\n\t\t\t\tint vrednost_polja = tabela_dolzin_rdeci[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_rdeci[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_rdeci[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry { levo = tabela_dolzin_rdeci[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\ttry { desno = tabela_dolzin_rdeci[i][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno = POLNO; }\n\t\t\t\t\n\t\t\t\tif (levo != POLNO && levo < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = levo;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = levo + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j - 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (desno != POLNO && desno < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = desno;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = desno + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j + 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Izracunamo dolzino najkrajse poti do zmage. \n\t\t// Ta dolzina je lahko 0, pa se nismo zmagali, saj moramo povezati se tista polja,\n\t\t// kjer imamo dve moznosti za zmago, torej Skoke, a takrat nas nasprotnik ne more vec ustaviti.\n\t\tint najmanjsa_rdeca = POLNO;\n\t\tVrednost pointer_rdeca = null;\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tint vrednost = tabela_dolzin_rdeci[N - 1][j].vrednost;\n\t\t\tif (najmanjsa_rdeca > vrednost) {\n\t\t\t\tnajmanjsa_rdeca = vrednost;\n\t\t\t\tpointer_rdeca = tabela_dolzin_rdeci[N - 1][j];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracunamo najkraso pot, to potrebujemo v Izbira potez.\n\t\tVrednost spremenljivka = pointer_rdeca;\n\t\twhile (spremenljivka != null) {\n\t\t\trdeca_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_rdeca, rdeca_pot);\n\t}", "@Override\n\tpublic int sacameVida(ElementoAlien a) {\n\t\treturn 20;\n\t}", "public int getIdDetalleComponenteCosto()\r\n/* 58: */ {\r\n/* 59: 83 */ return this.idDetalleComponenteCosto;\r\n/* 60: */ }", "private TreeNode napraviStabloUtil(List<TreeNode> cvorovi, int pocetni, int krajnji) {\n// osnovni slučaj\n if (pocetni > krajnji) {\n return null;\n }\n /* Nadji srednji element i proglasi ga korenom */\n int mid = (pocetni + krajnji) / 2;\n TreeNode cvor = cvorovi.get(mid);\n /* Koristeci indeks u infiks obilasku\n* konstruiši levo i desno podstablo */\n cvor.left = napraviStabloUtil(cvorovi, pocetni, mid - 1);\n cvor.right = napraviStabloUtil(cvorovi, mid + 1, krajnji);\n return cvor;\n }", "public void zugInWerkstatt() {\n werkstatt++;\n }", "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "public Integer papeletaDeterminada (Integer papeleiaId) throws Exception\n\t{\n\tInteger cantidad;\n\t\n\tcantidad=papeletaBo.papeletaDeterminada(papeleiaId);\n\t\n\treturn cantidad ;\n\t}", "public int getNOficina ()\r\n {\r\n return this.nOficina;\r\n }", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "int getSumaAdunata();", "private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }", "@Override\n\t\tpublic int compare(Pecosa a, Pecosa b) {\n\t\t\tLong numa=a.getId().getPecnro();\n\t\t\tLong numb=b.getId().getPecnro();\n\t\t\treturn (int)(numa-numb);\n\t\t}", "public int getNumGruppoPacchetti();", "public void setZgrada(int value) {\n this.zgrada = value;\n }" ]
[ "0.68592924", "0.65470284", "0.6527247", "0.65038353", "0.647194", "0.64670223", "0.6389267", "0.6371431", "0.6322859", "0.63205576", "0.62829316", "0.6259358", "0.62459666", "0.622635", "0.6212705", "0.6212101", "0.6198633", "0.6189432", "0.61774176", "0.6169779", "0.61657315", "0.615665", "0.61510414", "0.6146688", "0.61250436", "0.61149454", "0.6112047", "0.6070163", "0.6036349", "0.603172", "0.60300165", "0.6025585", "0.60199285", "0.6017434", "0.6001859", "0.59978735", "0.59920007", "0.59818983", "0.5972598", "0.59562486", "0.59549093", "0.5954044", "0.5953133", "0.5952527", "0.5945262", "0.5940465", "0.5939982", "0.5929918", "0.59093505", "0.589229", "0.58921796", "0.58909", "0.5887267", "0.58734363", "0.5856156", "0.58490217", "0.584532", "0.58448136", "0.58376944", "0.58357376", "0.58298546", "0.58212495", "0.58174753", "0.5813099", "0.58082587", "0.5805355", "0.5798092", "0.5796595", "0.57956254", "0.57955277", "0.57942605", "0.57925075", "0.5792461", "0.579095", "0.57902855", "0.578726", "0.5782553", "0.57819945", "0.57799774", "0.5778831", "0.5774202", "0.5773461", "0.5773196", "0.57724833", "0.57719445", "0.57717955", "0.57622755", "0.57527363", "0.57506996", "0.57409114", "0.5737209", "0.57308626", "0.57294536", "0.5727577", "0.572268", "0.5722499", "0.5721295", "0.5719139", "0.57147557", "0.57138515" ]
0.5875017
53
SELECT FROM teachplan WHERE courseid = '297e7c7c62b888f00162b8a7dec20000' AND parentid='0'
List<Teachplan> findByCourseidAndParentid(String courseId, String parentId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "courses selectByPrimaryKey(String courseId);", "TrainingCourse selectByPrimaryKey(String id);", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Classroom where state=:classroomState and yogaCludId=( select yogaClubID from CourseEntry where id=(:courseId) and state=:courseState )\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"classroomState\", 0).setInteger(\"courseId\", courseId).setInteger(\"courseState\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllClassroomIdOfCourse(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "TrainCourse selectByPrimaryKey(Long id);", "private List<Course> getCourses(String parentCourseId,\n\t\t\tString parentCourseTerm, User user) throws PersistenceException,\n\t\t\tKeyNotFoundException {\n\t\tBbPersistenceManager bbPm = PersistenceServiceFactory.getInstance().getDbPersistenceManager();\n\t\t\n\t\t CourseDbLoader courseDbLoader = (CourseDbLoader)bbPm.getLoader(CourseDbLoader.TYPE);\n\t\t \n\t\t /*\n\t\t * Get only those Blackboard courses where the user is the instructor.\n\t\t * http://library.blackboard.com/ref/598135ae-501e-46f6-9910-190d7ea0a17c/blackboard/persist/course/CourseDbLoader.html\n\t\t */\n\t\t List<Course> allCourses = courseDbLoader.loadByUserIdAndCourseMembershipRole(user.getId(), Role.INSTRUCTOR ) ;\n\t\t \n\t\t \n\t\t CourseCourseManager courseCourseManager = CourseCourseManagerFactory.getInstance() ;\n\t\t \n\t\t /*\n\t\t * Create a collection of Course objects that are in the above collection\n\t\t * that do NOT match the KU term code of the parent course and \n\t\t * do match the parent course's course ID. Also checks to make sure that the course is\n\t\t * not already a parent or child of another course. This collection of courses\n\t\t * will be removed from the collection of courses being returned\n\t\t * by the method.\n\t\t */\n\t\t List<Course> coursesNotInParentCourseTerm = new ArrayList<Course>();\n\t\t \n\t\t for (Course aCourse : allCourses) {\n\t\t\t \n\t\t\t String aCourseId = aCourse.getCourseId() ;\n\t\t\t \n\t\t\t String aCourseTerm = aCourseId.split(\"-\")[0];\n\t\t\t \n\t\t\t if ( ! parentCourseTerm.equals(aCourseTerm) || parentCourseId.equals(aCourseId)\n\t\t\t\t\t || courseCourseManager.isCourseCrossListed(aCourse.getId())) {\n\t\t\t\t \n\t\t\t\t coursesNotInParentCourseTerm.add(aCourse) ;\n\t\t\t\t \n\t\t\t }\n\n\t\t }\n\t\t \n\t\t allCourses.removeAll(coursesNotInParentCourseTerm);\n\t\t \n\t\t return allCourses;\n\t\t \n\t}", "Course selectByPrimaryKey(Integer cid);", "Course selectByPrimaryKey(Integer cId);", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseId(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where courseId=:courseId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseId\", courseId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseId(int courseId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Test\n public void findByStudentIdAndParentId() {\n }", "public ResultSet leesParentIdLijst() {\n String sql = \"select distinct f2.id parent_id\\n\" +\n \" from bookmarkfolders f1\\n\" +\n \" join bookmarkfolders f2 on f1.parent_id = f2.id\\n\" +\n \" order by f2.id;\";\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }", "private String verificationParent(String valChamp, String valContent){\n System.out.println(\"------------------On teste les parents----------------\");\n Enumeration key = changedID.keys();\n while(key.hasMoreElements()){\n String table = (String)key.nextElement();\n System.out.println(\"on teste les parents pour : \" + table);\n String keyNom = primKey(table);\n if(keyNom.compareTo(valChamp) == 0){\n Hashtable tableHash = (Hashtable)changedID.get(table);\n System.out.println(\"Trouvééééééééééé meme champ : \" + valChamp + \" \" + valContent);\n if(valContent.indexOf(\".\") != -1)\n valContent = valContent.substring(0,valContent.indexOf(\".\"));\n Integer valContentInt = new Integer(valContent);\n if(tableHash.containsKey(valContentInt)){\n System.out.println(\"contient la clé : \" + valContentInt + \" sous la forme : \" + tableHash.get(valContentInt));\n if(tableHash.get(valContentInt) != valContentInt){\n valContentInt = (Integer)tableHash.get(valContentInt);\n valContent = valContentInt.toString();\n System.out.println(\"nouveau valContent : \" + valContent);\n return valContent;\n }else\n return valContent;\n }\n }\n }\n System.out.println(\"------------------Fini de tester les parents----------------\");\n return valContent;\n/* Enumeration key = changedID.keys();\n while(key.hasMoreElements()){\n String table = (String)key.nextElement();\n System.out.println(\"On teste la table parent : \" + table);\n // Ca regarde quel est le nom du champ de la clef primaire\n String keyNom = new String();\n try{\n // ca selectionne la description de la table\n ResultSet verifRSET = connex.prepareStatement(\"DESC \" + table).executeQuery();\n // Ca prend ligne par ligne du resultset\n while(verifRSET.next()){\n // Ca prend la valeur du champ Key pour la ligne actuelle\n String keyTable = verifRSET.getString(\"Key\");\n // Ca verifie si elle est primaire\n if(keyTable.compareTo(\"PRI\") == 0){\n // Si elle l'est on prend la valeur du champ qui est clé primaire\n keyNom = verifRSET.getString(\"Field\");\n // On compare a la valeur du champ qu'on veut tester\n if(keyNom.compareTo(valChamp) == 0){\n // Si on a trouvé le meme champ on le fait savoir et on \n Hashtable tableHash = (Hashtable)changedID.get(table);\n System.out.println(\"Trouvééééééééééé meme champ : \" + valChamp + \" \" + valContent);\n if(isPrimaryKey(valChamp, table) && valContent.indexOf(\".\") != -1)\n valContent = valContent.substring(0,valContent.indexOf(\".\"));\n Integer valContentInt = new Integer(valContent);\n if(tableHash.containsKey(valContentInt)){\n System.out.println(\"contient la clé : \" + valContentInt);\n // Hashtable priID = (Hashtable)tableHash.get(valContentInt);\n if(tableHash.get(valContentInt) != valContentInt){\n valContentInt = (Integer)tableHash.get(valContentInt);\n valContent = valContentInt.toString();\n System.out.println(\"nouveau valContent : \" + valContent);\n return valContent;\n }else\n return valContent;\n }\n }\n }\n }\n }catch(Exception e){\n System.out.println(\"[Synchronize][verificationParent] Exception : \" + e );\n e.printStackTrace();\n }\n }*/\n \n }", "public int query(int parseInt) {\n\t\tConnection conn = getConn();\r\n\t\tint parentid=-1;\r\n\t\tString sql = \"select epc_parent_id from easybuy_product_category where epc_id=?\";\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tps.setInt(1, parseInt);\r\n\t\t\tResultSet rst = ps.executeQuery();\r\n\t\t\tif (rst.next()) {\r\n\t\t\t\tparentid = rst.getInt(1);\r\n\t\t\t}\r\n\t\t\treturn parentid;\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\treturn parentid;\r\n\t\t} finally {\r\n\t\t\tcloseConn();\r\n\t\t}\r\n\t}", "List<TrainingCourse> selectByExample(TrainingCourseExample example);", "@Test\n \tpublic void whereClauseForNodeSibling() {\n \t\tnode23.addJoin(new Sibling(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_rank23.parent\", \"_rank42.parent\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n\t\t\t\t\"_component23.name IS NULL\"\n \t\t);\n \t}", "public ResultSet get (int courseId) {\n try {\n String sql = \"SELECT * FROM course WHERE course_id = ?\";\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, courseId);\n System.out.println(sql);\n\n return stmt.executeQuery();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Test\n public void testLPADisabledParentTasks() throws Exception {\n\n // SETUP: Data Setup for running the Function\n SchedStaskTable lSchedStask = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 100 ) );\n lSchedStask.setPreventLinePlanningAutomation( true );\n lSchedStask.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 2 loose tasks\n assertEquals( 2, iDataSet.getRowCount() );\n\n iDataSet.addSort( \"sched_id\", true );\n iDataSet.filterAndSort();\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n iDataSet.next();\n testRow( new TaskKey( 4650, 500 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the Setup Changes\n lSchedStask.setPreventLinePlanningAutomation( false );\n lSchedStask.update();\n }", "public static String selectParentTrl(ConnectionProvider connectionProvider, String maProcessplanId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM MA_ProcessPlan left join (select MA_Processplan_ID, Name from MA_Processplan) table1 on (MA_ProcessPlan.MA_Processplan_ID = table1.MA_Processplan_ID) WHERE MA_ProcessPlan.MA_Processplan_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, maProcessplanId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public ResultSet leesBookmarkLijstByParentId(int parent_id) {\n String sql = \"select distinct f2.titel parentfolder, f1.titel folder, b.titel titel, b.url from bookmarks b \" +\n \"join bookmarkfolders f1 on b.folder_id = f1.id \" +\n \"join bookmarkfolders f2 on f1.parent_id = f2.id \" +\n \"where f2.id = \" + parent_id ;\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }", "UserCourseHistory selectByPrimaryKey(String id);", "public List getPlanList(String parentID)\r\n {\r\n List planList = null;\r\n\r\n try\r\n {\r\n PlanDAO planDao = PlanDAOFactory.getDAO();\r\n planList = planDao.getPlanList(parentID);\r\n }\r\n catch (PlanDAOSysException udse)\r\n {\r\n udse.printStackTrace();\r\n }\r\n\r\n return planList;\r\n }", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByTeacherId(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where teacherId=:teacherId and state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"teacherId\", teacherId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByTeacherId(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeRoot() {\n \t\tnode23.setRoot(true);\n \t\tcheckWhereCondition(\"_rank23.root IS TRUE\");\n \t}", "public static String selectParentID(ConnectionProvider connectionProvider, String key) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT MA_ProcessPlan_Version.MA_Processplan_ID AS NAME\" +\n \" FROM MA_ProcessPlan_Version\" +\n \" WHERE MA_ProcessPlan_Version.MA_Processplan_Version_ID = ?\";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, key);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "@Test\n public void testSelectByLessonId() {\n disciplineTest = disciplineDao.selectByLessonId(1);\n boolean result = disciplineTest != null;\n assertTrue(result);\n }", "public ArrayList<Trainer> getTrainersNotInCourse(Course course){\n ArrayList<Trainer> result = new ArrayList();\n \n String statement = GET_TRAINERS_NOT_IN_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Trainer trainer = new Trainer(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getString(\"subject\"));\n result.add(trainer);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getTrainersNotInCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }", "private QuadTree[] findChild(QuadTree parent) {\n double point1_lon = parent.ullon;\n double point1_lat = parent.ullat;\n double point2_lon = (parent.lrlon + parent.ullon) / 2;\n double point2_lat = parent.ullat;\n double point3_lon = parent.ullon;\n double point3_lat = (parent.ullat + parent.lrlat) / 2;\n double point4_lon = (parent.lrlon + parent.ullon) / 2;\n double point4_lat = (parent.ullat + parent.lrlat) / 2;\n double point5_lon = (parent.lrlon + parent.ullon) / 2;\n double point5_lat = parent.lrlat;\n double point6_lon = parent.lrlon;\n double point6_lat = parent.lrlat;\n double point7_lon = parent.lrlon;\n double point7_lat = (parent.ullat + parent.lrlat) / 2;\n QuadTree ul, ur, ll, lr;\n if (parent.name.equals(\"root\")) {\n ul = new QuadTree(\"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(\"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(\"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(\"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n } else {\n ul = new QuadTree(parent.name + \"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(parent.name + \"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(parent.name + \"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(parent.name + \"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n }\n QuadTree[] child = new QuadTree[4];\n child[0] = ul;\n child[1] = ur;\n child[2] = ll;\n child[3] = lr;\n return child;\n }", "public List<Subject> getseventhsubj(String course) {\n\t\treturn sub_dao.getseventhsubj(course);\r\n\t}", "public static Node searchParent(Node root, int taskId) {\n Queue<Node> queue = new LinkedList<>();\n queue.add(root);\n\n while (queue.size() > 0) {\n Node current = queue.poll();\n if (current.getAllChildrenIds().contains(taskId)) {\n return current;\n } else {\n queue.addAll(current.getChildren());\n }\n }\n\n return null;\n }", "List<Course> selectByExample(CourseExample example);", "public static String selectParentID(ConnectionProvider connectionProvider, String key) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT C_ProjectLine.C_Project_ID AS NAME\" +\n \" FROM C_ProjectLine\" +\n \" WHERE C_ProjectLine.C_ProjectLine_ID = ?\";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, key);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public static String selectParent(ConnectionProvider connectionProvider, String maProcessplanId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM MA_ProcessPlan left join (select MA_Processplan_ID, Name from MA_Processplan) table1 on (MA_ProcessPlan.MA_Processplan_ID = table1.MA_Processplan_ID) WHERE MA_ProcessPlan.MA_Processplan_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, maProcessplanId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "TResearchTeach selectByPrimaryKey(Long researchid);", "public Node getTB(String id,Node parent){\n try{\n HashMap hash= (HashMap)client.execute(\"getResource\", new Object[]{id});\n String path = hash.get(\"path\").toString();\n String name = path.split(\"/\")[path.split(\"/\").length-1];\n byte type = 1;\n if(path.indexOf(\"/\")==-1){\n type = 0;\n }\n Node node = new Node(id,path,name,parent,null,type);\n Object[] children = (Object[])hash.get(\"children\");\n for(Object o:children){\n node.addChild(o.toString(), null);\n }\n HashMap meta = (HashMap)hash.get(\"meta\");\n if(meta!=null&&meta.size()!=0){\n Set keys = meta.keySet();\n Iterator iter = keys.iterator();\n while(iter.hasNext()){\n String n = iter.next().toString();\n if(n.equals(\"_epnames_\"+RunnerRepository.user)){\n node.setEPs(meta.get(n).toString());\n continue;\n }\n node.addProperty(n, meta.get(n).toString());\n }\n }\n return node;\n }catch(Exception e){\n System.out.println(\"requested id: \"+id);\n try{System.out.println(\"server respons: \"+client.execute(\"getResource\", new Object[]{id}));}\n catch(Exception ex){ex.printStackTrace();}\n e.printStackTrace();\n return null;\n }\n }", "public List<Subject> geteighthsubj(String course) {\n\t\treturn sub_dao.geteighthsubj(course);\r\n\t}", "public List getPlanList(int orgID, int parentID)\r\n {\r\n List planList = null;\r\n\r\n try\r\n {\r\n PlanDAO planDao = PlanDAOFactory.getDAO();\r\n planList = planDao.getPlanList(orgID, parentID);\r\n }\r\n catch (PlanDAOSysException udse)\r\n {\r\n udse.printStackTrace();\r\n }\r\n\r\n //planList = detectPlanDate(planList); //调用判断逾期\r\n return planList;\r\n }", "List<ChangesetParents> selectByExample(ChangesetParentsExample example);", "@Override\n public ResultSet getCurrentAssignments(String type, String course, String section) throws SQLException {\n StringBuilder statement = new StringBuilder(100);\n int count = 1;\n statement.append(\"SELECT * FROM (\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE current = TRUE))\");\n if (type != null && !type.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE assignment_type_id IN (SELECT id FROM assignment_type WHERE name = ?)\");\n }\n if (course != null && !course.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE name = ?)\");\n }\n if (section != null && !section.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE section = ?)\");\n }\n statement.append(\"\\n) AS assignment_catalog GROUP BY id HAVING count(*) = \").append(count).append(\";\");\n if (count == 0) {\n statement.setLength(0);\n statement.append(\"SELECT * FROM assignment_catalog\");\n }\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (type != null && !type.isEmpty()) {\n pstmt.setString(i++, type);\n }\n if (course != null && !course.isEmpty()) {\n pstmt.setString(i++, course);\n }\n if (section != null && !section.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(section));\n }\n //System.out.println(pstmt.toString());\n return pstmt.executeQuery();\n }", "private Query queryAllCourses() {\n // Test performance de l'update d'user en bdd\n final Trace myTrace2 = FirebasePerformance.getInstance().newTrace(\"coursesSupervisorsActivityAllCoursesQuerys_trace\");\n myTrace2.start();\n\n Query mQuery = setupDb().collection(\"courses\")\n .orderBy(\"horaireDuCours\", Query.Direction.ASCENDING)\n .whereGreaterThanOrEqualTo(\"horaireDuCours\", Calendar.getInstance().getTime());\n mQuery.addSnapshotListener(this, new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(QuerySnapshot documentSnapshots, FirebaseFirestoreException e) {\n if (documentSnapshots != null && documentSnapshots.size() != 0) {\n Log.e(\"TAG\", \"Le document existe !\");\n // liste des docs\n readDataInList(documentSnapshots.getDocuments());\n\n myTrace2.stop();\n }\n }\n });\n return mQuery;\n }", "public ArrayList<Trainer> getTrainersForCourse(Course course){\n ArrayList<Trainer> result = new ArrayList();\n \n String statement = GET_TRAINERS_FOR_COURSE;\n\n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Trainer trainer = new Trainer(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getString(\"subject\"));\n result.add(trainer);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getTrainersForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }", "@Test\n public void test6() throws Exception {\n String jpql = \"SELECT c FROM Course c where c.name = :name\";\n TypedQuery<Course> q = em.createQuery(jpql, Course.class);\n q.setParameter(\"name\", \"Edited one\");\n Course course = q.getSingleResult();\n Assert.assertEquals(\"Edited one\", course.getCourseMapped().getName());\n Assert.assertEquals(2, course.getCourseMapped().getLevels().size());\n }", "public static String selectParentTrl(ConnectionProvider connectionProvider, String cProjectId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Value), '')) || ' - ' || TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM C_Project left join (select C_Project_ID, Value, Name from C_Project) table1 on (C_Project.C_Project_ID = table1.C_Project_ID) WHERE C_Project.C_Project_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, cProjectId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public List<Lesson> findByCourseId(String courseId);", "CourseParticipant getCourseParticInOneCourse(UUID courseCourseParticUuid);", "public List<CourseType> searchAllCourses(int userID){\n ArrayList<CourseType> courses = new ArrayList<>();\n Connection connection = getConnection();\n if(connection != null){\n try{\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * from Courses WHERE idTeacher = ?\");\n preparedStatement.setInt(1,userID);\n ResultSet resultSet = preparedStatement.executeQuery();\n while (resultSet.next()){\n courses.add(new CourseType(\n \t\tresultSet.getInt(1),\n resultSet.getString(2),\n resultSet.getString(3),\n resultSet.getInt(4),\n resultSet.getInt(5),\n resultSet.getInt(6)));\n }\n }catch (SQLException e){e.printStackTrace();}\n finally {\n closeConnection(connection);\n }\n }\n return courses;\n }", "ac_teacher_instrument selectByPrimaryKey(Integer acTeacherInstrumentId);", "public static void query(String parent, node tree){\n\t\ttree = names.get(parent);\r\n\t\tint tSales = sumSubTree(tree);\r\n\t\tSystem.out.println(tSales);\r\n\t}", "public boolean resultSetByCourseNext(Teacher teacher) {\n boolean found = false;\n try{\n if(resultSet.next()){\n found = true;\n teacher.setId(resultSet.getString(\"idUser\"));\n teacher.setEmail(resultSet.getString(\"email\"));\n teacher.setPassword(resultSet.getString(\"password\"));\n teacher.setLastName(resultSet.getString(\"last_name\"));\n teacher.setFirstName(resultSet.getString(\"first_name\"));\n teacher.setPermission(resultSet.getString(\"permission\"));\n teacher.setIdCourse(resultSet.getString(\"id_CourseT\"));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return found;\n }", "java.lang.String getParentId(int index);", "public void setTeacCourseId(Long teacCourseId) {\n this.teacCourseId = teacCourseId;\n }", "public Cursor fetchCourse(long rowId) throws SQLException\r\n{\r\nCursor mCursor = database.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_CATEGORY, KEY_COURSENAME, KEY_ASSIGNMENTNAME, KEY_DESCRIPTION, KEY_DUEDATE, KEY_COMPLETED }, null, null, null,\r\nnull, null, null);\r\nif (mCursor != null)\r\n{\r\nmCursor.moveToFirst();\r\n}\r\nreturn mCursor;\r\n}", "public Long getTeacCourseId() {\n return teacCourseId;\n }", "@Override\r\n\t//得到任一都是老师对应的课程种类Id\r\n\tpublic List<Integer> getAllcourseCategoryIDsFormTeacher(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select courseCategoryIds from Teacher where state=:state and id=:teacherId\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<String> lists = session.createQuery(hql).setInteger(\"state\", 0).setInteger(\"teacherId\",teacherId).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tList<Integer> list =new ArrayList<Integer>();\r\n\t\tlogger.debug(\"use the method named :getAllcourseCategoryIDsFormTeacher(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\tString[] target= lists.get(0).split(\",\");\r\n\t\t\tfor(int i=0;i<target.length;i++){\r\n\t\t\t\tlist.add(Integer.parseInt(target[i]));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "Teacher selectByPrimaryKey(Integer pkid);", "public int getCourseId()\n {\n return this.courseId;\n }", "public Course findCourseById(String courseid) {\n\t\tCourse course=new Course();\n\t\tcourse.setCourseId(Integer.parseInt(courseid));\n\t\tList<Course> courses=courseDao.findByExample(course);\n\t\tif(courses.size()==0)\n\t\t\treturn null;\n\t\treturn courses.get(0);\n\t}", "@Override\r\n\tpublic boolean takeCourse(String studentId,Course course) {\n\t\tList<String> hasTaken=db.findStudentCourseHistory( studentId);\r\n\t\tList<String> prerequisite=getPrerequisite(course.getDescription());\r\n\t\treturn false;\r\n\t}", "public Cursor getallchecklistrequired(String subjectid)\n {\n \ttry\n \t{\n \t\tString sql=\"SELECT subjectchecklist.id FROM subjectchecklist join checklist on subjectchecklist.checknum=checklist.checknum where subjectId='\"+subjectid+\"' and critical='C' GROUP BY subjectchecklist.id\";\n \t\t\n \t\tCursor mCur=mDb.rawQuery(sql, null);\n \t\tif(mCur!=null)\n \t\t{\n \t\t\tmCur.moveToNext();\n \t\t}\n \t\treturn mCur;\n \t}\n \tcatch(SQLException mSQLException)\n \t{\n \t\tLog.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n \t\tthrow mSQLException;\n \t}\n }", "WayShopCateRoot selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByClassroomId(int classroomId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where classroomId=:classroomId and state=:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"classroomId\", classroomId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByClassroomId(int classroomId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "String getChildId();", "@Override\r\n\tpublic TransferCourseMirror getTransferCourseMirrorByCourseIdAndEvaluatorId(String transferCourseId, String evaluatorId){\n\t\tList<TransferCourseMirror> tcmList = getHibernateTemplate().find(\"from TransferCourseMirror where transferCourseId = ? and evaluatorId = ?\" , transferCourseId, evaluatorId);\r\n\t\tif(tcmList != null && tcmList.size()!=0){\r\n\t\t\treturn tcmList.get(0);\r\n\t\t}\r\n\t\telse return null;\r\n\t}", "@Override\n\tpublic List<Chapter> findByCourse(Integer idCourse) {\n\t\treturn rDao.findByCourse(idCourse);\n\t}", "public List<Course> findByTopicId(int topicId);", "@Override\r\n\tpublic int ifPrerequisitesExist(String courseId) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString sql = \"SELECT count(*) FROM \\\"Registration DB\\\".\\\"Prerequisites\\\" where \\\"courseId\\\"='\" + courseId + \"'\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, Integer.class);\r\n\r\n\t}", "public InstitutionBean[] loadByParentid(Integer value) throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution WHERE parentid=?\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n Manager.setInteger(ps, 1, value);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public List<Course> getAllCoursesById(int cid){\n Session session = this.factory.openSession();\n Query query = session.createQuery(\"from Course as course where course.category.categoryId =: id\");\n query.setParameter(\"id\", cid);\n List<Course> list = query.list();\n return list;\n }", "@Override\n\tpublic String getCourseId() \n\t{\n\t\treturn null;\n\t}", "public Courses getCourseTable();", "public Set<Course> getCoursesWithInstructor(UserProfile instructor)\n\t{\n\t\tSet<Course> rVal = null;\n\n\t\tif ((instructor.getPermLevel() >= UserProfile.TA) && (instructor.getPermLevel() <= UserProfile.ADMIN))\n\t\t{\n\t\t\trVal = new HashSet<Course>();\n\n\t\t\tfor (Connector e : network)\n\t\t\t{\n\t\t\t\tif (e.relationship == COURSE_INSTRUCTOR_RELATIONSHIP)\n\t\t\t\t{\n\t\t\t\t\tif (e.person.equals(instructor))\n\t\t\t\t\t{\n\t\t\t\t\t\trVal.add(getCourse(e.courseCRN));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn rVal;\n\t}", "@Query(\"SELECT * FROM course WHERE course_id = :course_id\")\n CourseEntity getCourseById(int course_id);", "public int countBycourse_id(long course_id);", "int getParentIdCount();", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<Course> selectAll();", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "@Override\n\tpublic List<TeacherCourseView> findTeacherCourseByKey(String courseKey) {\n\t\treturn cd.findTeaCourInfoByCourseKey(courseKey);\n\t}", "Tourst selectByPrimaryKey(String id);", "public Course getCourseById(String id);", "@Override\n public StudentHomework selectByP(Long id) {\n return studentHomeworkMapper.selectByPrimaryKey(id);\n }", "@Test\n public void test4() throws Exception {\n String jpql = \"SELECT c FROM Course c where SQL('course_mapped ->> ''?'' LIKE ''%i%''', c.name) AND \" +\n \"SQL('json_array_length(course_mapped #> ''{levels}'') > 0')\";\n Query q = em.createQuery(jpql, Course.class);\n List<Course> courses = q.getResultList();\n Assert.assertEquals(1,courses.size());\n Assert.assertEquals(\"First one\", courses.get(0).getCourseMapped().getName());\n }", "@Select({\n \"select\",\n \"courseid, code, name, teacher, credit, week, day_detail1, day_detail2, location, \",\n \"remaining, total, extra, index\",\n \"from generalcourseinformation\",\n \"where courseid = #{courseid,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"courseid\", property=\"courseid\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"code\", property=\"code\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"teacher\", property=\"teacher\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"credit\", property=\"credit\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"week\", property=\"week\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail1\", property=\"day_detail1\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"day_detail2\", property=\"day_detail2\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"location\", property=\"location\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"remaining\", property=\"remaining\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"total\", property=\"total\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"extra\", property=\"extra\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"index\", property=\"index\", jdbcType=JdbcType.INTEGER)\n })\n GeneralCourse selectByPrimaryKey(String courseid);", "public java.lang.Integer getParentId();", "public void selectParents1() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }", "List<UserCourseHistory> selectByExample(UserCourseHistoryExample example);", "private boolean checkPre(int id) {\r\n boolean x = true;\r\n try {\r\n String query = \"SELECT * FROM preregs WHERE courseid=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n ResultSet rs = pstmt.executeQuery();\r\n if (rs != null) {\r\n while (rs.next()) {\r\n if (!checkCompletedCourse(rs.getInt(\"preregid\"))) {\r\n x = false;\r\n break;\r\n }\r\n }\r\n }\r\n pstmt.close();\r\n rs.close();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return x;\r\n }", "@Override\n\tpublic List<Teacher_Course> getNoSelectTeacher_CourseByStudentId(\n\t\t\tint studentid) {\n\t\treturn teacher_coursedao.getNoSelectTeacher_CourseByStudentId(studentid);\n\t}", "List<DocPatRelation> selectRelationPatInfoByPatId(String patId);", "public ResultSet getRequired(int id) {\n\t\tResultSet rset = null;\n\t\tString sql = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tsql = \"SELECT * \" + \n\t\t\t\t \"FROM Required\" + \n\t\t\t\t \"WHERE dtype = major IN (SELECT major FROM student WHERE s_id = ?);\";\n\t\t\t\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(sql);\n\t\t\t\n\t\t\tpstmt.clearParameters();\n\t\t\tpstmt.setInt(1, id);\n\t\t\t\n\t\t\trset = pstmt.executeQuery();\n\t\t\t\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(\"createStatement \" + e.getMessage() + sql);\n\n\t\t}\n\t\t\n\t\treturn rset;\n\t}", "@Override\n\tpublic int queryCurrentIdbyStudentId(int sid) {\n\t\tSystem.out.println(\"curredt id\");\n\t\treturn leaseDAO.findCurrentIdbyStudentId(sid);\n\t}", "public SqlFromSubSelect getParent() {\n return parent;\n }", "public static int getPlanID(String title, int isContent, int parentID)\r\n {\r\n int planID = 0;\r\n\r\n try\r\n {\r\n PlanDAO planDao = PlanDAOFactory.getDAO();\r\n planID = planDao.getPlanID(title, isContent, parentID);\r\n }\r\n catch (PlanDAOSysException udse)\r\n {\r\n udse.printStackTrace();\r\n }\r\n\r\n return planID;\r\n }", "public ArrayList<Course> findCoursesById(String id) {\n ArrayList<Course> coursesById = new ArrayList<>(); \r\n for(int i=0; i < courses.size(); i++) {\r\n if (courses.get(i).getId().contains(id)) \r\n coursesById.add(courses.get(i));\r\n } \r\n return coursesById;\r\n }", "@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}", "public List<Subject> getsixthsubj(String course) {\n\t\treturn sub_dao.getsixthsubj(course);\r\n\t}", "@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.assessmentType <> 'AUTOMATIC'\n AND p.exercise.course.id = :#{#courseId}\n AND s.submitted = TRUE\n AND (s.type <> 'ILLEGAL' OR s.type IS NULL)\n \"\"\")\n long countLegalSubmissionsByCourseIdSubmitted(@Param(\"courseId\") Long courseId);", "public List<Models.Course> showCourses(String from) {\n // Get from all levels\n List<Models.Course> fromInstitution = em.createNativeQuery(\"select cr.* from course cr, programme pg, institution i, institutionparticipant ipa, participant p where cr.programmecode = pg.programmecode and pg.institutioncode = i.institutioncode and ipa.institutioncode = i.institutioncode and ipa.participantid = p.participantid and p.userid = ? and i.institutioncode = ?\", Models.Course.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n List<Models.Course> fromProgramme = em.createNativeQuery(\"select cr.* from course cr, programme pg,programmeparticipant ppa, participant p where cr.programmecode = pg.programmecode and ppa.programmecode = pg.programmecode and ppa.participantid = p.participantid and p.userid = ? and pg.programmecode = ?\", Models.Course.class).setParameter(1, user.getUserid()).setParameter(2, from).getResultList();\n\n // Combine the results\n List<Models.Course> results = new ArrayList<Models.Course>();\n results.addAll(fromInstitution);\n results.addAll(fromProgramme);\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" courses were found.\");\n\n for (Models.Course course : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Course?id=\" + course.getCoursecode() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>COURSE</a>\\n\"\n + \" <a class='name'>\" + course.getTitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + course.getCoursecode() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n\n return results;\n }", "public List peersFromCourse(Course course) throws SQLException {\n List listOfStudents = new ArrayList<>();\n String query = \"SELECT * FROM registration WHERE courseID = \\\"\"\n + retrieveCourseValue(course, \"courseID\") + \"\\\";\";\n Statement myStatement = null;\n ResultSet myResultSet = null;\n\n myStatement = studentConn.createStatement();\n myResultSet = myStatement.executeQuery(query);\n\n while (myResultSet.next()) {\n Student student = convertRegistrationRowToStudent(myResultSet);\n listOfStudents.add(student);\n }\n return listOfStudents;\n }", "public List<Subject> getfourthsubj(String course) {\n\t\treturn sub_dao.getfourthsubj(course);\r\n\t}", "@Query(value = \"SELECT a \" + \n \"FROM artikel a \" + \n \"WHERE a.artikelId = :\" + ApiNames.ARTIKEL_ID,\n nativeQuery = false)\n //@formatter:on\n @EntityGraph(value = \"artikel.withChildren\", type = EntityGraphType.FETCH)\n Optional<Artikel> findByArtikelId(@Param(ApiNames.ARTIKEL_ID) String artikelId);", "@Test\n public void test2() {\n MPCS_52011.setStudentCount(60); // Set the course as full for testing purposes.\n CourseAdd Course_Adder = new CourseAdd(MPCS_52011,Sophia,con);\n int updates = Course_Adder.getState().addStudent(Course_Adder,MPCS_52011,Sophia);\n assertEquals(1,updates); // Assert that an update was made\n assertTrue(MPCS_52011.getWaitingList().contains(Sophia)); // Check if Sophia present in waitlist\n List<Integer> StudentIDs = new ArrayList<Integer>();\n try{ // Check Database\n Statement stmt=con.createStatement();\n ResultSet rs=stmt.executeQuery(\"select StudentID from Waitlisted_Students where course_code = '\" + MPCS_52011.getcode() + \"';\");\n while(rs.next()){\n StudentIDs.add(rs.getInt(1)); // Add each student ID from database\n }\n }catch (Exception e){\n System.out.println(e);\n }\n assertTrue(StudentIDs.contains(Sophia.getID())); // Check is Sophia present in waitlist\n }" ]
[ "0.5746028", "0.56486875", "0.5621496", "0.5361674", "0.5295231", "0.5276666", "0.519011", "0.51776856", "0.5174698", "0.50528514", "0.50320226", "0.502833", "0.49948984", "0.4989603", "0.49665314", "0.49634752", "0.49488983", "0.49310598", "0.4884001", "0.48755792", "0.48361728", "0.4820093", "0.4819468", "0.47918975", "0.4786062", "0.47763935", "0.47746646", "0.47725224", "0.4770933", "0.47624856", "0.4741446", "0.4731193", "0.47153187", "0.47130623", "0.47035757", "0.4700012", "0.46655643", "0.46642238", "0.46634585", "0.4661753", "0.4661672", "0.46545124", "0.46526033", "0.46486092", "0.46465343", "0.46399376", "0.46299076", "0.4622996", "0.46191457", "0.45924836", "0.45858857", "0.45818776", "0.45813778", "0.4570147", "0.45635763", "0.45626026", "0.45557848", "0.45526093", "0.45516476", "0.4550375", "0.45407972", "0.45374185", "0.4531719", "0.45306975", "0.45284802", "0.45269743", "0.4523952", "0.4521581", "0.45186102", "0.45139867", "0.45132688", "0.4511841", "0.45109236", "0.45021856", "0.45020247", "0.44990128", "0.44962218", "0.4491508", "0.44879606", "0.44869527", "0.44869003", "0.4484971", "0.4484844", "0.44815493", "0.4479521", "0.4478136", "0.44671625", "0.44527537", "0.44485807", "0.4443839", "0.44437173", "0.4440194", "0.44376662", "0.4434782", "0.4428732", "0.44260573", "0.4422677", "0.44223225", "0.44196668", "0.4417699" ]
0.7043119
0
The basic fragment support for showing a simple confirmation dialog.
private void simpleConfirmRequest(int title, int message, boolean showCancel){ // Set up the fragment. FragmentManager mgr = null; try { mgr = getActivity().getSupportFragmentManager(); } catch (Exception ex) { return; } Fragment fragment = mgr.findFragmentByTag(KY_SIMPLE_CONFIRM_FRAG); if (fragment != null) { // Clear out the previous use. mgr.beginTransaction().remove(fragment).commit(); } // Launch the confirmation. DialogFragment submitFrag = new SimpleConfirmDialog(title, message, !showCancel); submitFrag.show(mgr, KY_SIMPLE_CONFIRM_FRAG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n FragmentManager fm = getFragmentManager();\n ConfirmDialogFragment cfDialog =\n ConfirmDialogFragment.getNewInstance(R.string.add_confirm, R.string.save_title);\n cfDialog.setTargetFragment(MemeViewFragment.this, REQUEST_CODE4);\n cfDialog.show(fm, CONFIRM);\n }", "@Override\n public void onClick(View v) {\n ThreeFragment dialogFragment = ThreeFragment.newInstance(\"Are you sure to do this action?\");\n dialogFragment.show(getFragmentManager(), \"dialog\");\n }", "private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public static void confirmation_Page(Context context, int layout_Id, Fragment fragment) {\n FragmentActivity activity = (FragmentActivity) context;\n FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction();\n fragmentTransaction.add(layout_Id, fragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "public void goToConfirmation() {\n ((AccountIdentifierRegistrationFragment) getParentFragment()).showChildFragment(PhoneNumberRegistrationConfirmationFragment.newInstance(this.airPhone, this.dataPassedIn.toBuilder().accountSource(AccountSource.Phone).build()), true);\n }", "void confirm();", "public void onConfirmPressed(Uri uri) {\n if (mListener != null) {\n mListener.onFragmentInteraction(0);\n }\n }", "@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }", "public abstract void showConfirmationBox(String message, Consumer<Boolean> resultCallback);", "public void onPressDelete() {\r\n new ActionConfirmationFragment(this, this)\r\n .setTitle(getString(R.string.event_confirmation_delete_event))\r\n .setMessage(getString(R.string.action_confirmation_cannot_be_undone))\r\n .setRequestID(REQUEST_CONFIRMATION_DELETE_EVENT)\r\n .show(getSupportFragmentManager(), null);\r\n }", "public void onDialogPositiveClick(DialogFragment dialog);", "@Override\r\n public void confirmDialogPositive(int callbackFunctionID) {\n \r\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public abstract boolean confirm();", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "String getConfirmationMessage();", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "@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 void showConfirm() {\n calledMethods.add(\"showConfirm\");\n }", "public OverviewSmallConfirmDialogOptions showConfirmDialog(String referenceID, String title, String textContent, String okText, String cancelText) {\n/*Generated! Do not modify!*/ ConfirmDialogParameters confirmDialogParameters = new ConfirmDialogParameters();\n/*Generated! Do not modify!*/ confirmDialogParameters.setReferenceID(referenceID);\n/*Generated! Do not modify!*/ confirmDialogParameters.setTitle(title);\n/*Generated! Do not modify!*/ confirmDialogParameters.setTextContent(textContent);\n/*Generated! Do not modify!*/ confirmDialogParameters.setOkText(okText);\n/*Generated! Do not modify!*/ confirmDialogParameters.setCancelText(cancelText);\n/*Generated! Do not modify!*/ replyDTO.setConfirmDialogParameters(confirmDialogParameters);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"showConfirmDialog(\" + escapeString(referenceID) + \", \" + escapeString(title) + \", \" + escapeString(textContent) \n/*Generated! Do not modify!*/ \t\t\t+ \", \" + escapeString(okText) + \", \" + escapeString(cancelText)+ \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ return new OverviewSmallConfirmDialogOptions(this, confirmDialogParameters);\n/*Generated! Do not modify!*/ }", "private void showConfirmationDeleteDialog(\n DialogInterface.OnClickListener yesButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.are_you_sure);\n builder.setPositiveButton(R.string.yes, yesButtonClickListener);\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "void onDialogPositiveClick(ChangePasswordFragment dialog);", "public void doPositiveClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\n }", "private void showConfirmDeletionDialog(){\n //give builder our custom dialog fragment style\n new AlertDialog.Builder(this, R.style.dialogFragment_title_style)\n .setMessage(getString(R.string.powerlist_confirmRemoval))\n .setTitle(getString(R.string.powerList_confirmRemoval_title))\n .setPositiveButton(getString(R.string.action_remove),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n myActionListener.userDeletingPowersFromList(\n PowerListActivity.this.adapter.getSelectedSpells());\n deleteButton.setVisibility(View.GONE);\n //tell adapter to switch selection mode off\n PowerListActivity.this.adapter.endSelectionMode();\n }\n })\n .setNegativeButton(getString(R.string.action_cancel), null)\n .show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n this.setCancelable(true);\n\n //NB! Må settes av kaller:\n Bundle bundle = this.getArguments();\n this.dialogTitle = bundle.getString(\"dialogTitle\");\n this.dialogText = bundle.getString(\"dialogText\");\n this.yesButtonText = bundle.getString(\"yesButtonText\");\n this.noButtonText = bundle.getString(\"noButtonText\");\n this.callback_id = bundle.getInt(\"callback_id\");\n int icon_drawable = bundle.getInt(\"icon_drawable\");\n\n //Bruker en styla dialog (se styles.xml):\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this.getActivity(), R.style.AlertDialogCustom));\n builder.setTitle(this.dialogTitle);\n builder.setIcon(icon_drawable);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_yesno_dialog, null);\n\n TextView tvDialogText = (TextView) view.findViewById(R.id.tvDialogText);\n tvDialogText.setText(dialogText);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(yesButtonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Lagre at tipset er sett...\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }\n })\n .setNegativeButton(noButtonText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogNegativeClick(YesNoDialog.this, callback_id);\n }\n });\n\n //Opprett og vis dialogen:\n Dialog dialog = builder.create();\n return dialog;\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message\n // This also creates click listeners for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the phone.\n deletePhone();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the phone.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Toast.makeText(this, \"OK\", Toast.LENGTH_LONG).show();\n\n }", "public void showConfirm(String message,final String actionCommand) {\n\t\tMessagebox.show(message, new Messagebox.Button[] { Messagebox.Button.YES\n\t\t\t\t, Messagebox.Button.CANCEL }, new EventListener<Messagebox.ClickEvent>() {\n\t\t\tpublic void onEvent(ClickEvent event) throws Exception {\n\t\t\t\tif(event.getButton()==Messagebox.Button.YES){\n\t\t\t\t\tbinder.postCommand(actionCommand, null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static void showConfirmationDialog(Context context,\n @StringRes int titleRes,\n @StringRes int messageRes,\n final SingleButtonCallback positiveAction,\n final SingleButtonCallback negativeAction) {\n new MaterialDialog.Builder(context)\n .title(titleRes)\n .content(messageRes)\n .positiveText(android.R.string.yes)\n .onPositive(positiveAction)\n .negativeText(android.R.string.no)\n .onNegative(negativeAction)\n .show();\n\t}", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_book_warning);\r\n builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n deletebook();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n if (dialogInterface != null) {\r\n dialogInterface.dismiss();\r\n }\r\n }\r\n });\r\n\r\n //show alert dialog upon deletion\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "private boolean showConfirmationMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n ButtonType buttonTypeCancel = new ButtonType(\"Cancel\", ButtonData.CANCEL_CLOSE);\r\n ButtonType buttonTypeOK = new ButtonType(\"OK\", ButtonData.OK_DONE);\r\n alert.getButtonTypes().setAll(buttonTypeCancel, buttonTypeOK);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == buttonTypeOK)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User confirmed coin action\");\r\n return true;\r\n } else if (result.isPresent() && result.get() == buttonTypeCancel)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User canceled coin Action\");\r\n return false;\r\n }\r\n return false;\r\n\r\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, null);\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteDialog(String yesLabel, String noLabel, String messageText, final int parameterId){\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.AppTheme_Dialog));\n builder.setMessage(messageText)\n .setPositiveButton(yesLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n new DeleteAquariumTask(parameterId).execute();\n }\n })\n .setNegativeButton(noLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n builder.create();\n builder.show();\n }", "private void MoodRatingAddNoteConfirmDialog() {\n final Dialog dialog = new Dialog(getActivity());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // Include dialog.xml file\n dialog.setContentView(R.layout.lay_moodratings_addnote);\n // Set dialog TV_TITLE\n dialog.setTitle(\"Custom Dialog\");\n\n // set values for custom dialog components - text, image and button\n TextView _tvNo = (TextView) dialog.findViewById(R.id.tvNo);\n TextView _tvYes = (TextView) dialog.findViewById(R.id.tvYes);\n\n dialog.show();\n _tvNo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n\n _tvYes.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n MoodRatingAddNoteDialog();\n }\n });\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tAlertDialog.Builder builder=new AlertDialog.Builder(getActivity());\t\r\n\t\t\tbuilder.setTitle(\"Version 1.0\")\r\n\t\t\t.setMessage(\"With the App User Easily get the Work and directly Interact with Admin.\");\r\n\t\tbuilder.setNegativeButton(\"CLOSE\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n // Write your code here to execute after dialog closed\r\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n \r\n // Showing Alert Message\r\n builder.show();\r\n\t\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_dialog_msg);\r\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Delete\" button, so delete the pet.\r\n// deletePet();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Cancel\" button, so dismiss the dialog\r\n // and continue editing.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "public void showDeleteConfirmationDialog(){\n //Create an AlertDialog.Builder and set the message, and click listeners\n //for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Delete this item?\");\n builder.setPositiveButton(\"Delete\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Delete\" button, so delete the item.\n deleteItem();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Cancel\" button, so dismiss the dialog\n //and continue editing the item.\n if(dialog != null){\n dialog.dismiss();\n }\n }\n });\n\n //Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity(), \"clicked okay\", Toast.LENGTH_SHORT).show();\n }", "public static void openConfirm(Shell parent, String title, String message)\n {\n open(MessageDialog.CONFIRM, parent, title, message, SWT.NONE);\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteFav();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public interface YesNoDialogConfirmation {\n\n public void onYesClicked(int pos,String type);\n}", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete products.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "private void showHelpFragment() {\n if (!helpFragment.isVisible()) {\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.add(R.id.relativeLayout, helpFragment, \"helpFragment\");\n transaction.commit();\n }\n\n else getFragmentManager().beginTransaction().remove(getFragmentManager().findFragmentByTag(\"helpFragment\")).commit();\n }", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the inventory item.\n deleteItem();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the inventory item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void showDeleteConfirmationAlertDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n //builder.setTitle(\"AlertDialog\");\n builder.setMessage(R.string.income_deletion_confirmation);\n\n // add the buttons\n builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (mIncome.getReceiptPic() != null) {\n if (!mIncome.getReceiptPic().equals(\"\")) {\n new File(mIncome.getReceiptPic()).delete();\n }\n }\n mDatabaseHandler.setPaymentLogEntryInactive(mIncome);\n //IncomeListFragment.incomeListAdapterNeedsRefreshed = true;\n setResult(MainActivity.RESULT_DATA_WAS_MODIFIED);\n IncomeViewActivity.this.finish();\n }\n });\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n // create and show the alert mDialog\n mDialog = builder.create();\n mDialog.show();\n }", "private void showConfirmSignOutDialog() {\n\t\tConfirmationDialogFragment dialog = ConfirmationDialogFragment.getInstance(getString(R.string.log_out_confirm),\n\t\t\t\tgetString(R.string.log_out_confirm_option_yes), REQUEST_CONFIRM_LOG_OUT, true);\n\t\tdialog.show(getSupportFragmentManager(), DIALOG_CONFIRM_LOG_OUT);\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.fragment_dialog);\n\n View tv = findViewById(R.id.text);\n ((TextView)tv).setText(R.string.example_alert_dialogfragment);\n\n // Watch for button clicks.\n Button button = (Button)findViewById(R.id.show);\n button.setOnClickListener(new OnClickListener() {\n /**\n * Called when the Button R.id.show (\"Show\") is clicked. We simply call our method\n * showDialog()\n *\n * @param v View of Button that was clicked\n */\n @Override\n public void onClick(View v) {\n showDialog();\n }\n });\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deletePet();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "private void alertMessage() {\n //remove friend confirmation dialog\n //taken from: http://www.androidhub4you.com/2012/09/alert-dialog-box-or-confirmation-box-in.html\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case DialogInterface.BUTTON_POSITIVE:\n // Yes button clicked\n logout();\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n // No button clicked\n // do nothing\n break;\n }\n }\n };\n\n //Show \"warning\" Dialog, if user is sure about deleting friend.\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(\"Are you sure you want to log out from this app?\")\n .setTitle(\"Logout\")\n .setPositiveButton(\"Yes\", dialogClickListener)\n .setNegativeButton(\"No\", dialogClickListener).show();\n }", "public void makeConfirmationDialog(View view) {\n new AlertDialog.Builder(this)\n .setTitle(\"Are you sure?\")\n .setCancelable(false)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n startExperiment();\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n return;\n }\n }).show();\n }", "private void showAlertDialog() {\n new AlertDialog.Builder(getActivity())\n .setMessage(R.string.feedback_sharing_data_alert)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, (dialog, which) -> {\n sendFeedback();\n })\n .show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"They decliened your invitation\";\n if(getArguments().getBoolean(\"hostDeclined\"))\n {\n mess = \"They canceled their invitation\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private static void JGUI4() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "@Override\n public void onClick(View v) {\n\n String msg = fragmentCallback.getMsgFromActivity(\"null\");\n Toast.makeText(BlankFragment1.this.getContext(), msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"REGISTRO PODA\");\n builder.setMessage(\"USUARIO O CONTRASEÑA INCORRECTA\");\n final AlertDialog.Builder ok = builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // You don't have to do anything here if you just want it dismissed when clicked\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showDialog(Context context) {\n \n }", "public String openShowUnconfirmed(){\r\n\t\treturn SUCCESS;\r\n\t}", "private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}", "@Override\n public void showDeleteProductDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_delete_product_confirm_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(android.R.string.yes, mProductDeleteDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(android.R.string.no, mProductDeleteDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "private void MessageDialog(String message, String pTitulo, String pLabelBoton){ // mostrar mensaje emergente\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()).setMessage(message).setTitle(pTitulo).setPositiveButton(pLabelBoton, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n fragment = new JustDonatedFragment();\n title = getString(R.string.title_just_donated);\n if (fragment != null) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.container_body, fragment);\n fragmentTransaction.commit();\n\n // set the toolbar title\n getSupportActionBar().setTitle(title);\n }\n\n }", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "private void showCustomDialog() {\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); //before\n // Include dialog.xml file\n dialog.setContentView(R.layout.success_dialog);\n TextView btn_home = dialog.findViewById(R.id.btn_home);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n btn_home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n // Set dialog title\n\n dialog.show();\n }", "public interface ConfirmCallback {\r\n\r\n /**\r\n * This event is triggered when the OK button is pressed.\r\n */\r\n void ok();\r\n\r\n /**\r\n * This event is triggered when the CANCEL button is pressed.\r\n */\r\n void cancel();\r\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg_course);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteCourse();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "void OpenFragmentInteraction();", "public static void display(String title, String message, String confirm) {\n AlertBox.display(title, message, confirm, AlertBox.DEFAULT_MIN_WIDTH, AlertBox.DEFAULT_MIN_Height);\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "public void showNoticeDialog() {\n DialogFragment dialog = new MyDialog();\n dialog.show(getSupportFragmentManager(), \"NoticeDialogFragment\");\n }", "public void showMessageDialog(int id, String caption, String message)\n{\n MessageDialog.newInstance(id, caption, message, this)\n .show(getFragmentManager(), \"\");\n}", "public void confirmStudentUpdate(){\n\n String title =\"Confirm student information update\";\n String HeaderText = \"Confirm inserted data\";\n String ContentText = \"Are you sure you want to update this student's information?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n updateStudent();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }", "public final void confirm(\n final Activity activity, \n final int title, \n final int message,\n final int positiveLabel, \n final int negativeLabel,\n final Runnable onPositiveClick,\n final Runnable onNegativeClick) {\n mHelper.confirm(getString(title), getString(message),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (onPositiveClick != null) onPositiveClick.run();\n }\n },\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (onNegativeClick != null) onNegativeClick.run();\n }\n },\n positiveLabel, negativeLabel);\n }", "public static DialogFragment acceptQuestionDialog(Context context, int amount, DialogInterface.OnClickListener positiveListener) {\n if (context == null) {\n return null;\n }\n if (!SharedDataManager.showConfirmationOfAcceptTarget(context)) {\n positiveListener.onClick(null, 0);\n return null;\n }\n BasicInfoDialogFragment dialogFragment = new BasicInfoDialogFragment();\n dialogFragment.setText(\n context.getString(R.string.dialog_wizard_accept_question_title),\n String.format(context.getString(R.string.dialog_wizard_accept_question_message), amount));\n dialogFragment.setPositive(context.getString(R.string.dialog_wizard_accept_question_positive), positiveListener);\n dialogFragment.setNegative(context.getString(R.string.dialog_wizard_accept_question_negative), null);\n commitFragment(context, dialogFragment, \"acceptQuestionDialogTag\");\n return dialogFragment;\n }", "@Override\n\tpublic void onNoButtonDialogToConfirmDuiClicked() {\n\n\t}", "@SuppressLint(\"CutPasteId\")\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_regristration, container, false);\n ((AppCompatActivity) getActivity()).getSupportActionBar().hide();\n\n name = view.findViewById(R.id.name);\n user_name = view.findViewById(R.id.user_name);\n user_password = view.findViewById(R.id.user_password);\n btn_register = view.findViewById(R.id.btn_register);\n progressBar_Loader = view.findViewById(R.id.progress_loader);\n\n progressBar_Loader.setVisibility(View.INVISIBLE);\n\n btn_register.setOnClickListener(v -> {\n progressBar_Loader.setVisibility(View.VISIBLE);\n btn_register.setVisibility(View.GONE);\n\n new Handler().postDelayed(() -> confirmInput(), 1500);\n\n });\n return view;\n }", "public void displayForgotPasswordDialog(View v) {\n\n FragmentManager fm = getSupportFragmentManager();\n ForgotPasswordFragment frag = new ForgotPasswordFragment();\n frag.show(fm, \"fragment_forgot_password\");\n }", "private static void showNotFoundDialog(FragmentActivity fragmentActivity,\r\n Context context,\r\n View view,\r\n String title,\r\n String artist){\r\n new FancyAlertDialog.Builder(fragmentActivity)\r\n .setTitle(context.getResources().getString(R.string.not_found_title))\r\n .setBackgroundColor(Color.parseColor(\"#F57C00\"))\r\n .setMessage(context.getResources().getString(R.string.not_found_message))\r\n .setNegativeBtnText(\"MODIFIER\")\r\n .setNegativeBtnBackground(Color.parseColor(\"#FFA9A7A8\"))\r\n .setPositiveBtnBackground(Color.parseColor(\"#F57C00\"))\r\n .setPositiveBtnText(context.getResources().getString(R.string.not_found_suggestions))\r\n .setAnimation(Animation.POP)\r\n .isCancellable(true)\r\n .setIcon(R.drawable.ic_pan_tool_black_24dp, Icon.Visible)\r\n .OnPositiveClicked(() -> {\r\n HomeFragmentDirections.ActionHomeFragmentToListMusicFragment action =\r\n HomeFragmentDirections.actionHomeFragmentToListMusicFragment(title, artist, SOURCE_SUGGESTION);\r\n Navigation.findNavController(view).navigate(action);\r\n })\r\n .OnNegativeClicked(() -> {\r\n Button button = view.findViewById(R.id.queryButton);\r\n button.setEnabled(true);\r\n })\r\n .build();\r\n }", "Observable<Void> showConfirmationDialog();", "@Override\n public void onClickDelete() {\n new DeleteDialog(this.getActivity(), this).show();\n }", "private void getAndSetConfirmMessage(ContentResponse data) {\n\t\t\n\t\tString title = getString(R.string.ibs_error_sorry);\n\t\tString message = getString(R.string.ibs_error_cannotLoadContent);\n\t\tif (data != null) {\n\t\t\tmessage = data.getContent();\n\t\t\ttitle = data.getTitle();\n\t\t\tAppCache.setUpgradeDialogContent(true, title, message);\n\t\t} else {\n\t\t\tAppCache.setUpgradeDialogContent(false, title, message);\n\t\t}\n\t\t\n\t\tFragment frag = getFragmentManager().findFragmentByTag(TAG_UPGRADE_CONFIRM);\n\t\tif (frag != null && frag instanceof SimpleConfirmDialog) {\n\t\t\t((SimpleConfirmDialog) frag).updateContent(title, message);\n\t\t}\t\t\n\t}", "public void ClickConfirmationPage() {\r\n\t\tconfirmation.click();\r\n\t\t\tLog(\"Clicked the \\\"Confirmation\\\" button on the Birthdays page\");\r\n\t}", "@Override\r\n public void confirmDialogNegative(int callbackFunctionID) {\n \r\n }" ]
[ "0.6874913", "0.6838749", "0.6707281", "0.6701889", "0.66649806", "0.65763587", "0.6569507", "0.65550125", "0.646672", "0.64109445", "0.6377511", "0.6373993", "0.6340292", "0.63222784", "0.63148814", "0.628865", "0.6238393", "0.62279624", "0.6203085", "0.61917883", "0.6190436", "0.61880255", "0.61828506", "0.61519146", "0.6144268", "0.61398447", "0.6128973", "0.6120398", "0.6115232", "0.6104434", "0.6051976", "0.6049346", "0.6048041", "0.60327274", "0.60293937", "0.6021508", "0.6014817", "0.5999174", "0.59722584", "0.5972092", "0.5972071", "0.5970094", "0.5968122", "0.59501487", "0.5932336", "0.5923745", "0.59166384", "0.5911125", "0.58978945", "0.5895906", "0.5895529", "0.5887311", "0.58787984", "0.58783585", "0.5874104", "0.58642995", "0.58605695", "0.5857623", "0.5855753", "0.584867", "0.5845316", "0.5840206", "0.5821482", "0.58189726", "0.58150864", "0.58096135", "0.5809284", "0.57880974", "0.5786931", "0.57771987", "0.5771575", "0.5767503", "0.5764368", "0.5756875", "0.5753061", "0.5745193", "0.57437634", "0.5742759", "0.57422435", "0.57395804", "0.5731433", "0.57280815", "0.57188416", "0.5713036", "0.5710195", "0.5707837", "0.5701137", "0.5692065", "0.5690509", "0.56838846", "0.56661844", "0.56584376", "0.5658243", "0.5646812", "0.5644787", "0.5640931", "0.5639744", "0.5630482", "0.5627832", "0.5623782" ]
0.7418264
0
Metoda zmieniajace wartosc punktow lojalnosciowych
@Override public void zmianaPkt(int wartosc){ this.pktLojalnosciowe+=wartosc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "void zmniejszBieg();", "private static void cajas() {\n\t\t\n\t}", "public void stampaScacchiera(String titolo)\n {\n System.out.println(titolo);\n System.out.println(\"=== Scacchiera \" +DIM_LATO+ \"x\" +DIM_LATO+ \" ===\");\n int r,c;\n for (r=0; r<DIM_LATO; r++)\n {\n for (c=0; c<DIM_LATO; c++) System.out.print(\"--\");\n System.out.println(\"-\");\n for (c=0; c<DIM_LATO; c++)\n {\n switch (contenuto(r,c))\n {\n case PEDINA_BIANCA: System.out.print(\"|b\"); break;\n case PEDINA_NERA: System.out.print(\"|n\"); break; \n case DAMA_BIANCA: System.out.print(\"|B\"); break; \n case DAMA_NERA: System.out.print(\"|N\"); break; \n case VUOTA: System.out.print(\"| \"); break;\n }\n }\n System.out.println(\"|\");\n }\n for (c=0; c<DIM_LATO; c++) System.out.print(\"--\");\n System.out.println(\"-\");\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }", "private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }", "public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}", "public static void main(String [] agrs){\n\r\n\r\n Kaczka gumowa = new GumowaKaczka();\r\n gumowa.ustawKwakanieInterfejs(2);\r\n gumowa.ustawLatanieInterfejs(new SzybkieLatanie());\r\n gumowa.wyswietl();\r\n System.out.println(gumowa.kwacz());\r\n System.out.println(gumowa.lec());\r\n Kaczka dzika = new DzikaKaczka();\r\n // dzika.ustawLatanieInterfejs(1);\r\n dzika.wyswietl();\r\n System.out.println(dzika.lec());\r\n System.out.println(dzika.kwacz());\r\n\r\n\r\n// Polecenie[] polecenieWlacz;\r\n// Polecenie[] polecanieWylacz;\r\n// Polecenie polecenieWycofaj;\r\n//\r\n// polecanieWylacz = new Polecenie[7];\r\n// polecenieWlacz = new Polecenie[7];\r\n//\r\n// Swiatlo swiatlo = new Swiatlo();\r\n// polecanieWylacz[0] = new PolecenieWylaczSwiatlo(swiatlo);\r\n// polecenieWlacz[0] = new PolecenieWlaczSwiatlo(swiatlo);\r\n//\r\n//\r\n//\r\n//\r\n// polecenieWlacz[0].wykonaj();\r\n// polecanieWylacz[0].wykonaj();\r\n// polecenieWlacz[0].wykonaj();\r\n// polecenieWycofaj = polecanieWylacz[0];\r\n//// polecenieWycofaj = polecenieWlacz[0];\r\n// polecenieWycofaj.wykonaj();\r\n// polecenieWycofaj.wykonaj();\r\n//// polecenieWycofaj.wycofaj();\r\n//\r\n// WiezaStereo wiezaStereo = new WiezaStereo();\r\n//\r\n// polecenieWlacz[1] = new PolecenieWiezaStereoWlaczCD(wiezaStereo);\r\n//\r\n// polecenieWlacz[1].wykonaj();\r\n\r\n\r\n\r\n }", "double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }", "private Zivocich vytvorZivocicha() {\r\n final String[] zFarba = {\"cervena\", \"zelena\", \"modra\", \"zlta\", \"zlto-zelena\"};\r\n Zivocich zviera = null;\r\n double kolkoVazi = 0.0;\r\n\r\n //-- Vygenerujeme zviera\r\n int vygenerovane = 1 + generator.nextInt(4); //cislo <1,4>\r\n\r\n switch (vygenerovane) {\r\n case 1: //blcha \r\n double kolkoDoskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n double kolkoVyskoci=3 * generator.nextDouble() ; //cislo <0;2.99>\r\n zviera=new Blcha(6,kolkoDoskoci,kolkoVyskoci);\r\n break;\r\n case 2: //simpanz\r\n kolkoVazi=3 + (97 * generator.nextDouble()); //cislo <3;99.9>\r\n boolean cviceny;\r\n cviceny=generator.nextBoolean(); \r\n zviera=new Simpanz(kolkoVazi,cviceny);\r\n break;\r\n case 3: //papagaj\r\n kolkoVazi = 0.1 + (5*generator.nextDouble()); // cislo <0.1; 6>\r\n String farba = zFarba[generator.nextInt(5)]; // farba zo zoznamu\r\n zviera = new Papagaj(\"Ara\", 2, kolkoVazi, farba); \r\n break;\r\n case 4: //slon\r\n kolkoVazi=20 + (480*generator.nextDouble()); //cislo <20;500> \r\n int pocet=generator.nextInt(50); //pocet zubov bude <0,49>\r\n zviera=new Slon(kolkoVazi,pocet);\r\n break;\r\n } //------------------------------------------------------------- switch --\r\n return zviera;\r\n }", "public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}", "private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }", "private stendhal() {\n\t}", "public void ZbierzTowaryKlas() {\n\t\tSystem.out.println(\"ZbierzTowaryKlas\");\n\t\tfor(int i=0;i<Plansza.getTowarNaPlanszy().size();i++) {\n\t\t\tfor(Towar towar : Plansza.getTowarNaPlanszy()) {\n\t\t\t\t\n\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getNiewolnikNaPLanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getNiewolnikNaPLanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t//Szansa Niewolnika na zdobycie dwoch razy wiecej towarow\n\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getNiewolnicySzansa()) {\n\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikTowarow(Plansza.getNiewolnikNaPLanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getRzemieslnikNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getRzemieslnikNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikTowarow(Plansza.getRzemieslnikNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getXpolozenie()-1 <= towar.getXtowar() && Plansza.getArystokrataNaPlanszy().getXpolozenie()+1 >= towar.getXtowar()) \n\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getYpolozenie()-1 <= towar.getYtowar() && Plansza.getArystokrataNaPlanszy().getYpolozenie()+1 >= towar.getYtowar()) {\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().ZbieranieTowarow(towar);\n\t\t\t\t\t\tPlansza.getTowarNaPlanszy().remove(towar);\n\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikTowarow(Plansza.getArystokrataNaPlanszy().getLicznikTowarow()+1);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void logika_rozpocznij(){\n\t}", "public static void main(String[] args) {\n\n\t\tWindow.startOkno();\n\t\tWindow.zacni.setEnabled(false);\n\n\t\tSystem.out.println(\"Spoustim...\");\n\n\t\tGenerator.generujSouradniceACesty();\n\t\tInputOutput.zapisSouradniceACestyDoSouboru();\n\t\tMatice.vygenerujMatice();\n\n\t\tFile f = new File(InputOutput.MATICE_CEST_SOUBOR);\n\t\tif (f.exists() && !f.isDirectory()) {\n\t\t\tMatice.nactiMaticiNejkratsichCestZeSouboru();\n\t\t} else {\n\t\t\tSystem.out.println(\"Generuji matici nejkratsich cest\");\n\t\t\tMatice.vytvorNejkratsiCesty();\n\t\t\tInputOutput.zapisMaticeNejkratsichCest(Matice.maticeNejkratsichCest);\n\t\t}\n\n\t\tSystem.out.println(\"Pripraveno...\");\n\t\tWindow.zacni.setEnabled(true);\n\t\tWindow.aktualizace.setEnabled(true);\n\t}", "public void sendeSpielfeld();", "public void sendeFehlerHelo();", "public abstract String dohvatiKontakt();", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "@Test\n public void testSpremiKonfiguraciju() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju();\n assertTrue(datKonf.exists());\n }", "public static void main(String[] args) {\n\t\tint x = 3;\n\t\tint potega = 2;\n\t\t\n\t\t\n\t\t//wiekszosc metod bazuje na wewnetrznych polach klasy.\n\t\t//np klasa liczba ma wartosc (podawana w konstruktorze)\n\t\t//metoda PodniesDoPotegi operuje na polu 'wartosc' i podnosi ja do potegi, a nastepnie zwraca wynik\n\t\t//(mozna wyobrazic sobie tez taka metode ktora nie zwraca wyniku tylko zmianie pole 'wartosc' podnoszac je do potegi\n\t\tLiczba liczba = new Liczba(x);\n\t\tint liczbaPodniesionaDoPotegi = liczba.PodniesDoPotegi(potega);\n\t\t\n\t\t//niektore metody dzialaja niezależnie od klas.\n\t\t//np metoda statyczna PodniesDoPotegi pobiera liczbe ktora ma być podniesiona oraz potege.\n\t\t//nie używa ona w swoim ciele żadnych nie statycznych metod ani pol\n\t\t liczbaPodniesionaDoPotegi = Liczba.PodniesDoPotegi(x, potega);\n\t\t\n\t\t //taka metode można przenieść do dowolnej klasy i tez bedzie dzialać, dlatego ze nie jest ona zależna od obiektow klasy.\n\t\t//np:\n\t\t liczbaPodniesionaDoPotegi = ABC.PodniesDoPotegi(x, potega);\n\t\t\n\t\t //funkcje statyczne moga uzywac pol i metod STATYCZNYCH\n\t\t // NP:\n\t\t\n\t\tint maxValue = Liczba.MaxValue();\n\t\t\n\t\t//przykład uzycia wzorca projektowego singleton\n\t\tMySingleton mysingleton = MySingleton.GetInstance();\n\t\tmysingleton.doSemethink();\n\t\t\n\t\tMySingleton mysingleton2 = MySingleton.GetInstance();\n\t\t\n\t\t//mysingleton i mysingleton2 pokazuje na ten sam obiekt;\n\t\t\n\t}", "protected boolean strzalSasiadujacy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\t//przygotowanie kontenera przechowujacego do 4 sasiednich pol, ktore nadaja sie do kolejnego strzalu\n\t\tArrayList<Pozycja> oSasiedniePola = new ArrayList<Pozycja>(4);\n\t\t//petla wyszukujaca we wczesniejszych trafieniach pola do oddania kolejnego strzalu\n\t\twhile (oUzyteczneTrafienia.size() > 0)\n\t\t\t{\n\t\t\t//wylosowanie pola do przetestowania\n\t\t\tint iLosowanePole = oRand.nextInt(oUzyteczneTrafienia.size());\n\t\t\tPozycja oWybranePole = oUzyteczneTrafienia.get(iLosowanePole);\n\t\t\t\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\t//wczytanie wspolrzednych 4 sasiadow i sprawdzenie, czy sa to pola puste, lub zawierajace statek\n\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_POLE_PUSTE\n\t\t\t\t\t\t\t\t|| oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STATEK\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tPozycja oPrawidlowe = new Pozycja(2);\n\t\t\t\t\t\t\t\toPrawidlowe.setX(oWybranePole.getX() + i);\n\t\t\t\t\t\t\t\toPrawidlowe.setY(oWybranePole.getY() + j);\n\t\t\t\t\t\t\t\toSasiedniePola.add(oPrawidlowe);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (bProsteLinie == true)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bPionowy = false;\n\t\t\t\t\tboolean bPoziomy = false;\n\t\t\t\t\tfor (int i = -1; i <= 1; ++i)\n\t\t\t\t\t\tfor (int j = -1; j <= 1; ++j)\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\toWybranePole.getX() + i >= 0 && oWybranePole.getX() + i < oStatkiPrzeciwnika.getPlansza().getSzerokosc()\n\t\t\t\t\t\t\t\t&& oWybranePole.getY() + j >= 0 && oWybranePole.getY() + j < oStatkiPrzeciwnika.getPlansza().getWysokosc()\n\t\t\t\t\t\t\t\t&& (i + j == -1 || i + j == 1)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (oStatkiPrzeciwnika.getPlansza().getPole(oWybranePole.getX() + i, oWybranePole.getY() + j) == PlanszaTypPola.PLANSZA_STRZAL_CELNY)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (i == 0)\n\t\t\t\t\t\t\t\t\t\tbPionowy = true;\n\t\t\t\t\t\t\t\t\tif (j == 0)\n\t\t\t\t\t\t\t\t\t\tbPoziomy = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\tif (bPionowy == true && bPoziomy == true)\n\t\t\t\t\t\tthrow new ProgramistaException();\n\t\t\t\t\tif (bPionowy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getX() != oWybranePole.getX())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\tif (bPoziomy == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = oSasiedniePola.size() - 1; i >= 0; --i)\n\t\t\t\t\t\t\tif (oSasiedniePola.get(i).getY() != oWybranePole.getY())\n\t\t\t\t\t\t\t\toSasiedniePola.remove(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (oSasiedniePola.size() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t//sa pola prawidlowe do oddania kolejnego strzalu\n\t\t\t\t\tint iWylosowanySasiad = oRand.nextInt(oSasiedniePola.size());\n\t\t\t\t\t//oddanie strzalu na wspolrzedne weybranego pola\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oSasiedniePola.get(iWylosowanySasiad).getX(), oSasiedniePola.get(iWylosowanySasiad).getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oSasiedniePola.get(iWylosowanySasiad).getX() );\n\t\t\t\t\t\toTrafienie.setY( oSasiedniePola.get(iWylosowanySasiad).getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t//brak prawidlowych pol. usuniecie trafienia z listy i przejscie do kolejnej iteracji petli wyszukujacej\n\t\t\t\t\toUzyteczneTrafienia.remove(iLosowanePole);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcatch (ParametrException e)\n\t\t\t\t{\n\t\t\t\tthrow new ProgramistaException(e);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\treturn strzalLosowy(oStatkiPrzeciwnika);\n\t\t}", "public SiacTRecapitoSoggetto() {\n\t}", "protected boolean strzalLosowy(StatekIterator oStatkiPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = losujPole(oStatkiPrzeciwnika.getPlansza());\n\t\t\tboolean bTrafienie = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\tif (bTrafienie == true)\n\t\t\t\t{\n\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\toTrafienie.setX(oWylosowanePole.getX());\n\t\t\t\toTrafienie.setY(oWylosowanePole.getY());\n\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t}\n\t\t\treturn bTrafienie;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}", "public IzvajalecZdravstvenihStoritev() {\n\t}", "public int liczbaelnastosie() {\n\t\treturn 0;\n\t}", "private Pozycja losujPole(Plansza oPlanszaPrzeciwnika)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = new Pozycja(2);\n\t\t\tint iWylosowanePole = oRand.nextInt( oPlanszaPrzeciwnika.getIloscNieznanych() ) + 1;\n\t\t\t//obliczenie x i y dla wylosowanego pola\n\t\t\tint iX = 0;\n\t\t\tint iY = 0;\n\t\t\twhile (iWylosowanePole > 0)\n\t\t\t\t{\n\t\t\t\tif (oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_POLE_PUSTE || oPlanszaPrzeciwnika.getPole(iX, iY) == PlanszaTypPola.PLANSZA_STATEK)\n\t\t\t\t\t--iWylosowanePole;\n\t\t\t\tif (iWylosowanePole > 0)\n\t\t\t\t\t{\n\t\t\t\t\t++iX;\n\t\t\t\t\tif (iX == oPlanszaPrzeciwnika.getSzerokosc())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t++iY;\n\t\t\t\t\t\tiX = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\toWylosowanePole.setX(iX);\n\t\t\toWylosowanePole.setY(iY);\n\t\t\treturn oWylosowanePole;\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t}", "public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}", "public void sproziRisanje(String[] args) {\n try {\n int wPlatno = PRIVZETA_SIRINA_PLATNA;\n int hPlatno = PRIVZETA_VISINA_PLATNA;\n File datoteka = null;\n\n // obdelaj argumente ukazne vrstice\n for (int i = 0; i < args.length; i++) {\n if (args[i].indexOf(\".\") >= 0) {\n String[] imeKoncnica = args[i].split(\"\\\\.\");\n String koncnica = imeKoncnica[imeKoncnica.length - 1];\n if (!koncnica.equals(\"png\")) {\n throw new IllegalArgumentException(\"Datoteka mora imeti končnico .png\");\n }\n datoteka = new File(args[i]);\n\n } else if (args[i].indexOf(\"x\") >= 0) {\n String[] wh = args[i].split(\"x\");\n wPlatno = Integer.parseInt(wh[0]);\n hPlatno = Integer.parseInt(wh[1]);\n\n } else {\n throw new RuntimeException();\n }\n }\n\n // V odvisnosti od tipa platna ustvari okno in plo\"s\"co oziroma\n // pomnilni\"sko sliko. V primeru izdelave pomnilni\"ske slike\n // pokli\"ci metodo `narisi' in shrani izdelano sliko v datoteko.\n // V primeru izdelave okna pa se bo metoda `narisi' poklicala\n // preko metode paintComponent risalne plo\"s\"ce.\n\n if (datoteka == null) {\n this.ustvariOknoInPlosco(wPlatno, hPlatno);\n } else {\n this.izdelajPNG(wPlatno, hPlatno, datoteka);\n }\n\n } catch (IllegalArgumentException ex) {\n System.err.println(\"====================================\");\n System.err.println(ex.getMessage());\n System.err.println(\"====================================\");\n izpisiNavodila();\n\n } catch (RuntimeException ex) {\n // nekaj je narobe; izpi\"si navodila za uporabo\n izpisiNavodila();\n }\n }", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public int podaj_ostrosc(){\n\t\tdo{System.out.print(\"Podaj ostrość pizzy w zakresie od 0 do 10:\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner ostr= new Scanner(System.in);\n\t\tostrosc= ostr.nextInt();\n\t\tif(ostrosc<0 || ostrosc>10){\n\t\t\tSystem.out.println(\"Zły zakres ostrości\");\n\t\t }\n\t\t}while(ostrosc<0 || ostrosc>10);\n\t\treturn ostrosc;\n\t\t}", "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "protected boolean strzalWielokrotny(StatekIterator oStatkiPrzeciwnika, int iIloscPowtorzen)\n\t\t{\n\t\ttry\n\t\t\t{\n\t\t\tPozycja oWylosowanePole = null;\n\t\t\tPlansza oPlansza = oStatkiPrzeciwnika.getPlansza();\n\t\t\tfor (int i = 1; i <= iIloscPowtorzen; ++i)\n\t\t\t\t{\n\t\t\t\toWylosowanePole = losujPole(oPlansza);\n\t\t\t\tif (oPlansza.getPole(oWylosowanePole.getX(), oWylosowanePole.getY()) == PlanszaTypPola.PLANSZA_STATEK || i == iIloscPowtorzen)\n\t\t\t\t\t{\n\t\t\t\t\tboolean bStrzal;\n\t\t\t\t\tbStrzal = oStatkiPrzeciwnika.strzal(oWylosowanePole.getX(), oWylosowanePole.getY());\n\t\t\t\t\tif (bStrzal == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//zapisanie celnego strzalu w tablicy trafien\n\t\t\t\t\t\tPozycja oTrafienie = new Pozycja(2);\n\t\t\t\t\t\toTrafienie.setX( oWylosowanePole.getX() );\n\t\t\t\t\t\toTrafienie.setY( oWylosowanePole.getY() );\n\t\t\t\t\t\toUzyteczneTrafienia.add(oTrafienie);\n\t\t\t\t\t\t}\n\t\t\t\t\treturn bStrzal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (ParametrException e)\n\t\t\t{\n\t\t\tthrow new ProgramistaException(e);\n\t\t\t}\n\t\t//petla musi zwrocic strzal. skoro doszlo tutaj - wywal wyjatek\n\t\tthrow new ProgramistaException();\n\t\t}", "public abstract Koordinate schuss();", "public void PedirSintomas() {\n\t\t\r\n\t\tSystem.out.println(\"pedir sintomas del paciente para relizar el diagnosticoa\");\r\n\t}", "public void vaaraSyote() {\n System.out.println(\"En ymmärtänyt\");\n kierros();\n }", "private void restartujZegar()\n {\n czas = 180;\n }", "public static int drwal(String[] args){\n if (args.length == 5) {\n //Sprawdzanie czy argument 1,2,4,5 to inty\n try {\n Integer.parseInt(args[0]);\n Integer.parseInt(args[1]);\n Integer.parseInt(args[3]);\n Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n System.out.println(\"klops\");\n return 0;\n }\n int xStart = Integer.parseInt(args[1]);\n int yStart = Integer.parseInt(args[0]);\n Character kolor = args[2].charAt(0);\n int szerokosc = Integer.parseInt(args[3]);\n int wysokosc = Integer.parseInt(args[4]);\n Scanner input = new Scanner(System.in);\n char[][] output1 = new char[wysokosc][szerokosc];\n int wyscount = 0;\n int counter = 0;\n //Jezeli szerokosc albo wysokosc > 5000\n //Jezeli xstart > szerokosc, ystart > wysokosc\n if (!((szerokosc > 5000 || wysokosc > 5000)||(xStart > szerokosc || yStart > wysokosc))){\n while(input.hasNextLine()){\n String tmp;\n byte[] isUTF = null;\n try {\n tmp = input.nextLine();\n isUTF = tmp.getBytes(\"UTF-8\");\n }\n catch(UnsupportedEncodingException e){\n System.out.println(\"klops\");\n return 0;\n }\n if (wyscount > wysokosc || tmp.length() > szerokosc){\n System.out.println(\"klops\");\n return 0;\n }\n for (int i = 0;i<tmp.length();i++){\n output1[counter][i] = tmp.charAt(i);\n }\n counter++;\n wyscount++;\n }\n int startx = xStart -1;\n int starty = yStart -1;\n //Jezeli punkt startowy to spacja to zaczynamy kolorowanie\n if (output1[startx][starty]==' '){\n output1 = color(output1,kolor,startx,starty);\n }\n //wypisywanie na wyjsciu pokolorwanego obrazka\n for (int i=0;i<wyscount;i++){\n for (int j=0;j<szerokosc;j++){\n System.out.print(output1[i][j]);\n }\n System.out.println();\n }\n }\n else {\n System.out.println(\"klops\");\n return 0;\n }\n }\n else{\n System.out.println(\"klops\");\n return 0;\n }\n return 0;\n }", "public void obliczSzanseWykolejenia(Tramwaj tramwaj, Pogoda pogoda, Motorniczy motorniczy, Przystanek przystanek){\r\n RegulyWykolejen regulyWykolejen= new RegulyWykolejen();\r\n this.szansaWykolejenia = pogoda.getRyzyko() + przystanek.getStanTechnicznyPrzystanku() + tramwaj.getStanTechTramwaju() + regulyWykolejen.regulaWiek(motorniczy.getWiek()) + regulyWykolejen.regulaDoswiadczenie(motorniczy.getDoswiadczenie());\r\n }", "public void exportToXML(String sciezka) {\n\t\tFile plik = new File(sciezka);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\n\t\ttry\t{\n\t\t\tplik.createNewFile();\n\t\t\tFileWriter strumienZapisu = new FileWriter(plik);\n\t\t\tstrumienZapisu.write(\"<ListaZdarzen>\\n\");\n\t\t\tfor (int i=0; i < listaZdarzen.size(); i++) {\n\t\t\t\tstrumienZapisu.write(\"\\t<zdarzenie>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<id>\");\n\t\t\t\tstrumienZapisu.write(Integer.toString(listaZdarzen.get(i).getId()));\n\t\t\t\tstrumienZapisu.write(\"</id>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<data>\");\n\t\t\t\tstrumienZapisu.write(sdf.format(listaZdarzen.get(i).getDataZdarzenia()));\n\t\t\t\tstrumienZapisu.write(\"</data>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<nazwa>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getNazwa());\n\t\t\t\tstrumienZapisu.write(\"</nazwa>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<opis>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getOpis());\n\t\t\t\tstrumienZapisu.write(\"</opis>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t\\t<miejsce>\");\n\t\t\t\tstrumienZapisu.write(listaZdarzen.get(i).getMiejsce());\n\t\t\t\tstrumienZapisu.write(\"</miejsce>\\n\");\n\t\t\t\t\n\t\t\t\tstrumienZapisu.write(\"\\t</zdarzenie>\\n\");\n\t\t\t}\n\t\t\tstrumienZapisu.write(\"</ListaZdarzen>\");\n\t\t\tstrumienZapisu.close();\n\t\t}\n\t\tcatch (IOException io)\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t{System.out.println(io.getMessage());}\n\t\tcatch (Exception se)\n\t\t\t{System.err.println(\"blad sec\");}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}", "void berechneFlaeche() {\n\t}", "@Test\n @Ignore\n public void testUcitajKonfiguraciju() throws Exception {\n System.out.println(\"ucitajKonfiguraciju\");\n KonfiguracijaTxt instance = null;\n instance.ucitajKonfiguraciju();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void actionMisil() {\n\t\tSystem.out.println(\"미사일 있다.\");\r\n\t}", "public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}", "private void poetries() {\n\n\t}", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public void stworzWrogow() {\n\t\tfor(; aktualnaLiczbaWrogow < MAX_LICZBA_WROGOW; aktualnaLiczbaWrogow++) {\n\t\t\tdouble x = (generatorWspolrzednych.nextInt(550)) + 20 ;\n\t\t\tdouble y = ((generatorWspolrzednych.nextInt(750)) + 20);\n\t\t\tx = x < 0 ? -x : x; \n\t\t\ty = y < 0 ? y : -y;\n\t\t\tStatekWroga statekWroga = new StatekWroga(new Wspolrzedne(x, y));\n\t\t\t\n\t\t\tstatekWroga.setDol(DLUGOSC_RUCHU);\n\t\t\t\n\t\t\tstatkiWroga.add(statekWroga);\n\t\t}\n\t}", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "public void test2(){\r\n\t\tZug zug1 = st.zugErstellen(2, 2, \"Zug 1\");\r\n\t\tst.fahren();\r\n\t}", "public boolean czyKolizja()\n\t{\n\t\tif(aktualnyNumerSciezki == -1)\n\t\t\treturn false;\n\t\tSciezka s = droga.get(aktualnyNumerSciezki);\n\t\treturn s.czyKolizja(pojazd);\t\n\t}", "public void RuchyKlas() {\n\t\tSystem.out.println(\"RuchyKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Ruch();\n\t\tPlansza.getRzemieslnikNaPlanszy().Ruch();\n\t\tPlansza.getArystokrataNaPlanszy().Ruch();\n\t}", "@Test\n\tpublic void ricercaSinteticaClassificatoreGSAFigli() {\n\n\t}", "public static void main(String[] args) {\n wywolajKopiec();\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "@Override\n\tprotected void trazOutroATona() {\n\t\t\n\t}", "public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}", "@Test\n public void testSpremiKonfiguraciju_String() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju(datKonf.getName());\n assertTrue(datKonf.exists());\n }", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "public void setProsteLinie(boolean bWartosc)\n\t\t{\n\t\tbProsteLinie = bWartosc;\n\t\t}", "public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }", "private Unescaper() {\n\n\t}", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public void aplicarDescuento();", "public TrasaPunktowana(String start, String koniec, GrupaGorska gr, PodgrupaGorska pd, StopienTrudnosci st, boolean niepelnosprawny, int pktwej, int pktzej){\n miejscePoczatkowe = start;\n miejsceKoncowe = koniec;\n grupaGorska = gr;\n podgrupaGorska = pd;\n stopienTrudnosci = st;\n czyDlaNiepelnosprawnych = niepelnosprawny;\n punktyZaWejscie = pktwej;\n punktyZaZejscie = pktzej;\n }", "public void sinyal();", "@Override\n\tprotected char scegliMossaDaFare(int iAvversario, int jAvversario, char[][] scacchiera) {\n\t\t\n\t\tif(this.storicoMosseAvversario.isEmpty()) {\n\t\t\tswitch(new Random(2).nextInt()) {\n\t\t\t\tcase 0: return 'U';\n\t\t\t\tcase 1: return 'D';\n\t\t\t\tcase 2: if(this.posX == 4 && this.posY == DIM - 1)\n\t\t\t\t\t\t\treturn 'R';\n\t\t\t\t\t\treturn 'L';\n\t\t\t}\n\t\t}\n\n\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'U' && rimaneNellaScacchiera(this.posY + 1))\n\t\t\t//if(casellaLibera)\n\t\t\treturn 'D';\n\t\telse\n\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'D' && rimaneNellaScacchiera(this.posY - 1))\n\t\t\t\treturn 'U';\n\t\t\telse \n\t\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'L' && rimaneNellaScacchiera(this.posX + 1))\n\t\t\t\t\treturn 'R';\n\t\t\t\telse\n\t\t\t\t\treturn 'L';\n\t}", "@Override\n\tpublic void missiel() {\n\t\tSystem.out.println(\"미사일을 쏠 수 있습니다\");\n\n\t}", "public abstract void zza(zzeim zzeim) throws IOException;", "@Override\r\n\tpublic void trunOff() {\n\t\tSystem.out.println(\"켜다\");\r\n\t}", "public ProgramWilmaa()\n\t{\n\t}", "public void test6(){\r\n\t\tZug zug1 = st.zugErstellen(2, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(2, 0, \"Zug 2\");\r\n\t\tst.fahren();\r\n\t}", "private void ss(){\n }", "private Rekenhulp()\n\t{\n\t}", "private void wczytajPlanszeZdalnie()\n\t{\n\t\tPobraniePlanszy pobranie = new PobraniePlanszy(pojazd.ktoryPoziom(), this, port, host);\n\t\tThread zadanie = new Thread(pobranie);\n\t\tzadanie.start();\t\n\t}", "void Vorrücken()\n {\n }", "public void RealizarDiagnostico() {\n\t\tSystem.out.println(\"realizar dicho diagnostico con los sintomas presentados por el paciente\");\r\n\t}", "public boolean sucheMitspieler();", "public static void main(String[] args) {\n wywolajLiczbyPierwsze();\n\n }", "public void stampajPodsjetnik (int mjesec, int godina) throws FileNotFoundException{\r\n\t\t\r\n\t\tboolean imaLiZapisa = false;\r\n\t\t//ucitavanje podataka/zapisa iz fajla\r\n\t\tInOutPodsjetnik podsjetnik = new InOutPodsjetnik();\r\n\t\tpodsjetnik.ucitajPodsjetnik();\r\n\t\tzapisi = podsjetnik.getPodsjetnici();\r\n\t\t//stampanje zaglavlja\r\n\t\tSystem.out.println(\"\\n\\n***************************************************\\n\" \r\n\t\t\t + \"* PODSJETNIK *\\n\"\r\n\t\t\t + \"***************************************************\\n\" );\r\n\t\t\r\n\t\t//prolazak kroz sve zapise\r\n\t\tfor(int i = 0; i < zapisi.size(); i++){\r\n\t\t\t//ako za trazeni mjesec ima zapisa, stampaju se zapisi\r\n\t\t\tif(zapisi.get(i).getMjesec() == mjesec && zapisi.get(i).getGodina() == godina){\r\n\t\t\t\tSystem.out.println(zapisi.get(i).getText());\r\n\t\t\t\timaLiZapisa = true;\r\n\t\t\t}\r\n\t\t\t//ako za trazeni mjesec nema zapisa, stampa se odgovarajuca poruka\r\n\t\t\tif(i == zapisi.size() - 1 && imaLiZapisa == false){\r\n\t\t\t\tSystem.out.println(\"Nema zapisa za ovaj mjesec.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals(\"\")) {\r\n\t\t\t\t\t++licznik;\r\n\t\t\t\t}\r\n\r\n\t\t\ttablicaWynik = new String[2 * licznik];\r\n\r\n\t\t\tm = 0;\r\n\r\n\t\t\tfor (String str : bufor)\r\n\t\t\t\tif (!str.equals(\"\")) {\r\n\t\t\t\t\ttablicaWynik[m] = str;\r\n\t\t\t\t\ttablicaWynik[m + 1] = \" \";\r\n\t\t\t\t\t++m;\r\n\t\t\t\t\t++m;\r\n\t\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(tablicaWynik);\r\n\t\t}\r\n\t}", "public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}", "private UsineJoueur() {}", "public void asetaTeksti(){\n }", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "public void stampajSpisak() {\n\t\t\n\t\tif (prviFilm != null) {\n\t\t\t\n\t\t\tFilm tekuciFilm = prviFilm;\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tSystem.out.println(\"Filmovi: \");\n\t\t\t\n\t\t\twhile (tekuciFilm != null) {\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\"Film #\" + count + \": '\" + tekuciFilm.naziv + \"'\");\n\t\t\t\t\n\t\t\t\tif (tekuciFilm.sadrzaj == null) {\n\t\t\t\t\tSystem.out.println(\"\\tNema unetih glumaca.\");\n\t\t\t\t} else {\n\t\t\t\t\tGlumac tekuciGlumac = tekuciFilm.sadrzaj;\n\t\t\t\t\t\n\t\t\t\t\twhile (tekuciGlumac != null) {\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + tekuciGlumac);\n\t\t\t\t\t\ttekuciGlumac = tekuciGlumac.veza;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttekuciFilm = tekuciFilm.veza;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Spisak je prazan.\");\n\t\t}\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public static void c2() {\n\t\tout(Ziffer.werteZiffernfolgeAus(\"\"));\n\t\tout(Ziffer.werteZiffernfolgeAus(\"z\"));\n\t\tout(Ziffer.werteZiffernfolgeAus(\".9\"));\n\t\tout(Ziffer.werteZiffernfolgeAus(\"9.\"));\n\t}" ]
[ "0.63021535", "0.6014477", "0.6005863", "0.5956763", "0.5947557", "0.59008795", "0.58157927", "0.5788256", "0.5625043", "0.5590848", "0.554936", "0.5542358", "0.54420304", "0.5430563", "0.5430257", "0.5415945", "0.54126483", "0.54112107", "0.5382075", "0.53806525", "0.5375742", "0.53695136", "0.5368059", "0.53624076", "0.5347924", "0.5323903", "0.53113633", "0.52858275", "0.5283587", "0.52698207", "0.5254079", "0.52518916", "0.52436626", "0.5236629", "0.5230142", "0.5223336", "0.5212008", "0.52019656", "0.52003103", "0.5198119", "0.51928425", "0.5187981", "0.5180311", "0.51761574", "0.51734704", "0.5164399", "0.51494527", "0.51492494", "0.5124204", "0.5120057", "0.5105378", "0.5105329", "0.5103084", "0.5101272", "0.5098358", "0.50974673", "0.5090795", "0.5086267", "0.5085723", "0.50770414", "0.50661767", "0.50635546", "0.50608194", "0.5054504", "0.50532645", "0.5049412", "0.50488603", "0.50448745", "0.50319505", "0.5029817", "0.502966", "0.5029087", "0.5020924", "0.5017526", "0.50129145", "0.50123376", "0.50108176", "0.50036204", "0.50019956", "0.5000006", "0.49976012", "0.49964073", "0.49928522", "0.4992619", "0.49912176", "0.49834663", "0.4982996", "0.49809298", "0.4980302", "0.497921", "0.49790365", "0.49711657", "0.4971062", "0.49618465", "0.495461", "0.4947077", "0.4944655", "0.4941742", "0.4940884", "0.49380404" ]
0.54664195
12
Compute convex cell area.
private double convexCellArea(final Vertex start) { int n = 0; double sum = 0; // loop around the cell for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) { // find path interior angle at vertex final Vector3D previousPole = e.getCircle().getPole(); final Vector3D nextPole = e.getEnd().getOutgoing().getCircle().getPole(); final Vector3D point = e.getEnd().getLocation().getVector(); double alpha = FastMath.atan2(Vector3D.dotProduct(nextPole, Vector3D.crossProduct(point, previousPole)), -Vector3D.dotProduct(nextPole, previousPole)); if (alpha < 0) { alpha += MathUtils.TWO_PI; } sum += alpha; n++; } // compute area using extended Girard theorem // see Spherical Trigonometry: For the Use of Colleges and Schools by I. Todhunter // article 99 in chapter VIII Area Of a Spherical Triangle. Spherical Excess. // book available from project Gutenberg at http://www.gutenberg.org/ebooks/19770 return sum - (n - 2) * FastMath.PI; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }", "public double computeArea() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}", "public double computeArea()\n {\n int len = _points.size();\n Point p1 = _points.get(len - 1);\n\n double area = 0.0;\n\n // Compute based on Green's Theorem.\n for(int i = 0; i < len; i++)\n {\n Point p2 = _points.get(i);\n area += (p2.x + p1.x)*(p2.y - p1.y);\n p1 = p2; // Shift p2 to p1.\n }\n\n return -area / 2.0;\n }", "@Override\n public double getArea() {\n double s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n }", "public double area() {\n\t\treturn width * height;\n\t}", "public double area() {\n\t\tif (area != 0)\n\t\t\treturn area;\n\n\t\tPoint current = vertices.get(0);\n\t\tfor (int i = 1; i < vertices.size(); i++) {\n\t\t\tPoint next = vertices.get(i);\n\t\t\tarea += current.crossProduct(next);\n\t\t\tcurrent = next;\n\t\t}\n\n\t\torientation = area > 0 ? \"CCW\" : \"CW\";\n\t\tarea = Math.abs(area / 2);\n\n\t\treturn area;\n\t}", "public double area();", "public abstract double computeArea();", "public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }", "public double area() {\n double sum = 0.0;\n for (int i = 0; i < N; i++) {\n sum = sum + (a[i].x * a[i+1].y) - (a[i].y * a[i+1].x);\n }\n return 0.5 * sum;\n }", "public double area() {\n return (width * height);\n }", "double area();", "@Override\r\n public double area() {\n return height*width;\r\n }", "@Override\n\tpublic double area() {\n\t\treturn edge*edge;\n\t}", "public double area() {\n\t\treturn width*length;\n\t}", "public double Area() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Area(swigCPtr, this);\n }", "double calculateArea();", "@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }", "private double calculaArea(){\r\n double area;\r\n area= (double) (Math.pow((cir.getY()-cir.getX()), 2)*Math.PI);\r\n return area;\r\n \r\n }", "public int area() {\n \tarea = width()*height();\n }", "double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }", "public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }", "public double calcArea()\n\t{\n\t\treturn (double) oneside * oneside;\n\t}", "public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "public double area() { return Math.PI * radius * radius; }", "public double calcArea() {\r\n\t\tdouble area = length * width;\r\n\t\treturn area;\r\n\t}", "abstract double area();", "abstract double area();", "abstract double area();", "abstract double area();", "static int surfaceArea(int[][] grid) {\n int sum = 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] != 0) {\n sum += ((grid[i][j] * 4) + 2);\n }\n if (i - 1 >= 0) sum -= Math.min(grid[i - 1][j], grid[i][j]) * 2;\n if (j - 1 >= 0) sum -= Math.min(grid[i][j - 1], grid[i][j]) * 2;\n }\n }\n return sum;\n }", "public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}", "public int calculateSurfaceArea() {\n return 6 * (int) (Math.pow(this.sideLength, 2));\n }", "public double getCircleArea();", "@Override\n\tpublic double getArea(){\n\t\tdouble ab_ac_area = get_triangle_area(getVector_AB(),getVector_AC());\n\t\t\n\t\t//area of vector ac and ad\n\t\tdouble ac_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector ab and ad\n\t\tdouble ab_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector bc and bd\n\t\tdouble bc_ad_area = get_triangle_area(getVector_BC(),getVector_BD());\n\t\t\n\t\t//sum \n\t\treturn ab_ac_area + ac_ad_area + ab_ad_area + bc_ad_area;\n\t}", "@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}", "Double getCrossSectionArea();", "public double getArea() {\n\t\treturn Math.sqrt(3) * this.edgelen * this.edgelen;\n\t}", "public double areaUnsigned() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return area;\n }", "public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }", "public double area() {\r\n\t\treturn radius * radius * PI;\r\n\t}", "public double getArea(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return (getWidth() * getHeight());\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}", "public double calculateArea()\n {\n return (Math.PI * radius) * (Math.PI * radius);\n }", "public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}", "public abstract float area();", "public Shape getAreaColision();", "public double area()\n {\n return PdVector.area(p1, p2, p3);\n }", "@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}", "public double area(){\n return (base*height) / 2;\n }", "double getArea();", "double getArea();", "@Override\n\tpublic double area() {\n\t\treturn Shape.PI*radius*radius;\n\t}", "public double calculateArea() {\r\n return PI * radius * radius;\r\n }", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public double getArea() {\n\t\treturn 6.0 * this.edgelen * this.edgelen;\n\t}", "public CollisionArea_SingleCirc getOptimalCollisionArea();", "@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "@Override\n public double area() {\n return width * length;\n }", "public double findArea() {\r\n return Math.PI * radius * radius; \r\n }", "public void calcArea(){\n double p=(side1+side2+side3)/2;\n area=p*(p-side1)*(p-side2)*(p-side3);\n area=Math.sqrt(area);\n\n\n }", "public double surfaceArea()\r\n {\r\n double surfaceArea = baseArea() + sideArea();\r\n return surfaceArea;\r\n }", "public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}", "public void calArea()\n {\n //Start of the formula\n for(int i = 0; i < sides-1; i++)\n {\n area += (poly[i].getX()*poly[i+1].getY())-(poly[i].getY()*poly[i+1].getX());\n }\n\n //half the total calculation\n area = area/2;\n\n //if area is negative times by -1\n if(area <= 0)\n {\n area = area*-1;\n }\n }", "@Override\n public double area()\n {\n\treturn (double) length * width;\n }", "public double area() {\n return 2 * Math.PI * radius;\n }", "public double getArea() {\n return this.length * this.width;\n }", "static Double computePerimeter() {\n // Perimeter is 2(height) + 2(width)\n Double perimeter = height*2 + width*2;\n return perimeter;\n }", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "public double surfaceArea() {\n final int six = 6;\n return six * Math.pow(sideLength, 2);\n }", "public double getArea();", "public double getArea();", "public double getArea();", "public void getArea() {\n\t\ts = (double) (a + b + c) / 2;\n\t\tarea = Math.sqrt(s * (s - a) * (s - b) * (s - c));\n\t\tSystem.out.println(\"Area: \" + area);\n\t}", "@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}", "@Override\n\tpublic double area() {\n\t\t\n\t\tdouble area = (Math.PI * Math.pow(radius, 2));\n\t\treturn area;\n\t\t\n\t}", "public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }", "public List<Vector3D> getConvexCellsInsidePoints() {\n return convexCellsInsidePoints;\n }", "public int charArea(char ch) {\n\t\tint westPoint = 0;\n\t\tint eastPoint = 0;\n\t\tint northPoint = 0;\n\t\tint southPoint = 0;\n\t\tboolean firstOccur = true;\n\t\t\n\t\tfor(int row = 0; row < grid.length; row++) {\n\t\t\tfor(int col = 0; col < grid[0].length; col++) {\n\t\t\t\tif(grid[row][col] == ch) {\n\t\t\t\t\tif(firstOccur) {\n\t\t\t\t\t\twestPoint = col;\n\t\t\t\t\t\teastPoint = col;\n\t\t\t\t\t\tnorthPoint = row;\n\t\t\t\t\t\tsouthPoint = row;\n\t\t\t\t\t\tfirstOccur = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twestPoint = Math.min(westPoint, col);\n\t\t\t\t\t\teastPoint = Math.max(eastPoint, col);\n\t\t\t\t\t\tnorthPoint = Math.min(northPoint, row);\n\t\t\t\t\t\tsouthPoint = Math.max(southPoint, row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint area = (eastPoint - westPoint + 1) * (southPoint - northPoint + 1);\n\t\tif(firstOccur) return 0;\n\t\treturn area; \n\t}", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "private void getArea() {\n\t\tdouble a = 0;\n\t\tint n = points.length;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta += (points[i-1].x + points[i].x) * (points[i-1].y - points[i].y);\n\t\t}\n\t\t// process last segment if ring is not closed\n\t\tif (!points[0].equals(points[n-1])) {\n\t\t\ta += (points[n-1].x + points[0].x) * (points[n-1].y - points[0].y);\n\t\t}\n\t\tarea = Math.abs(a / 2);\n\t}", "@Override\n public double getArea() {\n return width * width;\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public double getArea(){\r\n\t\t\r\n\t\tdouble povrsina = PI * this.radius * this.radius; \r\n\t\t\r\n\t\treturn povrsina;\r\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double area() {\n\t\treturn Math.PI*r*r;\n\t}", "private double SurfaceArea() {\n\t\tdouble surfaceArea = 4f * Math.PI * Math.pow(_radius, 2);\n\t\treturn surfaceArea;\n\t}", "public double getArea() { return Math.sqrt(s * (s - d12) * (s - d23) * (s - d31)); }", "double getArea() {\n return width * height;\n }", "public double findArea() {\n return radius * radius * Math.PI;\n }" ]
[ "0.70108575", "0.6690084", "0.66718197", "0.6636543", "0.6492774", "0.64762247", "0.64701664", "0.64336926", "0.6422298", "0.64117813", "0.64027226", "0.6390915", "0.6382849", "0.63286406", "0.6299959", "0.62878674", "0.6281425", "0.6275947", "0.6263243", "0.62446916", "0.6213065", "0.6208687", "0.6203252", "0.61942196", "0.61711824", "0.61612886", "0.61438787", "0.6137807", "0.6123782", "0.6123782", "0.6123782", "0.6123782", "0.6122775", "0.61211747", "0.612076", "0.61126614", "0.6110308", "0.610232", "0.61007434", "0.609847", "0.6097555", "0.6074645", "0.6066856", "0.6062907", "0.60525024", "0.6042276", "0.60416853", "0.60310936", "0.60281557", "0.60271233", "0.6026242", "0.6010661", "0.60053957", "0.60052997", "0.60046506", "0.6004262", "0.60033923", "0.60026604", "0.60026604", "0.600153", "0.5997438", "0.59800327", "0.59787756", "0.5966264", "0.5957174", "0.5950816", "0.59323555", "0.591978", "0.5912825", "0.59061545", "0.5896449", "0.5886601", "0.5864164", "0.58629906", "0.58627594", "0.585819", "0.58563024", "0.5855325", "0.5844923", "0.5844923", "0.5844923", "0.584371", "0.5837625", "0.58304006", "0.582235", "0.5817039", "0.58148634", "0.5812827", "0.58126074", "0.5808162", "0.5797981", "0.5792529", "0.5789716", "0.5786637", "0.5786637", "0.5783791", "0.577989", "0.5776277", "0.57692087", "0.57688856" ]
0.77217287
0
Compute convex cell barycenter.
private Vector3D convexCellBarycenter(final Vertex start) { int n = 0; Vector3D sumB = Vector3D.ZERO; // loop around the cell for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) { sumB = new Vector3D(1, sumB, e.getLength(), e.getCircle().getPole()); n++; } return sumB.normalize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cell Center(){\n double sum_x = 0;\r\n double sum_y = 0;\r\n \r\n for(int i = 0; i < this.edgeCells.size(); i++){\r\n sum_x = this.edgeCells.get(i).x;\r\n sum_y = this.edgeCells.get(i).y;\r\n }\r\n \r\n for(int i = 0; i < this.seedCells.size(); i++){\r\n sum_x = this.seedCells.get(i).x;\r\n sum_y = this.seedCells.get(i).y;\r\n }\r\n \r\n sum_x = sum_x/(this.edgeCells.size() + this.seedCells.size()); //center of weight\r\n sum_y = sum_y/(this.edgeCells.size() + this.seedCells.size()); //\r\n \r\n center = new Cell((int)sum_x, (int)sum_y, this.edgeCells.get(0).z, this.edgeCells.get(0).id);\r\n \r\n \r\n return center;\r\n }", "public abstract Vector computeCenter();", "private double centerY() {\n return (piece.boundingBox().getHeight() % 2) / 2.0;\n }", "public GJPoint2D center();", "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 double getCenter() {\n return 0.5 * (lo + hi);\n }", "protected void calculateMinMaxCenterPoint() {\n\t\tfinal ImagePlus imp = c.getImage();\n\t\tfinal int w = imp.getWidth(), h = imp.getHeight();\n\t\tfinal int d = imp.getStackSize();\n\t\tfinal Calibration cal = imp.getCalibration();\n\t\tmin = new Point3d();\n\t\tmax = new Point3d();\n\t\tcenter = new Point3d();\n\t\tmin.x = w * (float) cal.pixelHeight;\n\t\tmin.y = h * (float) cal.pixelHeight;\n\t\tmin.z = d * (float) cal.pixelDepth;\n\t\tmax.x = 0;\n\t\tmax.y = 0;\n\t\tmax.z = 0;\n\n\t\tfloat vol = 0;\n\t\tfor (int zi = 0; zi < d; zi++) {\n\t\t\tfinal float z = zi * (float) cal.pixelDepth;\n\t\t\tfinal ImageProcessor ip = imp.getStack().getProcessor(zi + 1);\n\n\t\t\tfinal int wh = w * h;\n\t\t\tfor (int i = 0; i < wh; i++) {\n\t\t\t\tfinal float v = ip.getf(i);\n\t\t\t\tif (v == 0) continue;\n\t\t\t\tvol += v;\n\t\t\t\tfinal float x = (i % w) * (float) cal.pixelWidth;\n\t\t\t\tfinal float y = (i / w) * (float) cal.pixelHeight;\n\t\t\t\tif (x < min.x) min.x = x;\n\t\t\t\tif (y < min.y) min.y = y;\n\t\t\t\tif (z < min.z) min.z = z;\n\t\t\t\tif (x > max.x) max.x = x;\n\t\t\t\tif (y > max.y) max.y = y;\n\t\t\t\tif (z > max.z) max.z = z;\n\t\t\t\tcenter.x += v * x;\n\t\t\t\tcenter.y += v * y;\n\t\t\t\tcenter.z += v * z;\n\t\t\t}\n\t\t}\n\t\tcenter.x /= vol;\n\t\tcenter.y /= vol;\n\t\tcenter.z /= vol;\n\n\t\tvolume = (float) (vol * cal.pixelWidth * cal.pixelHeight * cal.pixelDepth);\n\n\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 }", "public final int centerY() {\n return (top + bottom) >> 1;\n }", "private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }", "public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}", "public BoardCell getCenterCell() {\n\t\treturn null;\n\t}", "public float[] getCenterCo(float x, float y)\n\t{\n\t\tfloat[] co = new float[2];\n\t\tint xco = getXVal(x);\n\t\tco[0] = (xco*PIXEL_WIDTH) - (PIXEL_WIDTH/2);\n\t\t\n\t\tint yco = getYVal(y);\n\t\tco[1] = (yco*PIXEL_HEIGHT) - (PIXEL_HEIGHT/2);\n\t\t\n\t\treturn co;\n\t}", "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 Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\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 double getCenterY() { return centerY.get(); }", "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 }", "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 Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }", "public final int centerX() {\n return (left + right) >> 1;\n }", "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 void calculateCentroids(float x, float y) {\n\t\t\tpCX = pCY = qCX = qCY = 0;\n\t\t\tfloat total = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tfloat w = w(x, y, pX[i], pY[i]);\n\t\t\t\ttotal += w;\n\t\t\t\tpCX += w * pX[i];\n\t\t\t\tpCY += w * pY[i];\n\t\t\t\tqCX += w * qX[i];\n\t\t\t\tqCY += w * qY[i];\n\t\t\t}\n\t\t\tpCX /= total;\n\t\t\tpCY /= total;\n\t\t\tqCX /= total;\n\t\t\tqCY /= total;\n\t\t}", "public double[] getCenter() {\n return this.center;\n }", "public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}", "static PT ComputeCircleCenter(PT a, PT b, PT c) {\r\n\t\tb = (a.add(b)).divide(2);\r\n\t\tc = (a.add(c)).divide(2);\r\n\t\treturn ComputeLineIntersection(b, b.add(RotateCW90(a.subtract(b))), c, c.add(RotateCW90(a.subtract(c))));\r\n\t}", "private double convexCellArea(final Vertex start) {\n\n int n = 0;\n double sum = 0;\n\n // loop around the cell\n for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) {\n\n // find path interior angle at vertex\n final Vector3D previousPole = e.getCircle().getPole();\n final Vector3D nextPole = e.getEnd().getOutgoing().getCircle().getPole();\n final Vector3D point = e.getEnd().getLocation().getVector();\n double alpha = FastMath.atan2(Vector3D.dotProduct(nextPole, Vector3D.crossProduct(point, previousPole)),\n -Vector3D.dotProduct(nextPole, previousPole));\n if (alpha < 0) {\n alpha += MathUtils.TWO_PI;\n }\n sum += alpha;\n n++;\n }\n\n // compute area using extended Girard theorem\n // see Spherical Trigonometry: For the Use of Colleges and Schools by I. Todhunter\n // article 99 in chapter VIII Area Of a Spherical Triangle. Spherical Excess.\n // book available from project Gutenberg at http://www.gutenberg.org/ebooks/19770\n return sum - (n - 2) * FastMath.PI;\n\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 Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }", "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 Vector3d getCurrentCollisionCenter() {\r\n return new Vector3d(collisionCenter.x + currentPosition.x, collisionCenter.y + currentPosition.y, collisionCenter.z + currentPosition.z);\r\n }", "public List<Vector3D> getConvexCellsInsidePoints() {\n return convexCellsInsidePoints;\n }", "public Point2D.Double getImageCenter();", "Point getCenter();", "Point getCenter();", "public Point2D getCentre() {\n return new Point2D.Float(centreX, centreY);\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 PointF centroid()\n {\n if (cachedCentroid == null)\n {\n PointF centroid = new PointF();\n\n for (int i = 0; i < size(); i++)\n {\n PointF curr = get(i);\n PointF next = get(i + 1);\n\n float mult = curr.x * next.y - next.x * curr.y;\n centroid.x += (curr.x + next.x) * mult;\n centroid.y += (curr.y + next.y) * mult;\n }\n\n centroid.x /= 6 * signedArea();\n centroid.y /= 6 * signedArea();\n\n cachedCentroid = centroid;\n }\n\n return Geometry.clone(cachedCentroid);\n }", "static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }", "public Coordinate getCenter() {\n return center;\n }", "private double getRangeCenter(int lowerBound, int upperBound) {\n return (lowerBound + upperBound) / 2.0;\n }", "public CX getCostCenter() { \r\n\t\tCX retVal = this.getTypedField(25, 0);\r\n\t\treturn retVal;\r\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 Spatial boardCentre() {\r\n return tiles[2][2].tile;\r\n }", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "public Point2D.Double GetCentrePoint() {\n \t\treturn new Point2D.Double(centrePoint.getX(), centrePoint.getY());\n \t}", "public abstract Vector2 getCentreOfMass();", "public Vector getCentroid() {\n return centroid;\n }", "public Point centroid() {\n\t\t\tdouble xSum = 0.0;\n\t\t\tdouble ySum = 0.0;\n\t\t\tfor(Point point : clusterPointsList){\n\t\t\t\txSum += point.x;\n\t\t\t\tySum += point.y;\n\t\t\t}\n\t\t\tPoint centroid = new Point();\n\t\t\tcentroid.x = xSum / size();\n\t\t\tcentroid.y = ySum / size();\n\t\t\t\n\t\t\treturn centroid;\n\t\t}", "private float[] getCentroid (float[][] inArray) {\n\n\t\tfloat ones = inArray.length;\n\t\tfloat xSum = 0;\n\t\tfloat ySum = 0;\n\n\t\tfor (int i = 0; i < inArray.length; i++) {\n\t\t\txSum += inArray[i][0];\n\t\t\tySum += inArray[i][1];\n\t\t}\n\n\t\t// Compute x and y coordinates of centroid\n\n\t\tfloat xCen = (1/ones)*(xSum);\n\t\tfloat yCen = (1/ones)*(ySum);\n\n\t\tfloat[] tempArr = new float[2];\n\t\ttempArr[0] = xCen;\n\t\ttempArr[1] = yCen;\n\n\t\treturn tempArr;\n\t}", "public Vector2 getCenter() {\n return center;\n }", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}", "public Vertex2d centre_point(Vertex2d a, Vertex2d b){\n\t\tfloat mid_x = Math.min(a.x, b.x) - Math.max(a.x, a.x);\r\n\t\tfloat mid_y = Math.min(a.y, b.y) - Math.max(b.y, b.y);\r\n\t\treturn new Vertex2d(a.x + (mid_x/2),a.y + (mid_y/1));\r\n\t}", "public double getCenterX() { return centerX.get(); \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 Point2D.Float getCenter() {\r\n\t\treturn center;\r\n\t}", "public Point getCenter() {\r\n return this.center;\r\n }", "static double adjustC(double[] s, double c, List<Param> center) {\n for (int i = 0; i < s.length; ++i) {\n //todo c always positive ???\n double distanceFromUpperEdge = ((Number) center.get(i).getUpperBound()).doubleValue() - ((Number) center.get(i).getValue()).doubleValue();\n if (s[i] > 0 && distanceFromUpperEdge < c * s[i])\n c = (distanceFromUpperEdge) / s[i];\n double distanceFromLowerEdge = ((Number) center.get(i).getValue()).doubleValue() - ((Number) center.get(i).getLowerBound()).doubleValue();\n //this case s[i] < 0\n if (s[i] < 0 && distanceFromLowerEdge < -(c * s[i]))\n c = (distanceFromLowerEdge) / -s[i];\n }\n return c;\n }", "public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }", "public int getCenterY(){\r\n return centerY;\r\n }", "public native vector kbAreaGetCenter(int areaID);", "public float getCenterY()\n\t{\n\t\treturn (this.sy / 2) + this.y;\n\t}", "public float getCenterX() {\n return cPosition.getX() + (float) cFishSizeX / 2;\n }", "public Point getCenter() {\r\n\t\treturn center;\r\n\t}", "public Vec3d getCenter() {\n\t\treturn set;\n\t}", "public Vector2 getCenter() {\n return new Vector2(rectangle.centerX(), rectangle.centerY());\n }", "public int distanceToCentral() {\n SubCell central = centralSubCellOf(containingCell());\n return Math.abs(this.x() - central.x())\n + Math.abs(this.y() - central.y());\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\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 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 PointF getCenter() {\n return center;\n }", "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 float getCenterY() {\n return cPosition.getY() + (float) cFishSizeY / 2;\n }", "public Point getCenter() {\n return center;\n }", "private PointF getCenterOfCropRect() {\n return new PointF(\n cropRect.centerX(),\n cropRect.centerY());\n }", "public Point getCentrePoint()\n\t\t{\n\t\t\tif(shape.equals(\"circle\") || shape.equals(\"ellipse\"))\n\t\t\t\treturn new Point((int)((Ellipse2D)obj).getCenterX(),(int)((Ellipse2D)obj).getCenterY());\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tint xtot = 0;\n\t\t\t\tint ytot = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i % 2) == 0)\n\t\t\t\t\t\txtot += coords[i];\n\t\t\t\t\telse\n\t\t\t\t\t\tytot += coords[i];\n\t\t\t\t}\n\t\t\t\treturn new Point((xtot*2)/coords.length,(ytot*2)/coords.length);\n\t\t\t}else\n\t\t\t{\n\t\t\t\treturn new Point((int)((Rectangle)obj).getCenterX(),(int)((Rectangle)obj).getCenterY());\n\t\t\t}\n\t\t}", "public int getCenterX() {\n\t\t\treturn (int) origin.x + halfWidth;\n\t\t}", "public Vector3D getCenter() {\n return center;\n }", "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 AxisAlignedBB contract(double x, double y, double z) {\n\t\treturn getAABBPool().getAABB(minX + x, minY + y, minZ + z, maxX - x, maxY - y, maxZ - z);\n\t}", "public double getBorderCenterX()\n {\n return borderCenterX;\n }", "public final double getMinConvexCoefficient()\n {\n return minConvexCoefficient;\n }", "public Coordinates getCentroid() {\r\n return centroid;\r\n }", "private void drawCenter(double x, double y) {\n\t\tdouble r = findCenterRadius(x, y);\n\t\tGPoint corner = findCenterCorner(r, x ,y);\n\t\tcenterCircle = new GOval(2*r,2*r);\n\t\tadd(centerCircle, corner);\n\t\t//GPoint center = new GPoint(corner.getX() - r, corner.getY() - r );\n\t}", "private float computeCenter_old() {\n\t\tVector3f PA = A.subtract(P);\n\t\tVector3f PB = B.subtract(P);\n\t\tN = PA.cross(PB);\n\t\tif (N.lengthSquared() <= EPSILON*EPSILON) {\n//\t\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> it is a line\");\n\t\t\treturn 0; //Degenerated to a line\n\t\t}\n\t\t\n\t\t//define orthonormal basis I,J,K\n\t\tN.normalizeLocal();\n\t\tVector3f I = PA.normalize();\n\t\tVector3f J = N.cross(I);\n\t\tVector3f K = N;\n\t\tVector3f IxK = I.cross(K);\n\t\tVector3f JxK = J.cross(K);\n\t\t//project points in the plane PAB\n\t\tVector3f PAxN = PA.cross(N);\n\t\tVector3f PBxN = PB.cross(N);\n\t\tVector2f P2 = new Vector2f(0, 0);\n\t\tVector2f A2 = new Vector2f(PA.dot(JxK)/I.dot(JxK), PA.dot(IxK)/J.dot(IxK));\n\t\tVector2f B2 = new Vector2f(PB.dot(JxK)/I.dot(JxK), PB.dot(IxK)/J.dot(IxK));\n\t\t\n\t\t//compute time t of C=P+tPA°\n\t\tfloat t;\n\t\tif (B2.x == A2.x) {\n\t\t\tt = (B2.y - A2.y) / (A2.x - B2.x);\n\t\t} else {\n\t\t\tt = (B2.x - A2.x) / (A2.y - B2.y);\n\t\t}\n\t\t//compute C\n\t\tVector2f PArot = new Vector2f(A.y-P.y, P.x-A.x);\n\t\tVector2f C2 = P2.addLocal(PArot.multLocal(t));\n\t\t//project back\n\t\tC = new Vector3f(P);\n\t\tC.addScaledLocal(C2.x, I);\n\t\tC.addScaledLocal(C2.y, J);\n\t\t//Debug\n//\t\tSystem.out.println(\"A=\"+A+\", B=\"+B+\" P=\"+P+\" -> I=\"+I+\", J=\"+J+\", K=\"+K+\", P'=\"+P2+\", A'=\"+A2+\", B'=\"+B2+\", t=\"+t+\", C'=\"+C2+\", C=\"+C);\n\t\t//set radius\n\t\treturn C.distance(A);\n\t}", "public double getCenterX()\n {\n return mainVBox.getTranslateX() + (mainVBox.getWidth() / 2);\n }", "public double getCenterX() {\n\t\treturn centerX;\n\t}", "public Vector3f getCenter() {\r\n return center;\r\n }", "public float getCentreX() {\n return centreX;\n }", "public Point2D getBombTileCenterPosition(GameObject node) {\n double x;\n double y;\n\n List<Rectangle> intersectingTiles = new ArrayList<>();\n for (Rectangle2D r : gameMatrix) {\n Rectangle currentMatrixTile = new Rectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());\n\n // check if rectangle of game matrix intersects with player bounds and harvest these in new array\n if (currentMatrixTile.getBoundsInParent().intersects(node.getBoundsInParent())) {\n intersectingTiles.add(currentMatrixTile);\n }\n }\n // if player bounds are completely in one tile\n if (intersectingTiles.size() == 1) {\n Rectangle r = intersectingTiles.get(0);\n x = r.getX() + (r.getWidth() / 2);\n y = r.getY() + (r.getHeight() / 2);\n return new Point2D(x, y);\n }\n // if player bounds are in more than one tile\n else {\n for (int i = 0; i < intersectingTiles.size(); i++) {\n Point2D playerCenterPosition = new Point2D(node.getX() + (node.getFitWidth() / 2), node.getY() + (node.getFitHeight() / 2));\n Rectangle currentTile = intersectingTiles.get(i);\n\n // the center position of the player should only exist in one tile at a time ...\n if (currentTile.contains(playerCenterPosition)) {\n return new Point2D(currentTile.getX() + (currentTile.getWidth() / 2), currentTile.getY() + (currentTile.getHeight() / 2));\n }\n }\n // a mystery\n return null;\n }\n }", "public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }", "public int getCenterY() {\n\t\t\treturn (int) origin.y + halfHeight;\n\t\t}", "private void center(Complex[] f, int width, int height) {\r\n\r\n\t\tfor (int i = 0; i < f.length; i++) {\r\n\t\t\tint x = i % width;\r\n\t\t\tint y = i / width;\r\n\t\t\tf[i].setReal(f[i].getReal() * Math.pow(-1, (x + y)));\r\n\t\t}\r\n\r\n\t}", "public double getConc(Vector3d v) {\r\n\t\tint[] b = boxCoords(v);\r\n\t\treturn getConc(b[0],b[1],b[2]);\r\n\t}", "public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}", "public Coordinate getCenteredCoordinate() {\n return coordinate.add(getHalfSize());\n }", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "public EastNorth getCenter() {\n\t\treturn null;\n\t}", "public BoundingBox(double centerX, double centerY, double w, double h)\n\t{\n\t\tcenter = new Vector2(centerX, centerY);\n\t\twidth = w;\n\t\theight = h;\n\t}" ]
[ "0.6790197", "0.66225475", "0.65561795", "0.6263677", "0.59904397", "0.5911994", "0.58923423", "0.58621645", "0.58391035", "0.5832288", "0.58314", "0.58308744", "0.58293355", "0.58026445", "0.579989", "0.574953", "0.57288826", "0.5727799", "0.5714965", "0.5702535", "0.56899595", "0.5651135", "0.56237525", "0.5599829", "0.55924", "0.5582572", "0.55514747", "0.5548206", "0.55279046", "0.5480182", "0.54797447", "0.5472553", "0.5456749", "0.5452225", "0.5452225", "0.5429286", "0.5422809", "0.5360102", "0.5354183", "0.53447795", "0.5340498", "0.5329322", "0.5313378", "0.5309807", "0.5302353", "0.530081", "0.529049", "0.52685976", "0.5267434", "0.52668536", "0.5263505", "0.52616787", "0.5261384", "0.52397203", "0.52353954", "0.5229519", "0.5227829", "0.5227677", "0.5219262", "0.5210223", "0.52067876", "0.5197992", "0.51948243", "0.5184191", "0.5166109", "0.5152533", "0.5143892", "0.51400846", "0.5139008", "0.51229316", "0.51209116", "0.5120519", "0.5119137", "0.5116602", "0.51149154", "0.5106183", "0.5093234", "0.50915736", "0.5084062", "0.5040971", "0.5024896", "0.5016488", "0.5015141", "0.5010824", "0.500941", "0.50026524", "0.5001947", "0.49837872", "0.49833408", "0.49746478", "0.49743703", "0.49734756", "0.49726787", "0.49718583", "0.49676988", "0.4953301", "0.49332345", "0.4917722", "0.49073732", "0.49052218" ]
0.8008192
0
Get the points strictly inside convex cells.
public List<Vector3D> getConvexCellsInsidePoints() { return convexCellsInsidePoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Array<Point> allOuterPoints() {\r\n \tArray<Point> innerPoints = innerPiece.getPoints();\r\n Array<Point> outerPoints = new Array<Point>();\r\n for (Point inner : innerPoints) {\r\n outerPoints.add(toOuterPoint(inner));\r\n }\r\n return outerPoints;\r\n }", "public Set<Point> getHitboxPoints() {\n Set<Point> hitboxPoints = new HashSet<>();\n\n for(Point p : relevantPoints)\n {\n int currX = (int)(p.x + xPos - (getWidth() / 2));\n int currY = (int)(p.y + yPos - (getHeight() / 2));\n\n hitboxPoints.add(new Point(currX, currY));\n }\n\n return hitboxPoints;\n }", "public Collection <Point> getAllPoints(){\n Collection <Point> points = new ArrayList<>();\n for(int i = 0; i < width; i++){\n for(int j = 0; j < height; j++){\n points.add(new Point(i, j));\n }\n }\n return points;\n }", "public List<Float> getBoundingsOfCell() {\n\n\t\tfloat minXPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxXPoint = Float.NEGATIVE_INFINITY;\n\t\tfloat minYPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxYPoint = Float.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < face.edges().size(); i++) {\n\n\t\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(i);\n\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) e.reference;\n\n\t\t\t// Looking for most left located point of cell\n\t\t\tif (minXPoint > arc.minX().x) {\n\t\t\t\tminXPoint = arc.minX().x;\n\t\t\t}\n\t\t\t// Looking for most right located point of cell\n\t\t\tif (maxXPoint < arc.maxX().x) {\n\t\t\t\tmaxXPoint = arc.maxX().x;\n\t\t\t}\n\t\t\t// Looking for highest located point of cell\n\t\t\tif (minYPoint > arc.minY().y) {\n\t\t\t\tminYPoint = arc.minY().y;\n\t\t\t}\n\t\t\t// Looking for lowest located point of cell\n\t\t\tif (maxYPoint < arc.maxY().y) {\n\t\t\t\tmaxYPoint = arc.maxY().y;\n\t\t\t}\n\n\t\t}\n\n\t\tList<Float> boundings = new ArrayList<Float>();\n\t\tboundings.add(minXPoint);\n\t\tboundings.add(maxXPoint);\n\t\tboundings.add(minYPoint);\n\t\tboundings.add(maxYPoint);\n\t\treturn boundings;\n\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n\n if (rect == null)\n throw new IllegalArgumentException(\"Got null object in range()\");\n \n Queue<Point2D> pointsInside = new Queue<>();\n \n for (Point2D p : point2DSET) {\n \n double x = p.x();\n double y = p.y();\n if (x >= rect.xmin() && x <= rect.xmax() &&\n y >= rect.ymin() && y <= rect.ymax())\n pointsInside.enqueue(p);\n \n }\n \n return pointsInside;\n }", "public ArrayList<Point> nullPoint() {\n\t\tArrayList<Point> points = new ArrayList<Point>();\n\t\tfor (int r=0; r<rows(); r=r+1) {\n\t\t\tfor (int c=0; c<cols(); c=c+1) {\n\t\t\t\tPoint p = new Point(r,c);\n\t\t\t\tif(get(p)==null) {\n\t\t\t\t\tpoints.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn points;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\n \"Null pointer provided instead of a query rectangle\");\n ptsInside = new SET<Point2D>();\n searchForPoints(root, rect);\n return ptsInside;\n }", "public Collection<GJPoint2D> singularPoints() {\n\t\tArrayList<GJPoint2D> points = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the last control of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tGJPoint2D p = seg.lastControl();\n\t\t\tif (p != null)\n\t\t\t\tpoints.add(p);\n\t\t}\n\t\t\n\t\t// return the set of singular points\n\t\treturn points;\n\t}", "public Set<Coordinate> getAllSurroundingCellsAsCoordinates() {\n Set<MapCoordinate> mapCoordinates = getAllSurroundingCellsAsMapCoordinatesStartingFromTopLeft(1);\n return mapCoordinates\n .stream()\n .map(mapCoordinate -> mapCoordinate.toCoordinate())\n .collect(\n Collectors.toSet()\n );\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n SET<Point2D> result = new SET<Point2D>();\n for (Point2D point : points) {\n if (rect.contains(point))\n result.add(point);\n }\n return result;\n }", "public Square[] adjacentCells() {\n\t\tArrayList<Square> cells = new ArrayList <Square>();\n\t\tSquare aux;\n\t\tfor (int i = -1;i <= 1; i++) {\n\t\t\tfor (int j = -1; j <= 1 ; j++) {\n\t\t\t\taux = new Square(tractor.getRow()+i, tractor.getColumn()+j); \n\t\t\t\tif (isInside(aux) && abs(i+j) == 1) { \n\t\t\t\t\tcells.add(getSquare(aux));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cells.toArray(new Square[cells.size()]);\n\t}", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "private boolean isConvex() {\r\n int N = hull.size();\r\n if (N <= 2) return true;\r\n\r\n Point2D[] points = new Point2D[N];\r\n int n = 0;\r\n for (Point2D p : hull()) {\r\n points[n++] = p;\r\n }\r\n\r\n for (int i = 0; i < N; i++) {\r\n if (ccw(points[i], points[(i+1) % N], points[(i+2) % N]) <= 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "List<Coord> allActiveCells();", "public Iterable<Point2D> range(RectHV rect) {\n TreeSet<Point2D> ret = new TreeSet<Point2D>();\n for (Point2D p: mPoints) {\n if (rect.contains(p)) {\n ret.add(p);\n }\n }\n return ret;\n }", "public List<PointDetails> getIntersectingPoints(Rectangle2D rect) {\n\t\tboolean useParallelStreaming = numPoints() > 10000;\n\t\treturn Utils.parallelize(getPointDetails().stream(), useParallelStreaming)\n\t\t\t\t.filter(p->rect.contains(p.location))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public Polygon getPoints() {\n\t\tPolygon points = new Polygon();\n\t\t// Each side of the diamond needs to be DIM pixels long, so there\n\t\t// is more maths this time, involving triangles and that Pythagoras\n\t\t// dude... \n\t\tint radius = this.size * (DIM / 2);\n\t\tint hypotenuse = (int)Math.hypot(radius, radius);\n\t\t// Four points where order is important - screwing up here does\n\t\t// not produce a shape of any sort...\n\t\tpoints.addPoint(this.x, this.y - hypotenuse); // top\n\t\tpoints.addPoint(this.x - hypotenuse, this.y); // left\n\t\tpoints.addPoint(this.x, this.y + hypotenuse); // bottom\t\t\n\t\tpoints.addPoint(this.x + hypotenuse, this.y); // right\n\t\treturn points;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new NullPointerException();\n TreeSet<Point2D> inRangeSet = new TreeSet<>();\n for (Point2D point : pointSet) {\n if (rect.contains(point)) {\n inRangeSet.add(point);\n }\n }\n return inRangeSet;\n }", "public ArrayList<int[]> surroundingCoordinates(int row, int col){\n\t\t\t\n\t\tArrayList<int[]> coordinates = new ArrayList<int[]>();\n\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\t\tif(\t\t\n\t\t\t\t\t\t(row+x >= 0) && \n\t\t\t\t\t\t(col+y >= 0) &&\n\t\t\t\t\t\t(row+x < bm.getBoardSize()) &&\n\t\t\t\t\t\t(col+y < bm.getBoardSize()) &&\n\t\t\t\t\t\t(x != 0 || y != 0)\n\t\t\t\t){\n\t\t\t\t\tcoordinates.add(new int[]{row+x, col+y});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn coordinates;\n\t}", "public List<Point> getPossibleNeighbours() {\n List<Point> points = new ArrayList<>();\n int x = point.getX();\n int y = point.getY();\n Arrays.asList(x - 1, x, x + 1).forEach(i -> {\n Arrays.asList(y - 1, y, y + 1).forEach(j -> {\n points.add(new Point(i, j));\n });\n });\n // remove self\n points.remove(new Point(x, y));\n return points;\n }", "private boolean checkConvexity()\r\n \t{\r\n\t\tswap(0, findLowest());\r\n\t\tArrays.sort(v, new Comparator() {\r\n\t\t\tpublic int compare(Object a, Object b)\r\n\t\t\t{\r\n\t\t\t\tint as = area_sign(v[0], (Pointd)a, (Pointd)b);\r\n\t\t\t\tif ( as > 0)\t\t/* left turn */\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\telse if (as < 0)\t/* right turn */\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse \t\t\t\t\t/* collinear */\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble x = Math.abs(((Pointd)a).getx() - v[0].getx()) - Math.abs(((Pointd)b).getx() - v[0].getx());\r\n\t\t\t\t\tdouble y = Math.abs(((Pointd)a).gety() - v[0].gety()) - Math.abs(((Pointd)b).gety() - v[0].gety());\r\n\t\t\t\t\tif ( (x < 0) || (y < 0) )\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\telse if ( (x > 0) || (y > 0) )\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\telse\t\t// points are coincident\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n \t\tfor (int i=0; i < nv; i++)\r\n \t\t{\r\n \t\t\ti2 = next(i, nv);\r\n \t\t\ti3 = next(i2, nv);\r\n \t\t\tif ( !lefton(\tv[i], v[i2], v[i3]) )\r\n \t\t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n\t}", "Collection<Point> getAllCoordinates();", "public Iterable<Point2D> hull() {\r\n Stack<Point2D> s = new Stack<Point2D>();\r\n for (Point2D p : hull) s.push(p);\r\n return s;\r\n }", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) throw new IllegalArgumentException(\"Rectangle is null or invalid\");\n points = new ArrayList<>();\n if (root == null) return points;\n searchRange(root, rect);\n return points;\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> point_list = new SET<Point2D>();\n rangesearch(root, rect, point_list);\n return point_list;\n }", "PVector[] _getPoints() {\n PVector cen = _getCenter();\n \n PVector[] points = new PVector[_hitbox.length];\n float angle = _rotVector.heading();\n for(int i = 0; i < _hitbox.length; i++) {\n points[i] = new PVector(_hitbox[i].x, _hitbox[i].y);\n points[i].rotate(angle);\n points[i].x += cen.x;\n points[i].y += cen.y;\n }\n return points;\n }", "private ArrayList<Point> getNeighbors(Point p) {\n\t\tArrayList<Point> arr = new ArrayList<Point>();\n\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\t\tPoint npoint = new Point( p.x + x, p.y + y);\n\t\t\t\tint sind = spacesContains(npoint);\n\t\t\t\tif ( p.compareTo(npoint) != 0 && sind >= 0 ) { \n\t\t\t\t\tarr.add( spaces.get(sind) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "public Iterable<Point2D> range(RectHV rect) {\n if (isEmpty())\n return null;\n IntersectingPoints ip = new IntersectingPoints(rect);\n return new KdTreeIterable(ip.intersecting, ip.lenIntersecting);\n }", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public ArrayList<Point> getAdjacentLoosePoints(Point p, Set<Point> loose) {\n \tArrayList<Point> points = new ArrayList<Point>();\n \t\n \t// check point directly to the left\n \tif (p.getX() + 1 < width) {\n \t\tPoint possible = new Point((int) p.getX() + 1, (int) p.getY());\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly to the right\n \tif (p.getX() - 1 > 0) {\n \t\tPoint possible = new Point((int) p.getX() - 1, (int) p.getY());\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly above\n \tif (p.getY() + 1 < height) {\n \t\tPoint possible = new Point((int) p.getX(), (int) p.getY() + 1);\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \t//check point directly above\n \tif (p.getY() - 1 > 0) {\n \t\tPoint possible = new Point((int) p.getX(), (int) p.getY() - 1);\n \t\tif (loose.contains(possible)) {\n \t\t\tpoints.add(possible);\n \t\t}\n \t}\n \treturn points;\n }", "Collection<P> getPointsOfInterest ();", "private static List<Point2d> createConvexHull(Point2d[] points) {\n List<Point2d> hull = new ArrayList<>();\n // Find the leftmost point\n int leftmost = 0;\n for (int i = 1; i < points.length; i++) {\n if (points[i].x < points[leftmost].x) {\n leftmost = i;\n }\n }\n int p = leftmost;\n do {\n hull.add(points[p]);\n int q = p + 1;\n if (q >= points.length) q -= points.length;\n for (int i = 0; i < points.length; i++) {\n double o = orientation(points[p], points[i], points[q]);\n if (o < 0) {\n q = i;\n }\n }\n p = q;\n } while (p != leftmost);\n return hull;\n }", "private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}", "public Iterable<Point2D> range(RectHV rect) \n\t {\n\t\t if(rect==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t LinkedQueue<Point2D> insidePoints = new LinkedQueue<Point2D>();\n\t\t range(root,rect.xmin(),rect.ymin(),rect.xmax(),rect.ymax(),insidePoints,true);\n\t\t return insidePoints;\n\t }", "public final double getMinConvexCoefficient()\n {\n return minConvexCoefficient;\n }", "public int[] getXPoints ()\n\t{\n\t\tint xPoints [] = {xDimension1, xDimension2, xDimension3};\n\t\treturn xPoints;\n\t}", "public double[] get_bounds() {\n System.out.println ( \"section.get_bounds() called\" );\n double[] current_bounds = null;\n if (contours != null) {\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n double[] cont_bounds = contour.get_bounds();\n if (cont_bounds != null) {\n if (current_bounds == null) {\n current_bounds = new double[4];\n current_bounds[0] = cont_bounds[0];\n current_bounds[1] = cont_bounds[1];\n current_bounds[2] = cont_bounds[2];\n current_bounds[3] = cont_bounds[3];\n } else {\n if (cont_bounds[0] < current_bounds[0]) current_bounds[0] = cont_bounds[0]; // minx\n if (cont_bounds[1] > current_bounds[1]) current_bounds[1] = cont_bounds[1]; // maxx\n if (cont_bounds[2] < current_bounds[2]) current_bounds[2] = cont_bounds[2]; // miny\n if (cont_bounds[3] > current_bounds[3]) current_bounds[3] = cont_bounds[3]; // maxy\n }\n }\n }\n }\n return ( current_bounds );\n }", "public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}", "public Set<GeographicPoint> getVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\tSet<GeographicPoint> ans = new HashSet<GeographicPoint> ();\n\t\tfor (GeographicPoint curr : map.keySet()) {\n\t\t\tif (!ans.contains(curr)) {\n\t\t\t\tans.add(curr);\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public ConvexHull(Point[] pts) throws IllegalArgumentException \n\t{\n\t\tif(pts.length == 0 || pts == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tpoints = new Point[pts.length];\n\t\tfor(int i = 0; i < pts.length; i++)\n\t\t{\n\t\t\tpoints[i] = pts[i];\n\t\t}\n\t\tquicksorter = new QuickSortPoints(points);\n\t\tremoveDuplicates();\n\t\tlowestPoint = pointsNoDuplicate[0];\n\t}", "public abstract double[] getLowerBound();", "public abstract List<Point2D> getInterpolatedPoints();", "public Point2D[] getGivenPoints(){ \n return this.points; \n }", "public List<Point> findCornerPoints(Mat mRgba) throws NoSudokuFoundException{\n // draw edge points\n findUpperAndLowerEdge();\n findLeftAndRightEdge();\n \n for(int i=0; i<edges.length; i++){\n Point a = new Point(edges[i][0], edges[i][1]);\n Point b = new Point(edges[i][2], edges[i][3]);\n Core.line(mRgba, a, b, new Scalar(255, 0, 0), 3);\n }\n // Find the upper left corner point\n Point tl = findCornerPoint(edges[0], edges[3]);\n // Find the upper right corner point\n Point tr = findCornerPoint(edges[0], edges[1]);\n // Find the lower left corner point\n Point bl = findCornerPoint(edges[3], edges[2]);\n // Find the lower right corner point\n Point br = findCornerPoint(edges[2], edges[1]);\n \n // Sanity check: The corner points have to be correctly relative\n // to each other\n if(tl.x > tr.x || bl.x > br.x || tl.y > br.y || tr.y > br.y) {\n throw new NoSudokuFoundException(\"Points are not correctly aligned\");\n }\n \n // Sanity check: The Sudoku has to be about square\n // calculate and compare the distance of the diagonals\n // raise an exception if the difference is more than 10%.\n double a = Math.sqrt(Math.pow(tr.y-bl.y, 2) + Math.pow(tr.x-bl.x, 2));\n double b = Math.sqrt(Math.pow(tl.y-br.y, 2) + Math.pow(tl.x-br.x, 2));\n double diff = Math.abs(a-b);\n \n // Sanity check: The upper edge is the shortest because it is farthest\n // from the lens. So the area of the square found must be larger than \n // the square of the upper line.\n\n \n\n // draw the points cyan.\n Core.line(mRgba, tl, tl, new Scalar(20,255,255), 3);\n Core.line(mRgba, tr, tr, new Scalar(20,255,255), 3);\n Core.line(mRgba, bl, bl, new Scalar(20,255,255), 3);\n Core.line(mRgba, br, br, new Scalar(20,255,255), 3);\n \n if(diff * 10 > a || diff * 10 > b) {\n throw new NoSudokuFoundException(\"Structure is not a square.\");\n }\n List<Point> points = new ArrayList<Point>();\n points.add(bl);\n points.add(br);\n points.add(tr);\n points.add(tl);\n return points;\n }", "default List<Point3D> findIntersections(Ray ray) {\n\tList<GeoPoint> geoList = findGeoIntersections(ray);\n\treturn geoList == null ? null\n\t: geoList .stream()\n\t.map(gp -> gp.point)\n\t.collect(Collectors.toList());\n\t}", "public Iterable<Point2D> range(RectHV rect)\n {\n Stack<Point2D> pointsInRect = new Stack<Point2D>();\n range(root, rect, pointsInRect);\n return pointsInRect;\n }", "private Point[] findAllIntersectPoints(Line[] lines) {\n Point[] points = new Point[NUM_LINE * NUM_LINE];\n int count = 0;\n for (int i = 0; i < NUM_LINE - 1; i++) {\n for (int j = i + 1; j < NUM_LINE; j++) {\n if (lines[i].isIntersecting(lines[j])) {\n points[count] = lines[i].intersectionWith(lines[j]);\n count++;\n }\n }\n }\n return points;\n }", "public Collection<IntPair> findEmptyNeighbors(int x, int y);", "public static List<Point> findConvexHull(List<Point> points) {\n Point basePoint = points.stream() // lowest point\n .min(Comparator.comparingDouble(Point::getY)).orElseThrow();\n\n List<Point> pointStorage = new ArrayList<>(points);\n pointStorage.remove(basePoint);\n\n pointStorage.sort((p1, p2) -> {\n double p1Atan = getPolarAngleBetween2Points(basePoint, p1);\n double p2Atan = getPolarAngleBetween2Points(basePoint, p2);\n return Double.compare(p1Atan, p2Atan);\n });\n\n List<Point> convexHullPoints = new ArrayList<>();\n convexHullPoints.add(basePoint);\n Map<Point, Double> pointToPolarAngle = new HashMap<>();\n pointToPolarAngle.put(basePoint, .0);\n\n for (Point point : pointStorage) {\n ListIterator<Point> listIterator = convexHullPoints.listIterator(convexHullPoints.size());\n while (listIterator.hasPrevious()) {\n Point previous = listIterator.previous();\n Double previousPolarAngle = pointToPolarAngle.get(previous);\n double curPointPolarAngle = getPolarAngleBetween2Points(previous, point);\n\n if (curPointPolarAngle < 0)\n curPointPolarAngle += Math.PI * 2;\n\n if (previousPolarAngle >= curPointPolarAngle) {\n listIterator.remove();\n pointToPolarAngle.remove(previous);\n } else {\n convexHullPoints.add(point);\n pointToPolarAngle.put(point, curPointPolarAngle);\n break;\n }\n }\n }\n\n return convexHullPoints;\n }", "private static int[][] findConvexHull(int[][] pointSet)\n {\n Stack<Integer> convexHullStack = new Stack<Integer>();\n if (pointSet[0].length > 3)\n {\n convexHullStack.push(0); convexHullStack.push(1); convexHullStack.push(2);\n for (int i = 3; i<= pointSet[0].length-1; i++)\n {\n Integer top = convexHullStack.pop();\n Integer nextToTop = convexHullStack.pop();\n while (((pointSet[0][top]-pointSet[0][nextToTop])*(pointSet[1][i]-pointSet[1][nextToTop]))-\n ((pointSet[0][i]-pointSet[0][nextToTop])*(pointSet[1][top]-pointSet[1][nextToTop])) <= 0)\n {\n top = nextToTop;\n nextToTop = convexHullStack.pop();\n }\n convexHullStack.push(nextToTop);\n convexHullStack.push(top);\n convexHullStack.push(i);\n }\n\n int[][] convexHull = new int[2][convexHullStack.size()];\n for (int i = convexHull[0].length-1; i>=0; i--)\n {\n int temp = convexHullStack.pop();\n convexHull[0][i] = pointSet[0][temp];\n convexHull[1][i] = pointSet[1][temp];\n }\n return convexHull;\n }\n else\n {\n return pointSet;\n }\n }", "boolean checkPointInsidePolygon(Point[] points, PVector input) {\n\t\tint i, j;\n\t\tboolean c = false;\n\t\tfor (i = 0, j = points.length - 1; i < points.length; j = i++) {\n\t\t\tif (((points[i].y > input.y) != (points[j].y > input.y))\n\t\t\t\t\t&& (input.x < (points[j].x - points[i].x) * (input.y - points[i].y) / (points[j].y - points[i].y)\n\t\t\t\t\t\t\t+ points[i].x))\n\t\t\t\tc = !c;\n\t\t}\n\t\treturn c;\n\t}", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "public boolean isConvex() {\t\r\n\t\tboolean value = true;\r\n\t\t\r\n\t\t//if size = 3 and passed the isSimple condition then \r\n\t\t//it is a non-collinear polygon, aka Triangle,\r\n\t\t//which is convez\r\n\t\tif ( this.getSize() == 3) {\r\n\t\t\tif (this.isSimple() != true) {\r\n\t\t\t\treturn false;\r\n\t\t\t}//else\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\tString zeroIndexOrientation = SimplePolygon.orientation(this.getVertex(0),\r\n\t\t\t\tthis.getVertex((0 + 1) % this.getSize()),\r\n\t\t\t\tthis.getVertex((1 + 1) % this.getSize()));\r\n\t\t\r\n\t\t\t//starting at index 1 not 0\r\n\t\t\tfor ( int i = 1; i < this.getSize(); i++) {\r\n\t\t\t//first point\r\n\t\t\tPoint2D.Double a = this.getVertex(i);\r\n\t\t\t\r\n\t\t\t//second point with respect to first point\r\n\t\t\tint j = (i+1) % this.getSize();\r\n\t\t\tPoint2D.Double b = this.getVertex(j);\r\n\t\t\t\r\n\t\t\t//third point with respect to second point, \r\n\t\t\t//which is with respect to first\r\n\t\t\tPoint2D.Double c = this.getVertex((j + 1) % this.getSize());\r\n\t\t\t\r\n\t\t\tif ( !SimplePolygon.orientation(a, b, c).equals(zeroIndexOrientation)) {\r\n\t\t\t\tvalue = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value; // TODO: replace this line with your code\r\n\t}", "public int[] getVertices() {\n long cPtr = RecastJNI.rcContour_verts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfVertices() * 4);\n }", "public Vecteur[] getPoints() {\n Vecteur[] points = {this.OA, this.OB};\n return points;\n }", "public Point[] getPoints()\n {\n return getPointsForAlignment(this);\n }", "public ArrayList<Integer> pointsInRange( int min, int max )\n {\n ArrayList<Integer> points = new ArrayList<Integer>();\n _root.findPoints( min, max, points );\n return points;\n }", "public static ArrayList<int[]> getDissatisfiedCellCoords(int[][] grid) {\n ArrayList<int[]> dissatisfiedCells = new ArrayList<int[]>();\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n\n if (grid[i][j] != 0) {\n\n int totalCells = 0, totalSatisfactory = 0;\n\n for (int k = i - 1; k <= i + 1; k++) {\n for (int l = j - 1; l <= j + 1; l++) {\n if (k > -1 && l > -1 && k < grid.length && l < grid.length) {\n if (k != i || l != j) {\n totalCells++;\n if (grid[k][l] == grid[i][j]) {\n totalSatisfactory++;\n }\n }\n }\n }\n }\n\n double percentSatisfied = (double)totalSatisfactory / (double)totalCells;\n\n if (percentSatisfied < PERCENT_SATISFIED) {\n int[] arr = {i, j};\n dissatisfiedCells.add((int)(Math.random() * dissatisfiedCells.size()), arr);\n }\n }\n\n }\n \n }\n\n return dissatisfiedCells;\n }", "public List<Point> query(Rectangle rectangle) {\n if (!boundary.intersects(rectangle)) {\n return Collections.emptyList();\n }\n\n List<Point> found = new ArrayList<>();\n points.stream()\n .filter(rectangle::contains)\n .forEach(found::add);\n\n if (isSubdivided) {\n found.addAll(nw.query(rectangle));\n found.addAll(ne.query(rectangle));\n found.addAll(se.query(rectangle));\n found.addAll(sw.query(rectangle));\n }\n\n return found;\n }", "public Queue<Point> getPoints() {\n\tQueue<Point> iter = new Queue<Point>();\n\tfor (Shape s : this.shapes) {\n\t for (Point p : s.getPoints())\n\t\titer.enqueue(p);\n\t}\n\n\treturn iter;\n }", "private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }", "public List<Point> getGhostPositions() {\n throw new RuntimeException(\"Not Implemented\");\n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "Collection<? extends Object> getHasXCoordinate();", "public Iterable<Point2D> range(RectHV rect) {\n Queue<Point2D> pointsInRect = new Queue<Point2D>();\n range(root, rect, pointsInRect);\n return pointsInRect;\n }", "public Iterable<Point2D> range(RectHV rect) {\n checkNull(rect);\n LinkedList<Point2D> pointList = new LinkedList<Point2D>();\n\n range(rect, root, pointList);\n\n return pointList;\n }", "public List<int[]> getCoords(Board lev){\n \tint[][] coords;\n \tColumn c = lev.getColumns().get(col);\n \tint[] p1 = c.getFrontPoint1();\n \tint[] p2 = c.getFrontPoint2();\n\n \tif (isPod && z < Board.BOARD_DEPTH) {\n \t\tint cx = p1[0] + (p2[0]-p1[0])/2;\n \t\tint cy = p1[1] + (p2[1]-p1[1])/2;\n\n \t\t// define outer and inner diamonds\n \t\tint[][] outer = new int[4][3];\n \t\tint[][] inner = new int[4][3];\n \t\touter[0][0] = cx;\n \t\touter[0][1] = cy - PODSIZE;\n \t\touter[0][2] = (int)z;\n \t\touter[1][0] = cx + PODSIZE;\n \t\touter[1][1] = cy;\n \t\touter[1][2] = (int) z;\n \t\touter[2][0] = cx;\n \t\touter[2][1] = cy + PODSIZE;\n \t\touter[2][2] = (int) z;\n \t\touter[3][0] = cx - PODSIZE;\n \t\touter[3][1] = cy;\n \t\touter[3][2] = (int) z;\n \t\tinner[0][0] = cx;\n \t\tinner[0][1] = cy - PODSIZE/3;\n \t\tinner[0][2] = (int) z;\n \t\tinner[1][0] = cx + PODSIZE/3;\n \t\tinner[1][1] = cy;\n \t\tinner[1][2] = (int) z;\n \t\tinner[2][0] = cx;\n \t\tinner[2][1] = cy + PODSIZE/3;\n \t\tinner[2][2] = (int) z;\n \t\tinner[3][0] = cx - PODSIZE/3;\n \t\tinner[3][1] = cy;\n \t\tinner[3][2] = (int) z;\n\n \t\t// define line path through those diamonds:\n \t\tcoords = new int[17][3];\n \t\tcoords[0] = outer[0];\n \t\tcoords[1] = outer[1];\n \t\tcoords[2] = inner[1];\n \t\tcoords[3] = inner [0];\n \t\tcoords[4] = outer[1];\n \t\tcoords[5] = outer[2];\n \t\tcoords[6] = inner[2];\n \t\tcoords[7] = inner[1];\n \t\tcoords[8] = outer[2];\n \t\tcoords[9] = outer[3];\n \t\tcoords[10]= inner[3];\n \t\tcoords[11]= inner[2];\n \t\tcoords[12]= outer[3];\n \t\tcoords[13]= outer[0];\n \t\tcoords[14]= inner[0];\n \t\tcoords[15]= inner[3];\n \t\tcoords[16]= outer[0];\n \t}\n \telse { \n \t\tcoords = new int[7][3];\n \t\tswitch (s) {\n \t\tcase STRAIGHT:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) (z-EXHEIGHT_H);\n \t\t\tcoords[1][0] = p2[0];\n \t\t\tcoords[1][1] = p2[1];\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H);\n \t\t\tcoords[2][0] = p2[0] - (p2[0]-p1[0])/3;\n \t\t\tcoords[2][1] = p2[1] - (p2[1]-p1[1])/3;\n \t\t\tcoords[2][2] = (int) z;\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) (z-EXHEIGHT_H);\n \t\t\tcoords[4][0] = p1[0];\n \t\t\tcoords[4][1] = p1[1];\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H);\n \t\t\tcoords[5][0] = p1[0] + (p2[0]-p1[0])/3;\n \t\t\tcoords[5][1] = p1[1] + (p2[1]-p1[1])/3;\n \t\t\tcoords[5][2] = (int) z;\n \t\t\tcoords[6][0] = p1[0];\n \t\t\tcoords[6][1] = p1[1];\n \t\t\tcoords[6][2] = (int) (z-EXHEIGHT_H);\n \t\t\tbreak;\n\n \t\tcase JUMPRIGHT1:\n \t\tcase LANDRIGHT2:\n \t\t\tcoords[0][0] = p1[0] + (p2[0]-p1[0])/4;\n \t\t\tcoords[0][1] = p1[1] + (p2[1]-p1[1])/4;\n \t\t\tcoords[0][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[1][0] = p2[0] + (p2[0]-p1[0])/4;\n \t\t\tcoords[1][1] = p2[1] + (p2[1]-p1[1])/4;\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[2][0] = p2[0] - (p2[0]-p1[0])/11;\n \t\t\tcoords[2][1] = p2[1] - (p2[1]-p1[1])/11;\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) z;\n \t\t\tcoords[4][0] = (int) (p1[0] + (p2[0]-p1[0])/2);\n \t\t\tcoords[4][1] = (int) (p1[1] + (p2[1]-p1[1])/2);\n \t\t\tcoords[4][2] = (int) (z+ EXHEIGHT_H*5);\n \t\t\tcoords[5][0] = (int) (p2[0] - (p2[0]-p1[0])/2.5);\n \t\t\tcoords[5][1] = (int) (p2[1] - (p2[1]-p1[1])/2.5);\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H *2.6);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPLEFT1:\n \t\tcase LANDLEFT2:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) z;\n \t\t\tcoords[1][0] = (int) (p1[0] + (p2[0]-p1[0])/2);\n \t\t\tcoords[1][1] = (int) (p1[1] + (p2[1]-p1[1])/2);\n \t\t\tcoords[1][2] = (int) (z+ EXHEIGHT_H*5);\n \t\t\tcoords[2][0] = (int) (p1[0] + (p2[0]-p1[0])/2.5);\n \t\t\tcoords[2][1] = (int) (p1[1] + (p2[1]-p1[1])/2.5);\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H *2.6);\n \t\t\tcoords[3][0] = p2[0] - (p2[0]-p1[0])/4;\n \t\t\tcoords[3][1] = p2[1] - (p2[1]-p1[1])/4;\n \t\t\tcoords[3][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[4][0] = p1[0] - (p2[0]-p1[0])/4;\n \t\t\tcoords[4][1] = p1[1] - (p2[1]-p1[1])/4;\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H*2);\n \t\t\tcoords[5][0] = p1[0] + (p2[0]-p1[0])/11;\n \t\t\tcoords[5][1] = p1[1] + (p2[1]-p1[1])/11;\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPLEFT2:\n \t\tcase LANDLEFT1:\n \t\t\tcoords[0][0] = p1[0];\n \t\t\tcoords[0][1] = p1[1];\n \t\t\tcoords[0][2] = (int) z;\n \t\t\tcoords[1][0] = (int) (p1[0] + (p2[0]-p1[0])/4.5);\n \t\t\tcoords[1][1] = (int) (p1[1] + (p2[1]-p1[1])/4.5);\n \t\t\tcoords[1][2] = (int) (z+ EXHEIGHT_H*8);\n \t\t\tcoords[2][0] = (int) (p1[0] + (p2[0]-p1[0])/4.5);\n \t\t\tcoords[2][1] = (int) (p1[1] + (p2[1]-p1[1])/4.5);\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H *4);\n \t\t\tcoords[3][0] = p2[0] - (p2[0]-p1[0])/2;\n \t\t\tcoords[3][1] = p2[1] - (p2[1]-p1[1])/2;\n \t\t\tcoords[3][2] = (int) (z+EXHEIGHT_H*4);\n \t\t\tcoords[4][0] = (int) (p1[0] - (p2[0]-p1[0])/3.5);\n \t\t\tcoords[4][1] = (int) (p1[1] - (p2[1]-p1[1])/3.5);\n \t\t\tcoords[4][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[5][0] = p1[0];// - (p2[0]-p1[0])/15;\n \t\t\tcoords[5][1] = p1[1];// - (p2[1]-p1[1])/15;\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n\n \t\tcase JUMPRIGHT2:\n \t\tcase LANDRIGHT1:\n \t\t\tcoords[0][0] = p2[0] - (p2[0]-p1[0])/2;\n \t\t\tcoords[0][1] = p2[1] - (p2[1]-p1[1])/2;\n \t\t\tcoords[0][2] = (int) (z+EXHEIGHT_H*4);\n \t\t\tcoords[1][0] = (int) (p2[0] + (p2[0]-p1[0])/3.5);\n \t\t\tcoords[1][1] = (int) (p2[1] + (p2[1]-p1[1])/3.5);\n \t\t\tcoords[1][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[2][0] = p2[0];// - (p2[0]-p1[0])/15;\n \t\t\tcoords[2][1] = p2[1];// - (p2[1]-p1[1])/15;\n \t\t\tcoords[2][2] = (int) (z+EXHEIGHT_H*1.8);\n \t\t\tcoords[3][0] = p2[0];\n \t\t\tcoords[3][1] = p2[1];\n \t\t\tcoords[3][2] = (int) z;\n \t\t\tcoords[4][0] = (int) (p2[0] - (p2[0]-p1[0])/4.5);\n \t\t\tcoords[4][1] = (int) (p2[1] - (p2[1]-p1[1])/4.5);\n \t\t\tcoords[4][2] = (int) (z+ EXHEIGHT_H*8);\n \t\t\tcoords[5][0] = (int) (p2[0] - (p2[0]-p1[0])/4.5);\n \t\t\tcoords[5][1] = (int) (p2[1] - (p2[1]-p1[1])/4.5);\n \t\t\tcoords[5][2] = (int) (z+EXHEIGHT_H *4);\n \t\t\tcoords[6] = coords[0];\n \t\t\tbreak;\n \t\t}\n \t}\n\n \treturn Arrays.asList(coords);\n }", "public Iterable<Point2D> points() {\n\n\t\tQueue<Point2D> points = new Queue<Point2D>();\n\t\tQueue<Node> queue = new Queue<Node>();\n\t\tqueue.enqueue(root);\n\n\t\twhile (!queue.isEmpty()) {\n\t\t\tNode x = queue.dequeue();\n\t\t\tif (x == null)\n\t\t\t\tcontinue;\n\t\t\tpoints.enqueue(x.point);\n\t\t\tqueue.enqueue(x.left);\n\t\t\tqueue.enqueue(x.right);\n\t\t}\n\t\treturn points;\n\t}", "public double minAreaFreeRect(int[][] points) {\n if (points.length < 4) {\n return 0;\n }\n\n //key: info of distance, x,y center positions\n double minVal = Double.MAX_VALUE;\n Map<String, List<int[]>> map = new HashMap<>();\n for (int i = 0; i < points.length - 1; i++) {\n for (int j = i + 1; j < points.length; j++) {\n long dis = (points[i][0] - points[j][0]) * (points[i][0] - points[j][0]) +\n (points[i][1] - points[j][1]) * (points[i][1] - points[j][1]);\n double centerX = (double)(points[i][0] + points[j][0]) / 2;\n double centerY = (double)(points[i][1] + points[j][1]) / 2;\n String key = dis + \" \" + centerX + \" \" + centerY;\n if (!map.containsKey(key)) {\n map.put(key, new ArrayList<int[]>());\n }\n map.get(key).add(new int[]{i,j});\n }\n }\n\n //therefore all vals stored in same key can form rectangles\n //just try all of them to find the one with smallest area\n for (String key: map.keySet()) {\n if (map.get(key).size() < 2) {\n continue;\n }\n List<int[]> values = map.get(key);\n for (int i = 0; i < values.size() - 1; i++) {\n for (int j = i + 1; j < values.size(); j++) {\n int p1 = values.get(i)[0];\n int p2 = values.get(i)[1];\n int p3 = values.get(j)[0];\n\n double len1 = Math.sqrt((points[p1][0] - points[p3][0]) * (points[p1][0] - points[p3][0]) + (points[p1][1] - points[p3][1]) * (points[p1][1] - points[p3][1]));\n double len2 = Math.sqrt((points[p2][0] - points[p3][0]) * (points[p2][0] - points[p3][0]) + (points[p2][1] - points[p3][1]) * (points[p2][1] - points[p3][1]));\n\n minVal = Math.min(minVal, len1 * len2);\n }\n }\n }\n return minVal == Double.MAX_VALUE? 0: minVal;\n\n }", "public Iterable<Point2D> points() {\n if (root == null) return new Queue<Point2D>();\n\n Queue<Point2D> pts = new Queue<Point2D>();\n Queue<Node> ptStore = new Queue<>();\n ptStore.enqueue(root);\n do {\n Node current = ptStore.dequeue();\n pts.enqueue(current.p);\n if (current.left != null) ptStore.enqueue(current.left);\n if (current.right != null) ptStore.enqueue(current.right);\n } while (!ptStore.isEmpty());\n return pts;\n }", "public Vector[] getCardinalPoints(){\r\n\t\tVector[] ret = new Vector[4];\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tret[i] = getPosition().add(new Vector(dx[i] * Tile.SIZE, dy[i] * Tile.SIZE));\r\n\t\treturn ret;\r\n\t}", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }", "public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }", "List<GeodeticPoint> getVisibilityCircle(ICoordinate coordinate, int points) throws OrekitException;", "@Override\n public ArrayList<Point> points(Rectangle inRectangle) {\n // if the node's rect and the given rect don't intersect, return an empty array,\n // because there can't be any points that lie the node's (or its children's) rect and\n // in the given rect\n if (!this.rectangle.intersects(inRectangle)) {\n return new ArrayList<Point>();\n }\n\n ArrayList<Point> result = new ArrayList<Point>();\n\n // collect the node's points that lie in the rect\n for (Point point : points) {\n if (inRectangle.contains(point)) {\n result.add(point);\n }\n }\n\n if (hasChildren) {\n // recursively add children's points that lie in the rect\n for (QuadtreeNode node : children) {\n result.addAll(node.points(inRectangle));\n }\n }\n\n return result;\n }", "public List<Point2D> getControlPoints();", "public float[] getBounds() {\r\n\t\tfloat[] bounds = {x_ - width_/ 2, x_ + width_ / 2, y_ - height_ / 2, y_ + height_ / 2};\r\n\t\treturn bounds;\r\n\t}", "protected abstract Iterable<E> getIntersecting(D lower, D upper);", "public java.util.List[] getPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n java.util.List[] result = new java.util.List[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getListValue();\n return result;\n }\n }", "abstract public Point[] getCheminDeplacement(Coup c);", "public final java.util.List<org.xms.g.maps.model.LatLng> getPoints() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getPoints()\");\n java.util.List hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getPoints();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(hReturn, new org.xms.g.utils.Function<com.huawei.hms.maps.model.LatLng, org.xms.g.maps.model.LatLng>() {\n\n public org.xms.g.maps.model.LatLng apply(com.huawei.hms.maps.model.LatLng param0) {\n return new org.xms.g.maps.model.LatLng(new org.xms.g.utils.XBox(null, param0));\n }\n }));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getPoints()\");\n java.util.List gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getPoints();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(gReturn, new org.xms.g.utils.Function<com.google.android.gms.maps.model.LatLng, org.xms.g.maps.model.LatLng>() {\n\n public org.xms.g.maps.model.LatLng apply(com.google.android.gms.maps.model.LatLng param0) {\n return new org.xms.g.maps.model.LatLng(new org.xms.g.utils.XBox(param0, null));\n }\n }));\n }\n }", "public int[][] extractVoxels(ImageStack stack){\n\t\tint stack_width = stack.getWidth();\n\t\tint stack_height = stack.getHeight();\n\t\tint stack_length = stack.getSize();\n\n\t\t// method will extract cone thath's been cutoff from the stack\n\t\t\n\t\tint cone_radius \t= (int)Math.round(this.r);\n\t\t//int cone_radius1 \t= (int)Math.round(this.r1);\n\t\tint cone_height\t\t= (int)Math.round(this.getH());\n\t\tint cone_limit\t\t= (int)Math.ceil(Math.sqrt(Math.pow(r1, 2)+Math.pow(this.getH(), 2)));\n\t\t\n\t\tif(cone_radius>cone_limit){\n\t\t\tcone_limit = cone_radius;\n\t\t}\n\t\t\n\t\t// center in pixel coordinates\n\t\tint[] centerPix = {(int)Math.round(this.x), (int)Math.round(this.y), (int)Math.round(this.z)};\n\t\t\n\t\t// define the range\n\t\tint startX = 1; if (centerPix[0]-cone_limit > 1) startX = centerPix[0]-cone_limit;\n\t\tint startY = 1; if (centerPix[1]-cone_limit > 1) startY = centerPix[1]-cone_limit;\n\t\tint startZ = 1; if (centerPix[2]-cone_limit > 1) startZ = centerPix[2]-cone_limit;\n\t\t\t\n\t\tint endX = stack_width; if (centerPix[0]+cone_limit < stack_width) endX = centerPix[0]+cone_limit;\n\t\tint endY = stack_height; if (centerPix[1]+cone_limit < stack_height) endY = centerPix[1]+cone_limit;\n\t\tint endZ = stack_length; if (centerPix[2]+cone_limit < stack_length) endZ = centerPix[2]+cone_limit;\n\n\t\tint count=0;\n\t\t// this consumes memory! - maybe not necessary to allocate here\n\t\tbyte[] pixels = new byte[stack_width*stack_height]; //storage for pixels from one layer\n\t\tint[][] roi = new int [2*cone_limit*2*cone_limit*2*cone_limit][4];//roi big enough to take cone at any orientation\n\t\t\n\t\tdouble[] b ={0, 0, 0}; \n\t\tdouble[] c ={0, 0, 0};\n\t\tdouble[] a ={0, 0, 0}; //this one will serve as unit h vector\n\t\ta[0] = h[0]/this.getH(); a[1] = h[1]/this.getH(); a[2] = h[2]/this.getH();\n\t\t\n\t\tTransf.cartesian(a[0], a[1], a[2], b, c);\n\t\t\n\t\tfor(int z_layer=startZ; z_layer<endZ; z_layer++){\n\t\t\tpixels = (byte[])stack.getPixels(z_layer);\n\t\t\tfor(int x_row=startX; x_row<endX; x_row++){\n\t\t\t\tfor(int y_col=startY; y_col<endY; y_col++){\n\t\t\t\t\t\n\t\t\t\t\tdouble point_h, point_r;\n\t\t\t\t\tdouble vx, vy, vz;\n\t\t\t\t\t\n\t\t\t\t\tvx = x_row-x; \n\t\t\t\t\tvy = y_col-y; \n\t\t\t\t\tvz = z_layer-z;\n\t\t\t\t\t\n\t\t\t\t\tpoint_h = vx*a[0]+vy*a[1]+vz*a[2]; \n\t\t\t\t\tpoint_r = Math.sqrt(Math.pow(vx*b[0]+vy*b[1]+vz*b[2], 2)+Math.pow(vx*c[0]+vy*c[1]+vz*c[2], 2));\n\t\t\t\t\t\n\t\t\t\t\tboolean isInCone = true;\n\t\t\t\t\tisInCone = (point_h<=cone_height) && (point_h>=0) && (point_r<= ((r1-r)/this.getH())*point_h+r);//\n\t\t\t\t\t\n\t\t\t\t\tif(isInCone){\n\t\t\t\t\t\troi[count][3] = pixels[x_row + stack_width * y_col] & 0xff; //int\n\t\t\t\t\t\troi[count][0] = x_row; \n\t\t\t\t\t\troi[count][1] = y_col; \n\t\t\t\t\t\troi[count][2] = z_layer;\n\t\t\t\t\t\tcount ++;\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// quite inefficient for memory to extract twice... but left it this way by now\n\t\tint[][] extractedVoxels = new int [count][4];\n\t\tfor(int i=0; i<count; i++){\n\t\t\tfor(int j=0; j<4; j++){\n\t\t\t\textractedVoxels[i][j]=roi[i][j];\n\t\t\t}\n\t\t}\n\t\treturn extractedVoxels;\n\t}", "public Position[] getCorners() {\n\t\treturn new Position []{new Position(this.vertexes.get(0).x, this.vertexes.get(0).y), new Position(this.vertexes.get(1).x, this.vertexes.get(1).y)};\n\t}", "public Collection<Point> getAdjacency(Point point){\n Preconditions.checkNotNull(point, \"point must not be null\");\n Collection <Point> results = new ArrayList<>();\n for(int i = -1; i < 2; i++){\n for(int j = -1; j < 2; j++){\n int new_x = point.getX() + i;\n int new_y = point.getY() + j;\n if(new_x >= 0 && new_y >= 0 &&\n (i != 0 || j != 0) &&\n new_x < width && new_y < height){\n results.add(new Point(new_x, new_y));\n }\n }\n }\n return results;\n }", "public ArrayList<E> getAt(Point p) {\n\t\tArrayList<E> result = new ArrayList<E>();\n\t\tfor (E e : entities)\n\t\t\tif (e.getBounds().contains(p))\n\t\t\t\tresult.add(e);\n\t\treturn result;\n\t}", "List<GeoPoint> findGeoIntersections(Ray ray);", "public void findBoundaryGivenPhi() {\n \r\n boundary.removeAllElements();\r\n \r\n \tfor(int i=0; i<pixelsWide-1; i++)\r\n \t\tfor(int j=0; j<pixelsHigh-1; j++) {\r\n Int2d pi = new Int2d(i,j);\r\n \r\n double sgnIJ = Math.signum( phi[i][j] );\r\n if( sgnIJ != Math.signum( phi[i+1][j] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i+1,j);\r\n if(!boundary.contains(p2)) boundary.add(p2);\r\n }\r\n if( sgnIJ != Math.signum( phi[i][j+1] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i,j+1);\r\n if(!boundary.contains(p2)) boundary.add(p2); \r\n }\r\n \r\n }\r\n \r\n \r\n }", "private float getMinX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float minX = Float.POSITIVE_INFINITY;\n for (float [] point : points) {\n minX = Math.min(minX, point [0]);\n } \n return minX;\n }", "public Point[] getCoordinates() {\n Point[] temp = new Point[segments.length];\n for (int i = 0; i < segments.length; i++) {\n temp[i] = segments[i].getCoordinates();\n }\n return temp;\n }", "public abstract Proximity2DResult[] getNearestVertices(Geometry geom,\n\t\t\tPoint inputPoint, double searchRadius, int maxVertexCountToReturn);", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "public Collection<OsmPrimitive> getNearestCollection(Point p) {\n OsmPrimitive osm = getNearest(p);\n if (osm == null)\n return Collections.emptySet();\n return Collections.singleton(osm);\n }", "public Point findEmptyCell(){\n int height = Math.min(labyrinth.getCells().length,LabyrinthFactory.HEIGHT-2);\n int widht = Math.min(labyrinth.getCells()[0].length, LabyrinthFactory.WIDTH);\n while(true) {\n int x = ThreadLocalRandom.current().nextInt(0, widht-2);\n int y = ThreadLocalRandom.current().nextInt(0, height-2);\n if (!labyrinth.getCell(x, y).isSolid()) {\n return new Point(x, y);\n }\n }\n }", "public Iterable<Point2D> range(RectHV rect) {\n SET<Point2D> result = new SET<Point2D>();\n if (root == null) {\n return result;\n }\n\n range(root, rect, result);\n return result;\n }", "@Override\n\tpublic List<DiscreteCoordinates> getCurrentCells() {\n\t\treturn Collections.singletonList(getCurrentMainCellCoordinates());\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 }", "@Test\n public void getPointsTest() {\n final double[] expectedResult = new double[3];\n final double[] envelope = new double[]{-3, 2, 0, 1, 4, 0};\n\n //lower corner\n System.arraycopy(envelope, 0, expectedResult, 0, 3);\n assertTrue(Arrays.equals(expectedResult, getLowerCorner(envelope)));\n\n //upper corner\n System.arraycopy(envelope, 3, expectedResult, 0, 3);\n assertTrue(Arrays.equals(expectedResult, getUpperCorner(envelope)));\n\n //median\n expectedResult[0] = -1;\n expectedResult[1] = 3;\n expectedResult[2] = 0;\n assertTrue(Arrays.equals(expectedResult, getMedian(envelope)));\n }", "private ArrayList<Point> findS(ArrayList<Point> s, Point p1, Point p2) {\n ArrayList<Point> s1 = new ArrayList<>();\n for(int i = 1; i < s.size(); i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > 0) {\n s1.add(s.get(i));\n }\n }\n return s1;\n }" ]
[ "0.6968535", "0.64195144", "0.6138351", "0.60353833", "0.60237354", "0.5991297", "0.5934089", "0.5891848", "0.5858787", "0.5776714", "0.5773583", "0.5761727", "0.5740774", "0.5715585", "0.5704616", "0.56957126", "0.5653532", "0.56439674", "0.5623615", "0.5567137", "0.55606645", "0.5557153", "0.55416405", "0.5524769", "0.5513285", "0.5512956", "0.5498283", "0.54924273", "0.54903865", "0.5481714", "0.5425315", "0.541197", "0.54106784", "0.54084337", "0.5403766", "0.5398907", "0.538844", "0.538462", "0.5376127", "0.536232", "0.5358366", "0.5354323", "0.5350009", "0.534787", "0.5338989", "0.53377897", "0.53363866", "0.5331799", "0.5330688", "0.5317922", "0.5315538", "0.5293348", "0.5292392", "0.52907944", "0.5287262", "0.52867436", "0.5266156", "0.52573985", "0.5240952", "0.52345824", "0.52285635", "0.52160424", "0.5213758", "0.520471", "0.52009034", "0.52008283", "0.51948196", "0.5182212", "0.5180338", "0.5177556", "0.5176259", "0.51572543", "0.5152492", "0.5152186", "0.5135976", "0.51297873", "0.5126922", "0.5125842", "0.5120246", "0.5109203", "0.5107795", "0.5096269", "0.50846577", "0.5067573", "0.50530195", "0.50406945", "0.50403374", "0.5035875", "0.5032174", "0.5029045", "0.5025722", "0.50254476", "0.50243855", "0.5023269", "0.50164646", "0.5012157", "0.5010702", "0.50022906", "0.49982134", "0.49947035" ]
0.80572104
0
enregistrement ou mise a jour !!!
public void saveDirecteur(Directeur directeur){ directeurRepos.save(directeur); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@Override\n\tpublic void registrarSalida() {\n\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\n\tpublic void registrarEntrada() {\n\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t}", "@Override\n\tpublic void registrarAtencion(TramiteUsuario tramite) {\n\t\ttramite.setSecUsuario1( Usuario.getUsuarioBean() );\n\t\ttramite.setSecUsuario2( Usuario.getUsuarioBean() );\n\t\ttramite.setEstado(1);\n\t\ttramite.setEstadoTramiteFinal( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramite.setFechaRegistro( new Date() );\n\t\ttramiteDAO.registrarMovimiento( tramite );\n\t\t\n\t\ttramite.getTramite().setEstado( ParametroUtil.EstadoTramite.ATENDIDO.value );\n\t\ttramiteDAO.registrar( tramite.getTramite() );\n\t\t\n\t}", "public void registrar() {\n try {\r\n do {\r\n //totalUsuarios = this.registraUnUsuario(totalUsuarios);\r\n this.registraUnUsuario();\r\n } while (!this.salir());\r\n } catch (IOException e) {\r\n flujoSalida.println(\"Error de entrada/salida, finalizará la aplicación.\");\r\n }\r\n flujoSalida.println(\"Total usuarios registrados: \"+totalUsuarios);\r\n }", "private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}", "public void AlterarRegistro(){\n \n\t\tthis.localidadeRepository.AlterarRegistro(this.localidadeModel);\t\n \n\t\tUteis.MensagemInfo(\"Registro alterado com sucesso\");\n\t\t\n\t\tthis.init();\n\t}", "static void effacerEnregistrer(){\n users.clear();\n }", "public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }", "public String enregistrerAuteur(Auteur a) {\n auteurDao.creerAuteur(a);\n return \"SUCCESS\";\n }", "public void registrarUsuarioFinal(){\r\n Usuario nuevoUsuario= new Usuario();\r\n nuevoUsuario.setNombreUsuario(nuevoNombreUsuario);\r\n nuevoUsuario.setPassword(nuevoPasswordUsuario);\r\n nuevoUsuario.setTipoUsuario(\"final\");\r\n \r\n IUsuarioDAO iusuarioDAO = new UsuarioDAOImp();\r\n iusuarioDAO.agregarUsuario(nuevoUsuario);\r\n FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Usuario registrado\", \"Usuario registrado exitosamente\");\r\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\r\n\r\n }", "protected void agregarUbicacion(){\n\n\n\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public int registrarMovimiento(ModelMovimiento model) {\n\t\tString sql = \"insert into movimientos (id_cuenta, monto, estado, operacion) values (?, ?, ?, ?)\";\n\t\treturn super.update(sql, model.getIdCuenta(), model.getMonto() ,model.isEstado(), model.getIdOperacion());\n\t}", "public abstract void leerPersistencia();", "@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(t);\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,PresuTipoProyecto presutipoproyecto,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(presutipoproyecto.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(presutipoproyecto.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!presutipoproyecto.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(presutipoproyecto.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void registrarTema() {\n\t\ttemaEJB.crearTema(tema);\n\t\tlimpiarCampos();\n\t\tlistaTemas();\n\t}", "Persistencia() {\n\t}", "private void charge_up() throws GB_Exception {\n try{\n if(PersonalDataController.getInstance().existRegistry(username)){\n putPersonalInformation();\n }else{\n putDefaultInformation();\n }\n } catch (SQLException | IOException ex) {\n LOG.error(ex);\n throw new GB_Exception(\"Error al carga informacion de usuario. Comuniquese con su administrador.\");\n }\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,PlantillaFactura plantillafactura,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(plantillafactura.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(plantillafactura.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!plantillafactura.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(plantillafactura.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void registerUser(Register reg)\r\n {\n\t Session session = HibernateUtils.getSession();\r\n\t Transaction tx = session.beginTransaction();\r\n\t session.save(reg);\r\n\t tx.commit();\r\n\t session.close();\r\n }", "@Override\r\n\tpublic boolean register(String email, String id, String pw) {\n\t\treturn jdbcTemplate.update(\"insert into s_member values(?,?,?,\"\r\n\t\t\t\t+ \"'normal',sysdate)\",email,id,pw)>0;\r\n\t}", "public void registrarAdministrador() throws IOException {\n\n //asignamos al usuario la imagen de perfil default\n usuarioView.setUsuarioFotoRuta(getPathDefaultUsuario());\n usuarioView.setUsuarioFotoNombre(getNameDefaultUsuario());\n\n //Se genera un login y un pass aleatorio que se le envia al proveedor\n MD5 md = new MD5();\n GenerarPassword pass = new GenerarPassword();\n SendEmail email = new SendEmail();\n\n password = pass.generarPass(6);//Generamos pass aleatorio\n\n //Encriptamos las contraseñas\n usuarioView.setUsuarioPassword(md.getMD5(password));//Se encripta la contreseña\n usuarioView.setUsuarioRememberToken(md.getMD5(password));\n\n //el metodo recibe los atributos, agrega al atributo ciudad del objeto usuario un objeto correspondiente, \n //de la misma forma comprueba el rol y lo asocia, por ultimo persiste el usuario en la base de datos\n usuarioView.setSmsCiudad(ciudadDao.consultarCiudad(usuarioView.getSmsCiudad()));//Asociamos una ciudad a un usuario\n usuarioView.setSmsRol(rolDao.consultarRol(usuarioView.getSmsRol()));//Asociamos un rol a un usuario\n usuarioView.setUsuarioEstadoUsuario(1);//Asignamos un estado de cuenta\n usuarioView.setSmsNacionalidad(nacionalidadDao.consultarNacionalidad(usuarioView.getSmsNacionalidad()));\n\n //registramos el usuario y recargamos la lista de clientes\n usuarioDao.registrarUsuario(usuarioView);\n usuariosListView = adminDao.consultarUsuariosAdministradores();\n\n //Enviar correo\n email.sendEmailAdministradorBienvenida(usuarioView, password);\n\n //limpiamos objetos\n usuarioView = new SmsUsuario();\n password = \"\";\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,DatoGeneralEmpleado datogeneralempleado,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(datogeneralempleado.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(datogeneralempleado.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!datogeneralempleado.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(datogeneralempleado.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n\tpublic void regist(User user) {\n\t\tdao.addUser(user);\n\t}", "@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}", "public void GuardarSerologia(RecepcionSero obj)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n session.saveOrUpdate(obj);\n }", "@Override\r\n\tpublic String insert() {\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doSave(admin)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"²åÈë\");\r\n\t\treturn SUCCESS;\r\n\t}", "public ErrorCode regist( String uname, String pass ){\n ErrorCode eCode = userBaseInfoManager.regist( uname, uname + \"nick\", pass );\n if( eCode.isSuccess() ) {\n User user = getUserByName( uname );\n initNewUser( user );\n }\n return eCode;\n }", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,ValorPorUnidad valorporunidad,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(valorporunidad.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(valorporunidad.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!valorporunidad.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(valorporunidad.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}", "public void registrar(JugadorXJugadorVO fila, DbConnection connection)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\ttry {\n\t\t\tStatement statement = connection.getConnection().createStatement();\n\t\t\tstatement.executeUpdate(\"INSERT INTO jugadorxjugador VALUES ('\"\n\t\t\t\t\t+ fila.getId() + \"', '\" + fila.getId2() + \"')\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Se ha registrado Exitosamente\", \"Información\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tstatement.close();\n//\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"No se pudo registrar al jugador\");\n\t\t}\n\t}", "public void create(Joueur joueur) {\n EntityManager em = EntityManagerHolder.getCurrentEntityManager();\n EntityTransaction tx = null;\n\n try {\n// session = HibernateUtil.getSessionFactory().getCurrentSession();\n// tx = session.beginTransaction();\n// session.persist(joueur);\n tx = em.getTransaction();\n em.persist(joueur);\n //declenche l'ajout d'un ou plusieurs elements -> synchronisation de la session et de la BDD\n\n System.out.println(\"Joueur créé avec succès\");\n } catch (Exception e) {\n\n e.printStackTrace();\n } finally {\n if (em != null) {\n em.close();\n }\n }\n }", "void entrerAuGarage();", "@PrePersist\n private void onSave()\n {\n this.lastUpdateDateTime = new Date();\n if(this.registerDateTime == null)\n {\n this.registerDateTime = new Date();\n }\n \n if(this.personKey == null || this.personKey.isEmpty())\n {\n this.personKey = UUID.randomUUID().toString();\n }\n \n if(this.activationDate == null && (this.activationKey == null || this.activationKey.isEmpty()))\n {\n this.activationKey = UUID.randomUUID().toString();\n this.activationDate = new Date();\n }\n \n // O ID só será 0 (zero) se for a criação do registro no banco\n if(this.id == 0)\n {\n this.isValid = false;\n }\n }", "@Override\n\t public boolean createman() {\n\t\t\n\t\t\n\t\t\n String guanli;\n System.out.println(\"\\n---------注册---------\");\n System.out.println(\"请输入ID:\");\n ID = console.next();\n while (Tool.confirm(ID, \"log\")) {\n \t//System.out.println(\"hhhh\");\n \tSystem.out.println(\"[此ID已存在] 重新输入#返回\");\n //if((console.next()) == \"#\")\n //{\n \t//System.out.println(\"hhhh\");\n return false;\n // }\n }\n System.out.println(\"请输入密码:\");\n code = console.next();\n guanli=\"否\";\n\n String sql = \"INSERT into log(ID, code, guanli) \" + \"VALUES (?,?,?)\";\n try{\n pre = conn.prepareStatement(sql);\n pre.setString(1, ID);\n pre.setString(2, code);\n pre.setString(3, guanli);\n\n pre.execute();\n System.out.println(\"[创建成功!]\");\n }catch (SQLException e){\n e.printStackTrace();\n }\n\t\treturn true;\n\t}", "private void registrar(HttpServletRequest request, HttpServletResponse response) throws ServletException {\n\t\ttry {\n\t\t\t//leo lo que nos envia el formulario de la vista nuevoCliente.jsp y los almaceno en un objeto tipo Cliente\n\t\t\tCliente miCliente = new Cliente();\n\t\t\t\t\n\t\t\t//agregamos al objeto lo que proviene del formulario usando el constructor de clase Cliente\n\t\t\tmiCliente.setNombre(request.getParameter(\"nombre\"));\n\t\t\tmiCliente.setEmail(request.getParameter(\"email\"));\n\t\t\tmiCliente.setPass(request.getParameter(\"password\"));\n\t\t\tmiCliente.setEdad(Integer.parseInt(request.getParameter(\"edad\")));\n\t\t\tmiCliente.setDomicilioCalle(request.getParameter(\"domicilioCalle\"));\n\t\t\tmiCliente.setDomicilioNumero(Integer.parseInt(request.getParameter(\"domicilioNumero\")));\n\t\t\tmiCliente.setLocalidad(request.getParameter(\"localidad\"));\n\t\t\t\n\t\t\t//seteamos la fecha/hora de sesion\n\t\t\tDate d=new Date();\n\t\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yy-MM-dd hh:mm:ss\");//objeto tipo formato de fecha. Le pasamos el formato de la fecha\n\t\t\tString ultimaSesion=sdf.format(d);\n\t\t\tmiCliente.setUltimaSesion(ultimaSesion);\n\t\t\t\n\t\t\tmiCliente.setIdUsuario(Integer.parseInt(request.getParameter(\"idUsuario\")));//seteo el valor 2 que viene oculto desde el form\n\t\t\t\n\t\t\t//llamo al modelo para hacer el INSERT verfico si pudo insertar\n\t\t\tif(modelo.crearCliente(miCliente)) {\n\t\t\t\tresponse.getWriter().println(\"Usted se ha registrado Correctamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tresponse.getWriter().println(\"No se pudo efectuar registrar\");\n\t\t\t\t}\n\t\t} catch (NumberFormatException | NoSuchAlgorithmException | SQLException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,GrupoBodega grupobodega,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(grupobodega.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(grupobodega.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!grupobodega.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(grupobodega.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "@Override\n\tpublic Object register(Map<String, Object> map) {\n\t\tString result = \"success\";\n\t\tString userId=IdUtil.uuid();\n\t\tmap.put(\"userType\", 2);\n\t\tmap.put(\"userId\", userId);\n\t\t\n\t\tString sql=\"insert into tp_users (userId, userName, userPwd, userType,realName)\"\n\t\t\t\t+ \" values(:userId,:userName,:userPwd,:userType,:realName)\";\n\t\tjoaSimpleDao.executeUpdate(sql, map);\n\t\n\t\treturn \"success\";\n\t}", "public void salvarFornecedor()\r\n {\r\n /*\r\n * Implementação da lógica de salvar um fornecedor. Tratando as\r\n * mensagens conforme solicitado no desafio 1\r\n */\r\n try\r\n {\r\n fornecedorBusiness.salvarFornecedor(fornecedorResource);\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_INFO, \"Fornecedor Adicionado com Sucesso!\", \"\"));\r\n } catch (RuntimeException e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(\"formFornecedor:messages\",\r\n new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), \"\"));\r\n }\r\n }", "public void enregistrement (double Ox1, double Oy1, double Px1, double Px2, double perim, double aire, String dessin){\n\t}", "protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }", "void regist(User user) throws SQLException;", "public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }", "public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden){\n try { \n crearDeclaracionPreparada(conexion, datos, orden).executeUpdate(); //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }", "void registerUser(User newUser);", "private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "public void create(Membre membre) {\n try {\n// em = getEntityManager();\n// entManager.getTransaction().begin();\n entManager.persist(membre);\n// entManager.getTransaction().commit();\n } finally {\n// if (entManager.getTransaction() != null) {\n// entManager.close();\n// }\n }\n }", "@Override\n\tpublic void guardar() {\n\t\tLOG.info(\"El usuario fue guardado \"+ usuario.getApellido()+\", \"+ usuario.getNombre());\n\t}", "public void registrarProyecto(Proyecto proyecto) {\r\n\t\tproyectoServ.validarRegistro(proyecto);\r\n\t}", "public void addindb2(){\n //e = new Event(\"bbb\",\"bbb\",\"bbb\",\"bbb\");\n u = new User(0,getUser(),getPwd());\n try{ \n session = NewHibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n session.save(u);\n session.getTransaction().commit();\n session.close();\n clear();\n try{\n FacesContext.getCurrentInstance().getExternalContext().redirect(\"/BookStorePelikSangat/faces/index.xhtml\");\n } \n catch (IOException e) {}\n } catch(HibernateException e) {\n session.getTransaction().rollback();\n session.close();\n }\n\t}", "@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}", "@Override\n\tpublic boolean registerUtente(Utente user) {\n\t\tif(!userExists(user)) {\n\t\t\tDB db = getDB();\n\t\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\t\tlong hash = (long) user.getUsername().hashCode();\n\t\t\tusers.put(hash, user);\n\t\t\tdb.commit();\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\t\n\t}", "private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}", "public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}", "public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }", "public Register() {\n user = new User();\n em = EMF.createEntityManager();\n valid = false;\n }", "private static void registrarAuditoriaDetallesPlantillaFactura(Connexion connexion,PlantillaFactura plantillafactura)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_empresa().equals(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getcodigo().equals(plantillafactura.getPlantillaFacturaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getnombre().equals(plantillafactura.getPlantillaFacturaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getdescripcion().equals(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getes_proveedor().equals(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getes_proveedor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getes_proveedor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.ESPROVEEDOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_aplicada().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_aplicada().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_gasto().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_gasto().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,Caja caja,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(caja.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(caja.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!caja.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(caja.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, caja.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////CajaLogic.registrarAuditoriaDetallesCaja(connexion,caja,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "public void enregistreEcPirate(PirateEcouteur ecouteur)\n\t{\n\t\tthis.pirateEcouteurs.add(PirateEcouteur.class, ecouteur);\n\t}", "protected void accionUsuario() {\n\t\t\r\n\t}", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "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 }", "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}", "private void RealizarAccion() {\n if (ValidarCampos()) {\n\n persona.setPrimerNombre(txtPrimerNombre.getText());\n persona.setSegundoNombre(txtSegundoNombre.getText());\n persona.setPrimerApellido(txtPrimerApellido.getText());\n persona.setSegundoApellido(txtSegundoApellido.getText());\n persona.setTelefono(txtTelefono.getText());\n persona.setCedula(txtCedula.getText());\n persona.setCorreo(txtCorreo.getText());\n persona.setDireccion(txtDireccion.getText());\n\n empleado.setFechaInicio(dcFechaInicio.getDate());\n empleado.setSalario(Double.parseDouble(txtSalario.getText()));\n empleado.setCargo(txtCargo.getText());\n empleado.setUsuarioByUserModificacion(SessionHelper.usuario);\n empleado.setFechaModificacion(new Date());\n empleado.setRegAnulado(false);\n\n switch (btnAction.getText()) {\n case \"Guardar\":\n int maxid = personaBean.MaxId() + 1;\n persona.setIdPersona(maxid);\n\n Dbcontext.guardar(persona);\n\n empleado.setIdEmpleado(maxid);\n empleado.setPersona(persona);\n empleado.setUsuarioByUserCreacion(SessionHelper.usuario);\n empleado.setFechaCreacion(new Date());\n\n Dbcontext.guardar(empleado);\n break;\n\n case \"Actualizar\":\n\n Dbcontext.actualizar(persona);\n\n Dbcontext.actualizar(empleado);\n break;\n }\n if (ifrRegistroEmpleados.isActive) {\n ifrRegistroEmpleados.CargarTabla();\n }\n\n Mensajes.OperacionExitosa(this);\n dispose();\n } else {\n Mensajes.InformacionIncompleta(this);\n }\n }", "@Override\n\tpublic void nuevo() {\n\n\t}", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "public static void registrarAuditoria(Connexion connexion,Long idUsuario,ClienteArchivo clientearchivo,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(clientearchivo.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(clientearchivo.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!clientearchivo.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(clientearchivo.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}", "@Override\n public void save(Usuario usuario) {\n }", "@WebMethod public Pertsona register(String izena, String abizena1, String abizena2, String erabiltzaileIzena, String pasahitza, String telefonoa, String emaila, LocalDate jaiotzeData, String mota) throws UserAlreadyExist;", "private void caricaRegistrazione() {\n\t\tfor(MovimentoEP movimentoEP : primaNota.getListaMovimentiEP()){\n\t\t\t\n\t\t\tif(movimentoEP.getRegistrazioneMovFin() == null) { //caso di prime note libere.\n\t\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"La prima nota non e' associata ad una registrazione.\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.registrazioneMovFinDiPartenza = registrazioneMovFinDad.findRegistrazioneMovFinById(movimentoEP.getRegistrazioneMovFin().getUid());\n\t\t\t\n\t\t}\n\t\t\n\t\tif(this.registrazioneMovFinDiPartenza.getMovimento() == null){\n\t\t\tthrow new BusinessException(\"Movimento non caricato.\");\n\t\t}\n\t\t\n\t}", "private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\r\n\tpublic void createFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().save(fournisseur);\r\n\t}", "Lancamento persistir(Lancamento lancamento);", "Boolean registerNewUser(User user);", "public static void registrazione(String givenemail, String nome, String conome, String provincia, String orari, String password, String materie) {\n\n String email = mailtoDB(givenemail);\n String materieLC = materie.toLowerCase();\n final String percorsoReg = \"insegnanti\"; //Percorso registrazione account.\n final String percorsoDati = \"province\"; //Percorso registrazione dati.\n\n //Creazione arraylist materie da stringa.\n ArrayList<String> listamaterie = new ArrayList<String>(Arrays.asList(materieLC.split(\"[,\\n]\")));\n int index=0;\n for (String s : listamaterie) {\n listamaterie.set(index,s.trim());\n index++;\n }\n\n //Creazione oggetti \"rins\" e \"ins\" rispettivamente per registrazione password account e dati.\n RegTeacher rins = new RegTeacher(password, provincia);\n Teacher ins = new Teacher(givenemail, nome, conome, provincia, orari, \"0000\", listamaterie);\n\n //Registrazione rins, usando percorso Reg.\n DatabaseReference regRef = FirebaseDatabase.getInstance().getReference(percorsoReg);\n regRef.child(email).setValue(rins);\n\n //Registrazione ins, serve creare nuovo percorso.\n DatabaseReference dataRef = FirebaseDatabase.getInstance().getReference(percorsoDati).child(provincia.toLowerCase());\n dataRef.child(email).setValue(ins);\n }", "private void metodoSalvarUsuarioFirebase(final Usuarios variavelClasseUsuarios) {\n\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n refAutenticacaofb.createUserWithEmailAndPassword(variavelClasseUsuarios.getEmail(),\n variavelClasseUsuarios.getSenha()).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n\n idUsuario = task.getResult().getUser().getUid();\n variavelClasseUsuarios.setId(idUsuario);\n variavelClasseUsuarios.salvarUsuario();\n\n if(pegarTipoUsuarioSwitch() == \"Cliente\"){\n\n startActivity(new Intent(CadastroUsuario.this, Home.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Usuário salvo com sucesso\", Toast.LENGTH_LONG).show();\n }else{\n\n startActivity(new Intent(CadastroUsuario.this, PainelEmpresa.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Empresa inserida com sucesso!\", Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n\n\n }\n });\n\n }", "public void insertUser() {}", "private void registToWX() {\n }", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "@Override\n public void registrarMiembro(UsuarioDTO miembroDTO) {\n if (usuarioDAO.buscar(miembroDTO.getLogin()) != null) {\n throw new ExcepcionUsuarioYaExistente(\"Error: El usuario ya existe\");\n }\n\n Miembro miembro = new Miembro(miembroDTO.getLogin(), miembroDTO.getNombre(), miembroDTO.getClave(), miembroDTO.getUbicacion(), miembroDTO.getBiografia());\n\n if (miembroDTO.getAvatar() != null) {\n miembro.setAvatar(miembroDTO.getAvatar());\n\n } else {\n try {\n ClassPathResource backImgFile = new ClassPathResource(\"image/generic-avatar.jpg\");\n byte[] arrayPic = new byte[(int) backImgFile.contentLength()];\n backImgFile.getInputStream().read(arrayPic);\n miembro.setAvatar(arrayPic);\n\n } catch (IOException ex) {\n throw new ExcepcionErrorInterno(\"Error: No se pudo crear el miembro\");\n }\n }\n\n usuarioDAO.crear(miembro);\n }", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void premutoRegistrati()\n\t{\n\t\tnew _FINITO_funzione_registrazioneGUI();\n\t}", "private static void registrarAuditoriaDetallesTarjetaCredito(Connexion connexion,TarjetaCredito tarjetacredito)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_empresa().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_sucursal().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_sucursal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDSUCURSAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcodigo().equals(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre_corto().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre_corto() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRECORTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_valido().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_valido().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOVALIDO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_tarjeta().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_tarjeta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOTARJETA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getinteres().equals(tarjetacredito.getTarjetaCreditoOriginal().getinteres()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getinteres().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getinteres().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.INTERES,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getmonto_minimo().equals(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getmonto_minimo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.MONTOMINIMO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getporcentaje_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getporcentaje_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.PORCENTAJERETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISIONRETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_retencion_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_retencion_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESRETENCIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_pago_banco_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_pago_banco_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESPAGOBANCOREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_comision_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_comision_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESCOMISIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion_iva().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion_iva().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCIONIVA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLECOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_pago_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_pago_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULAPAGOBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_diferencia().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_diferencia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLEDIFERENCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULARETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULACOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public abstract void registrarSubproducto(EntityManager sesion, Subproducto subproducto);", "@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }", "public static boolean registrazione(Studente s) {\n\t\tif(s.getUsername()==null || s.getNome()==null || s.getEmail()==null || s.getCognome()==null || \n\t\t\t\ts.getPassword()==null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tString passwordCriptata = PasswordUtils.generateSecurePassword(s.getPassword());\n\t\t\ts.setPassword(passwordCriptata);\n\t\t\tStudenteDao dao = new StudenteDao();\n\t\t\tif(dao.add(s)) {\n\t\t\t\tdao.close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t}", "public void salir() {\n LoginManager.getInstance().logOut();\n irInicio();\n }", "private void register(String username, String password) {\n User u = null;\n try {\n u = userDao.loadByLogin(username, password);\n } catch (Exception ignored) {}\n if (u == null) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"tmp_username\", username);\n editor.putString(\"tmp_password\", password);\n editor.commit();\n Intent intent = new Intent(LoginActivity.this, InfoActivity.class);\n startActivity(intent);\n } else {\n try {\n Toast.makeText(getApplicationContext(), \"Register Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Register Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }\n }" ]
[ "0.75047606", "0.75047606", "0.7478363", "0.7099605", "0.70530057", "0.7002773", "0.6818976", "0.67925245", "0.6626938", "0.6596471", "0.65878624", "0.65567434", "0.65547144", "0.65224165", "0.6506305", "0.6502049", "0.6497018", "0.6487037", "0.64670324", "0.6453548", "0.6430492", "0.6430298", "0.6428101", "0.64016974", "0.6382823", "0.63802105", "0.6371625", "0.6360599", "0.63565296", "0.634226", "0.6342051", "0.6330124", "0.63235563", "0.6318114", "0.6314049", "0.63067335", "0.62750983", "0.626539", "0.6263938", "0.6257682", "0.62426287", "0.62401634", "0.6226333", "0.6217965", "0.62107694", "0.62104285", "0.6197863", "0.61658174", "0.61639965", "0.61503094", "0.614628", "0.6137544", "0.613629", "0.61330986", "0.61125594", "0.61095345", "0.61072457", "0.61037284", "0.60915226", "0.60905457", "0.6086927", "0.6078769", "0.60765135", "0.60746914", "0.6068104", "0.606436", "0.6063481", "0.60631686", "0.60607135", "0.606012", "0.6055969", "0.6050057", "0.6047339", "0.6043593", "0.60414493", "0.6041019", "0.60388094", "0.6038251", "0.60329676", "0.6031912", "0.60314125", "0.6029318", "0.60279745", "0.60229796", "0.60207266", "0.6019473", "0.60085213", "0.6007563", "0.60074806", "0.5990776", "0.59906507", "0.5982181", "0.59768206", "0.59759825", "0.59730864", "0.5970505", "0.5969101", "0.5955603", "0.5952413", "0.5943434", "0.59433186" ]
0.0
-1
VARIAVEL CAMINHO IMAGEM CRIADA PARA GRAVAR E CARREGAR NA HORA DE PROCURAR OBRA
public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor, JComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT, JComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial, JTextField nomeArtista, JTextField nomeObra, JTextField txtNovaObra, JFormattedTextField dataAquisicao, JEditorPane descricaoObra, JLabel msgGravar, JLabel msgVazio, JFormattedTextField txtValor, JButton btnPesqArtist, JButton btnNovoArtista, JButton btnEditarArtista, JButton btnNovaCategoria, JButton btnEditarCategoria, JButton btnNovoMaterial, JButton btnEditarMaterial, JButton btnNovoSetor, JButton btnEditarSetor, JButton btnNovoSetorT, JButton btnEditarSetorT, JTextField idObra, JButton btnGravar) { this.frmAcervo = frmAcervo; this.btnGravar = btnGravar; this.idObra = idObra; this.obras = new ArrayList<ObraMdl>(); this.imagem = imagem; this.lblValor = lblValor; this.nomeArtista = nomeArtista; this.txtNovaObra = txtNovaObra; this.lblStatus = lblStatus; this.nomeObra = nomeObra; this.dataAquisicao = dataAquisicao; this.edtDescricao = descricaoObra; this.cbMaterial = cbMaterial; this.cbObras = cbObras; this.cbCategoria = cbCategoria; this.cbSetor = cbSetor; this.cbSetorT = cbSetorT; this.cbStatus = cbStatus; this.cbStatusT = cbStatusT; this.btnPesqArtist = btnPesqArtist; this.btnNovoArtista = btnNovoArtista; this.btnEditarArtista = btnEditarArtista; this.btnNovaCategoria = btnNovaCategoria; this.btnEditarCategoria = btnEditarCategoria; this.btnNovoMaterial = btnNovoMaterial; this.btnEditarMaterial = btnEditarMaterial; this.btnNovoSetor = btnNovoSetor; this.btnEditarSetor = btnEditarSetor; this.btnNovoSetorT = btnNovoSetorT; this.btnEditarSetorT = btnEditarSetorT; this.txtValor = txtValor; this.msgGravar = msgGravar; this.msgVazio = msgVazio; this.caminhoImagem = ""; lerAcervo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "public Coloca_imagen(){\n \n \n }", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "@Override\n public String GetImagePart() {\n return \"coal\";\n }", "public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }", "public void copiaImg() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString tipo = caminhoImagem.replaceAll(\".*\\\\.\", \"\");\r\n\t\t\tSystem.out.println(tipo);\r\n\t\t\tString l = caminhoImagem;\r\n\t\t\tString i = \"../MASProject/imagens/\" + idObra.getText() + \".\" + tipo;\r\n\t\t\tcaminhoImagem = i;\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileInputStream fisDe = new FileInputStream(l);\r\n\t\t\t@SuppressWarnings(\"resource\")\r\n\t\t\tFileOutputStream fisPara = new FileOutputStream(i);\r\n\t\t\tFileChannel fcPara = fisDe.getChannel();\r\n\t\t\tFileChannel fcDe = fisPara.getChannel();\r\n\t\t\tif (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) {\r\n\t\t\t\tfcPara.close();\r\n\t\t\t\tfcDe.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t}\r\n\t}", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "private void pintarMesa() {\n try {\n mesa = ImageIO.read(new File(\"src/imagenes/Mesa.jpg\")).getScaledInstance(1600, 1300, Image.SCALE_SMOOTH);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Image getCorazon ( ) {\n\t\tswitch ( vida ) {\n\t\tcase 0 :\n\t\t\treturn sinVida;\n\t\tcase 1:\n\t\t\treturn cuartoDeVida;\n\t\tcase 2:\n\t\t\treturn mitadVida;\n\t\tcase 3:\n\t\t\treturn tresCuartos;\n\t\tcase 4:\n\t\t\treturn fullVida;\n\t\tdefault:\n\t\t\treturn sinVida;\n\t\t}\n\t}", "@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}", "public Image meurt() {\n\t\t\tString str;//va contenir le nom de l'image\n\t\t\tImageIcon ico;//nom de la nouvelle instance de la methode ImageIcon\n\t\t\tImage img;//va etre egale a ico, et va retourner l'image voulu\n\t\t\t\n\t\t\tstr = \"/images/bouleDeFeu.png\";\n\t\t\tthis.compteurMort++;//on incremente un compteur\n\t\t\tif(this.compteurMort > 100) {//si le compteur arrive jusqu'a 100, mario meurt, \n\t\t\t\tstr = \"/images/mortDEMario.png\";//donc on change d'image\n\t\t\t\tthis.setY(this.getY() - 1);//fait monter l'image de la mort de mario vers le ciel\n\t\t\t}\n\t\t\tico = new ImageIcon(getClass().getResource(str));\n\t\t\timg = ico.getImage();\n\t\t\treturn img;\n\t\t}", "public void ocultarMensaje(String msje, String fo, String nueFo){\n String mensaje, binario;\n Color color;\n int r,g,b;\n try{\n mensaje = lecturaArchivo(msje);\n binario = preparaMensaje(mensaje);\n BufferedImage image = sacaFoto(fo);\n int k = 0;\n for(int i = 0; i < image.getHeight(); i++)\n for(int j = 0; j < image.getWidth(); j++){\n color = new Color(image.getRGB(j, i));\n if(k <= binario.length()){\n String red = toBinary((byte) color.getRed());\n String green = toBinary((byte) color.getGreen());\n String blue = toBinary((byte) color.getBlue());\n red = reemplazarLSB(red, binario);\n green = reemplazarLSB(green, binario);\n blue = reemplazarLSB(blue, binario);\n r = Integer.parseInt(red ,2);\n g = Integer.parseInt(green ,2);\n b = Integer.parseInt(blue ,2);\n }else{\n r = color.getRed();\n g = color.getGreen();\n b = color.getBlue();\n }\n image.setRGB(j, i, new Color(r,g,b).getRGB());\n k+=3;\n }\n File output = new File(nueFo);\n ImageIO.write(image, \"png\", output);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la escritura de la imagen\");\n System.exit(1);\n }\n }", "private void resampleAbdomenVOI() {\r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), 0 ) );\r\n }\r\n }", "public ColorImage getImagem(){\n\t\treturn copiaFoto(this.fotografia);\n\t}", "@Override\n\t\tpublic Image marche(String nom, int frequence) {\n\t\t\t\n\t\t\tString str;\n\t\t\tImageIcon ico;\n\t\t\tImage img;\n\t\t\t\n\t\t\tif(this.marche == false || Main.level.getxPos() <= 0 || Main.level.getxPos() > 4430) {//si le personnage est arreter ou completement a gauche\n\t\t\t\tif(this.versDroite == true) {//si vers la droite image de droite\n\t\t\t\t\tstr = \"/images/\" + nom + \"ArretDroite.png\";\n\t\t\t\t}else {str = \"/images/\" + nom + \"ArretGauche.png\";}//si non image de gauche\n\t\t\t}else {//ou le personnage se deplace, on incremente donc le compteur a chaque fois que la scene est redessiné\n\t\t\t\tthis.compteur++;\n\t\t\t\tif(this.compteur / frequence == 0) {//si compteur/par frequence est = a 0 c'est que le personnage est a l'arret donc:\n\t\t\t\t\tif(this.versDroite == true) {str = \"/images/\" + nom + \"ArretDroite.png\";\n\t\t\t\t\t}else {str = \"/images/\" + nom + \"ArretGauche.png\";}\n\t\t\t\t}else {\t//si non c'est que le personnage se deplace:\n\t\t\t\t\tif(this.versDroite == true) {str = \"/images/\" + nom + \"MarcheDroite.png\";\n\t\t\t\t\t}else {str = \"/images/\" + nom + \"MarcheGauche.png\";}\n\t\t\t\t}\n\t\t\t\tif(this.compteur == 2 * frequence) {this.compteur = 0;}//si compteur est = a 2fois la frequence ont remet le compteur a zero\t\n\t\t\t}\n\t\t\t//affichage de l'image du personnage\n\t\t\tico = new ImageIcon(getClass().getResource(str));//TROUVER LE PROBLEME LIÉ A CETTE LIGNE.....\n\t\t\timg = ico.getImage();\n\t\t\treturn img;\t\n\t\t\t\t\t\n\t\t}", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "public void pintaFecha(){\n \tImage image;\r\n \ttry {\r\n\t \r\n \t\tString imageUrl = PropiedadesJLet.getInstance().getProperty(\"path.img.logoinvoice\") + \"FondoLeppardPico1.png\";\r\n\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 725);\r\n\t\t image.scaleAbsolute(50,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n \r\n\t\t\tFRAparen.absTextBoldColor(writer,\"Fecha \",inmargde,730,10,new BaseColor(255,255,255));\r\n\t\t\tFRAparen.absText(writer,FRAparen.fechaNormal(fhfactur),inmargde + 45,730,10);\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 700);\r\n\t\t image.scaleAbsolute(100,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n\t\t\t\r\n\t\t\tif (cabecNFC.equals(\"COND\") || cabecNFC.equals(\"R\")){\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t} else {\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,\"NFC \"+ cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t}\r\n\t\t\t\r\n \t} catch (Exception e) {\r\n \t\tSystem.err.println(this.getClass().getName() +\" ERROR pintaFecha() - \"+ e.getMessage());\r\n \t}\r\n \t\r\n }", "public void montarTela(){\n ControllerListener listener = new BaseControllerListener(){\n @Override\n public void onFinalImageSet(String id, Object imageInfo, Animatable animatable) {\n super.onFinalImageSet(id, imageInfo, animatable);\n }\n\n @Override\n public void onFailure(String id, Throwable throwable) {\n super.onFailure(id, throwable);\n }\n\n @Override\n public void onIntermediateImageFailed(String id, Throwable throwable) {\n super.onIntermediateImageFailed(id, throwable);\n }\n\n @Override\n public void onIntermediateImageSet(String id, Object imageInfo) {\n super.onIntermediateImageSet(id, imageInfo);\n }\n\n @Override\n public void onRelease(String id) {\n super.onRelease(id);\n }\n\n @Override\n public void onSubmit(String id, Object callerContext) {\n super.onSubmit(id, callerContext);\n }\n };\n\n String urlImagem = DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\");\n\n Uri uri = null;\n DraweeController dc = null;\n\n if(urlImagem.contains(\"https\")){\n uri = Uri.parse(DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n } else {\n uri = Uri.parse(\"https://tocaredev.azurewebsites.net\"+DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n }\n ivFotoPerfil.setController(dc);\n\n tvUsername.setText(DetalhesPaciente.paciente.getNome() + \" \" + DetalhesPaciente.paciente.getSobrenome());\n\n int idade = Util.retornaIdade(DetalhesPaciente.paciente.getDataNascimento());\n\n tvDataNascimento.setText(DetalhesPaciente.paciente.getDataNascimento() + \" (\" + idade + \")\");\n \n etAnamnese.setText(DetalhesPaciente.paciente.getProntuario().getAnamnese());\n etExameFisico.setText(DetalhesPaciente.paciente.getProntuario().getExameFisico());\n etPlanoTerapeutico.setText(DetalhesPaciente.paciente.getProntuario().getPlanoTerapeutico());\n etHipoteseDiagnostica.setText(DetalhesPaciente.paciente.getProntuario().getHipoteseDiagnostica());\n \n }", "public static int carregaImagem(int iCodigo, GL10 vrOpenGL)\n\t{\n\t\t//Verifica se lista ja foi criada\n\t\tif (vetListaTexturas == null)\n\t\t{\n\t\t\tvetListaTexturas = new ArrayList<CDadosTextura>();\n\t\t}\n\t\t\n\t\t//Verifica se a textura ja foi carregada\n\t\tfor (int iIndex=0; iIndex < vetListaTexturas.size(); iIndex++)\n\t\t{\n\t\t\tif (iCodigo == vetListaTexturas.get(iIndex).iReferencia)\n\t\t\t{\n\t\t\t\treturn vetListaTexturas.get(iIndex).iCodTextura;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Passo 1 - carrega a textura\n\t\tint[] vetTexturas = new int[1];\n\t\tBitmap vrImagem = BitmapFactory.decodeResource(CGerenteGrafico.vrActivity.getResources(), iCodigo);\n\t\t\t\t\n\t\t//Passo 2 - define o codigo para a textura\n\t\tvrOpenGL.glGenTextures(1, vetTexturas, 0);\n\t\t\t\t\n\t\t//Passo 3 - Carrega a imagem na area de memoria da VRAM representada pelo codigo da textura gerado previamente\n\t\tvrOpenGL.glBindTexture(GL10.GL_TEXTURE_2D, vetTexturas[0]);\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, vrImagem, 0);\t\t\t\n\t\t\t\t\n\t\t//Passo4 - Define os filtros de textura\n\t\tvrOpenGL.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\tvrOpenGL.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);\n\t\t\t\t\t\t\t\t\t\n\t\t//Passo 5 - Sai do modo textura e libera a imagem do Bitmap na RAM\n\t\tvrOpenGL.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\tvrImagem.recycle();\n\t\t\n\t\t//Adiciona nova textura na lista\n\t\tvetListaTexturas.add(new CDadosTextura(iCodigo, vetTexturas[0]));\n\t\t\n\t\treturn vetTexturas[0];\n\t}", "public void Func_imagefile(){\n\n\t\tswf_env.containImg = true;\n\n\n\t\tthis.value = new SWFValue(\"Func\");\n\n\t\tString path = this.getAtt(\"path\", \".\");\n\t\tString filename = this.getAtt(\"default\");\n\t\tString type = \"auto\";\n\t\tvalue.instanceName = \"img\"+ Integer.toString(swf_env.instanceID);\n\t\tvalue.data = \"\";\n\t\tvalue.imgpath = path + \"/\" + filename;\n\t\tvalue.inter_imgpath = path + \"/\" + filename;\n\t\tvalue.inter_name = \"intimg\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.tmp = \"tmp\" + Integer.toString(swf_env.interactionImgNUM);\n\t\tvalue.lnum = Integer.toString(swf_env.visibleflag_counter);\n\n\n\t\tif(!path.startsWith(\"/\")) {\n\t\t\tString basedir = GlobalEnv.getBaseDir();\n\t\t\tLog.out(\"basedir= \" +basedir);\n\t\t\tif(basedir != null && basedir != \"\") {\n\t\t\t\tpath = basedir + path;\n\t\t\t}\n\t\t}\n\n\t\tString filepath = path + \"/\" + filename;\n\n\n\t\tsetDecoration1();\n\t\tvalue.margin = margin;\n\n\n\t\tSystem.out.println(\"filepath = \"+filepath);\n\t\tint img = swf_env.open_image_file(type, filepath);\n\t\tvalue.img = img;\n\n\t\tdata_width = swf_env.get_value(\"imagewidth\", img);\n\t\tdata_height = swf_env.get_value(\"imageheight\", img);\n\t\tSystem.out.println(\"imagesize: \"+data_width+\" \"+data_height);\n\t\twidth = data_width + margin * 2;\n\t\theight = data_height + margin * 2;\n\n\n\t\tsetDecoration2();\n\n\t\tif(data_width > width){\n\t\t\tint original_width = data_width;\n\t\t\tdata_width = width - margin * 2;\n\t\t\tint scale = data_width / original_width;\n\t\t\tdata_height = data_height * scale;\n\t\t\theight = data_height + margin * 2;\n\t\t}\n\t\tif(data_height > height){\n\t\t\tint original_height = data_height;\n\t\t\tdata_height = height - margin * 2;\n\t\t\tint scale = data_height / original_height;\n\t\t\tdata_width = data_width * scale;\n\t\t\twidth = data_width + margin * 2;\n\t\t}\n\n\t\tvalue.data_width = data_width;\n\t\tvalue.data_height = data_height;\n\t\tvalue.width = width;\n\t\tvalue.height = height;\n\t\t//morya wrote\n\t\tvalue.int_w = width;\n\t\tvalue.int_h = height;\n\n\n\t\tsetDecoration3();\n\n\t\tswf_env.tmp_width = width;\n\t\tswf_env.tmp_height = height;\n\n\n\t\tswf_env.instanceID++;\n\n\t}", "public Image getThree();", "public static BufferedImage filtroGris1(String nameFile) throws IOException{\n cargarImagen(nameFile);\n int [] pixel = null;\n int gris;\n for (int i = 0; i < altoImg; i++) {\n for (int j = 0; j < anchoImg; j++) {\n pixel = rasterImg.getPixel(j, i, pixel);\n gris = rasterImg.getSample(j, i, 0) // rojo\n + rasterImg.getSample(j, i, 1) // Verde\n + rasterImg.getSample(j, i, 2); // Azul\n gris = gris / 3;\n dstImg.setSample(j, i, 0, gris); // Rojo\n dstImg.setSample(j, i, 1, gris); // Verde\n dstImg.setSample(j, i, 2, gris); // Azul\n }\n }\n buffImg.setData(dstImg);\n return buffImg;\n }", "private void pruebaGuardado() {\n try {\n BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2d = img.createGraphics();\n g2d.setColor(Color.RED);\n g2d.fillRect(25, 25, 50, 50);\n g2d.dispose();\n ImageIO.write(img, \"JPEG\", new File(\"D:\\\\LeapMotion\\\\foo.jpg\"));\n } catch (IOException ex) {\n Logger.getLogger(Nodo.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "private void initAreaImageFilm() {\n\n }", "private BufferedImage sacaFoto(String fo){\n File input = null;\n BufferedImage image = null;\n try{\n input = new File(fo);\n image = ImageIO.read(input);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la lectura de la imagen\");\n System.exit(1);\n }\n return image;\n }", "public void atualizaJogo() {\n\t\t \t int[][] tabuleiro = new int[4][4];\n\t\t \t tabuleiro = jogo.getTabuleiro();\n\t\t \t \n\t\t \t for(int i = 0; i < 4; i++) {\n\t\t \t\t\tfor(int j = 0; j < 4; j++) {\n\t\t \t\t\t\tif(tabuleiro[i][j] == 0) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/0.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 4) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/4.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 8) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/8.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 16) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/16.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 32) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/32.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 64) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/64.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 128) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/128.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 256) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/256.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 512) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/512.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 1024) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/1024.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2048) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2048.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t }", "private static RenderedImage createImage(RegionReport rr) {\n BufferedImage bufferedImage = new BufferedImage(MAP_SIZE, MAP_SIZE,\n BufferedImage.TYPE_INT_RGB) ;\n // Create a graphics contents on the buffered image\n Graphics2D g2d = bufferedImage.createGraphics() ;\n g2d.setColor(Color.black);\n //TODO need to set default overflow to something other than black,\n // or set this default background to something else. colors colors colors.\n g2d.fillRect(0, 0, MAP_SIZE, MAP_SIZE);\n\n // SL coordinates work like math x/y graph\n // Java coordinates start at top left. Rotate 90 degrees\n // counterclockwise to compensate.\n AffineTransform at = new AffineTransform();\n at.concatenate(AffineTransform.getRotateInstance(CCW_90, MAP_SIZE/2.0, MAP_SIZE/2.0));\n at.scale(SCALE, SCALE);\n g2d.transform(at) ;\n \n String s = rr.getSubParcels() ;\n\n// \tGerstle\n// s = \"192,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,4,14,5,2,1,16,2,16,3,16,1,14,5,2,1,16,2,16,3,16,1,14,5,2,1,16,2,16,3,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,5,2,1,16,2,16,10,4,6,4,7,4,8,4,9,14,7,2,1,16,2,16,10,16,1,14,7,2,1,16,2,16,10,16,1,14,7,2,1,16,2,16,10,16,1,14,7,2,1,16,2,16,10,8,7,4,11,4,12,14,7,2,1,16,2,16,10,8,7,4,11,4,12,14,7,2,1,16,2,16,10,8,7,4,11,4,12,14,7,2,1,16,13,16,10,8,7,4,11,4,12,14,7,2,1,16,13,16,10,8,7,4,11,4,12,14,7,2,1,16,13,24,7,4,11,4,12,14,7,2,1,16,13,24,7,4,11,4,12,14,7,2,1,16,13,24,7,4,11,4,12,14,7,2,1,16,13,16,7,16,1,14,7,2,1,16,13,16,7,16,1,14,7,2,1,16,13,16,7,16,1,14,7,2,1,23,13,1,14,38,7,2,1,24,13,38,7,2,1,24,13,38,7,2,1,24,13,38,7,2,1,24,13,38,7,2,1,24,13,38,7,2,1,24,13,38,7,2,1,21,15,3,13,38,7,2,1,21,15,6,13,5,7,16,1,14,7,2,1,21,15,6,13,5,7,16,1,14,7,2,1,21,15,6,13,5,7,16,1,14,7,2,1,21,15,6,13,35,7,2,1,21,15,7,13,34,7,2,1,21,15,7,13,34,7,2,1,21,15,9,13,32,7,2,1,21,15,9,13,32,7,2,1,21,15,11,13,30,7,2,1,21,15,11,13,30,7,2,1,21,15,11,13,30,7,2,1,21,15,11,13,16,1,14,7,2,1,21,15,11,13,16,1,14,7,2,1,21,15,11,13,16,1,14,7,2,1,21,15,11,13,16,1,14,7,2,1,21,15,11,13,16,1,14,7,2,1,\" ;\n// // Palomarian\n// String s = \"8,1,4,2,4,3,11,4,20,5,17,4,8,1,4,2,4,3,12,4,19,5,17,4,8,1,4,2,4,3,13,4,18,5,17,4,8,1,4,2,4,3,14,4,17,5,17,4,8,1,4,2,4,3,14,4,17,5,17,4,8,1,4,2,4,3,15,4,16,5,17,4,8,1,4,2,4,3,16,4,15,5,11,4,2,6,4,4,8,1,4,2,4,3,16,4,15,5,11,4,2,6,4,4,4,5,4,7,8,8,17,4,16,5,9,4,2,6,4,4,4,5,4,7,8,8,18,4,16,5,8,4,2,6,4,4,4,5,4,7,8,8,22,4,14,5,6,4,2,6,4,4,4,5,4,7,8,8,25,4,12,5,5,4,2,6,4,4,4,5,4,7,8,8,30,4,9,5,3,9,2,6,4,4,4,5,4,7,8,8,31,4,9,5,2,9,2,6,8,5,4,7,8,8,32,4,9,5,1,9,2,6,8,5,4,7,8,8,34,4,8,5,2,6,4,5,17,8,35,4,12,5,17,8,35,4,12,5,17,8,37,4,10,5,17,8,37,4,10,5,17,8,37,4,10,5,17,8,38,4,9,5,17,8,38,4,9,5,18,8,36,4,10,5,18,8,35,4,11,5,18,8,34,4,12,5,18,8,33,4,13,5,18,8,32,4,14,5,18,8,32,4,8,5,6,4,18,8,30,4,9,5,7,4,18,8,30,4,8,5,8,4,18,8,30,4,7,5,9,4,12,5,36,4,7,5,9,4,12,5,36,4,6,5,10,4,12,5,35,4,6,5,11,4,12,5,35,4,5,5,12,4,12,5,34,4,5,5,13,4,14,5,31,4,6,5,13,4,6,10,9,5,30,4,5,5,14,4,6,10,11,5,27,4,5,5,15,4,6,10,4,4,8,5,25,4,5,5,16,4,6,10,6,4,8,5,2,4,1,5,20,4,5,5,16,4,6,10,8,4,12,5,16,4,6,5,16,4,6,10,8,4,12,5,15,4,7,5,16,4,6,10,8,4,15,5,12,4,7,5,16,4,6,10,10,4,16,5,8,4,8,5,16,11,6,10,10,4,18,5,5,4,9,5,16,11,6,10,10,4,32,5,16,11,8,12,8,4,32,5,16,11,8,12,8,4,32,5,16,11,8,12,8,4,32,5,16,11,8,12,8,4,32,5,16,11,8,12,8,4,16,5,1,11,15,5,16,11,8,12,8,4,16,5,3,11,13,5,16,11,8,12,8,4,16,5,6,11,10,5,16,11,8,12,8,4,16,5,7,11,9,5,16,11,8,12,8,13,4,14,4,15,8,4,9,11,7,5,16,11,8,12,8,13,4,14,4,15,8,4,10,11,6,5,16,11,8,12,8,13,4,14,4,15,8,4,11,11,6,5,15,11,8,12,8,13,4,14,4,15,8,4,12,11,5,5,15,11,8,12,8,4,4,14,4,15,8,4,13,11,5,5,14,11,8,12,8,4,4,14,4,15,8,4,14,11,5,5,13,11,8,12,8,4,4,14,4,15,8,4,14,11,6,5,12,11,8,12,8,4,4,14,4,15,8,4,15,11,6,5,11,11,\" ;\n// Clementina\n// String s = \"23,1,41,2,23,1,41,2,23,1,41,2,23,1,20,2,16,1,5,2,25,1,14,2,9,1,4,3,7,1,5,2,48,1,4,3,7,1,5,2,48,1,4,3,7,1,5,2,7,1,8,4,33,1,4,3,7,1,5,2,3,5,4,1,7,5,1,4,33,1,4,3,7,1,5,2,3,5,4,1,8,5,33,1,4,3,7,1,5,2,15,5,15,1,5,2,24,1,5,2,15,5,15,1,5,2,24,1,5,2,15,5,15,1,5,2,24,1,5,2,15,5,15,1,12,6,1,7,16,1,2,7,3,2,15,5,14,1,13,6,13,7,4,1,2,7,3,2,15,5,3,1,24,6,19,7,3,2,15,5,3,1,24,6,19,7,3,2,15,5,3,1,24,6,19,7,3,2,15,5,3,1,10,6,3,4,10,6,20,7,3,2,7,5,8,8,7,9,6,6,4,4,9,6,20,7,3,2,7,5,8,8,7,9,6,6,4,4,9,6,20,7,3,2,7,5,8,8,7,9,6,6,3,4,1,10,9,6,20,7,3,2,1,11,6,5,8,8,7,9,6,6,4,4,9,6,20,7,3,2,7,11,8,8,7,9,6,6,9,4,24,7,3,2,7,11,8,8,7,1,6,6,10,4,23,7,3,2,7,11,12,8,3,1,6,6,5,12,5,4,22,7,3,2,1,1,7,11,16,8,5,6,5,12,4,4,7,13,15,7,4,2,1,1,7,11,8,8,6,5,1,14,6,6,3,12,6,4,7,13,14,7,5,2,1,1,1,11,5,9,1,11,8,8,2,5,5,14,6,6,3,12,6,4,7,13,14,7,5,2,1,1,1,11,6,9,8,8,2,5,5,14,6,6,3,12,6,4,7,13,13,7,1,1,5,2,1,1,1,11,7,9,7,8,7,5,6,6,4,1,5,4,18,15,3,7,5,2,1,1,1,11,7,9,7,8,7,5,6,6,27,15,3,7,5,2,1,1,8,9,7,8,7,5,6,6,27,15,3,7,3,2,3,1,9,9,6,8,7,5,6,6,27,15,3,7,3,2,3,1,9,9,6,8,7,5,6,6,27,15,3,7,2,2,1,16,2,17,1,1,9,9,5,8,8,5,4,6,2,4,13,15,7,7,7,15,3,7,2,2,3,17,1,1,9,9,5,8,8,5,4,6,2,4,13,15,17,7,2,2,4,1,11,9,3,8,8,5,6,2,13,15,17,7,2,2,3,15,1,1,11,9,3,8,1,5,22,8,2,15,2,2,17,7,2,2,3,15,1,1,11,9,3,8,1,5,22,8,2,15,2,2,17,7,2,2,3,15,1,1,11,9,26,8,2,15,2,2,17,7,2,2,3,15,1,1,11,9,26,8,2,2,16,18,3,7,2,2,4,1,11,9,26,8,2,2,16,18,3,7,3,2,3,1,11,9,26,8,2,2,16,18,3,7,3,2,3,1,11,9,26,8,2,2,16,18,3,7,3,2,3,1,15,9,22,8,2,2,16,18,3,7,3,2,3,1,15,9,22,8,5,2,13,18,3,7,3,2,3,1,15,9,22,8,9,2,12,18,3,2,3,1,15,9,22,8,9,2,12,18,3,2,16,1,2,9,22,8,9,2,12,18,3,2,16,1,2,9,22,8,9,2,12,18,5,2,16,1,22,8,5,2,5,19,11,18,5,2,16,1,22,8,5,2,14,19,1,1,6,2,16,1,22,8,5,2,13,19,2,1,6,2,14,1,8,20,15,8,6,2,12,19,3,1,6,2,12,1,10,20,4,21,5,19,7,22,3,19,8,2,6,19,1,1,8,2,11,1,11,20,4,21,5,19,7,22,3,19,8,2,5,19,2,1,8,2,11,1,11,20,4,21,5,19,7,22,3,19,8,2,5,19,2,1,8,2,11,1,11,20,4,21,15,19,8,2,6,19,9,2,1,23,10,1,11,20,4,21,15,19,8,2,5,19,11,2,10,1,11,20,4,21,4,19,17,2,7,19,11,2,10,1,11,20,2,21,41,2,11,1,11,20,1,21,41,2,11,1,12,21,41,2,\" ;\n// Teal 8/08\n// String s = \"19,1,42,2,3,3,19,1,42,2,3,3,31,1,33,3,31,1,33,3,31,1,33,3,31,1,33,3,31,1,33,3,26,1,5,4,33,3,26,1,5,4,23,3,4,5,6,3,26,1,5,4,19,3,8,5,6,3,26,1,5,4,19,3,8,5,6,3,18,1,4,2,4,1,5,4,21,3,12,5,18,1,4,2,4,1,5,4,22,3,11,5,18,1,4,2,4,1,5,4,22,3,11,5,14,3,7,2,17,3,8,2,7,3,11,5,14,3,7,2,17,3,8,2,7,3,11,5,14,3,7,2,17,3,8,2,7,3,11,5,14,3,7,2,17,3,8,2,7,3,11,5,14,3,4,2,20,3,8,2,7,3,11,5,13,3,1,6,4,2,20,3,8,2,7,3,11,5,12,3,6,2,22,3,12,2,12,5,12,3,6,2,22,3,12,2,12,5,12,3,5,2,23,3,12,2,12,5,12,3,5,2,10,3,3,2,10,3,12,2,12,5,12,3,5,2,10,3,3,2,10,3,12,2,1,3,11,7,12,3,5,2,10,3,3,2,10,3,12,2,1,3,11,7,12,3,5,2,10,3,3,2,10,3,12,2,12,7,9,3,8,2,10,3,3,2,13,3,9,2,12,7,9,3,8,2,10,3,3,2,13,3,9,2,12,7,9,3,3,2,15,3,3,2,13,3,9,2,12,7,9,3,3,2,15,3,3,2,13,3,9,2,12,7,9,3,3,2,15,3,3,2,13,3,9,2,12,7,10,2,13,3,5,2,15,3,9,2,3,7,2,8,7,5,10,2,13,3,5,2,15,3,9,2,3,7,2,8,7,5,10,2,13,3,5,2,14,3,1,6,9,2,12,5,10,2,13,3,5,2,13,3,2,6,9,2,12,5,10,2,13,3,5,2,13,3,2,6,9,2,12,5,10,2,13,3,5,2,13,3,2,6,9,2,12,5,10,2,13,3,5,2,10,3,14,2,12,5,10,2,12,3,5,2,11,3,14,2,12,5,22,3,5,2,11,3,14,2,12,5,22,3,5,2,11,3,14,2,12,5,22,3,5,2,11,3,5,2,7,6,14,5,22,3,5,2,4,3,12,2,7,6,14,5,22,3,5,2,4,3,12,2,7,6,14,5,22,3,21,2,7,6,14,5,22,3,21,2,7,6,14,5,22,3,18,2,11,6,13,5,22,3,18,2,15,6,9,5,22,3,16,2,17,6,9,5,22,3,16,2,17,6,9,5,22,3,16,2,17,6,9,5,22,3,16,2,17,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,16,6,9,5,22,3,17,2,6,9,8,3,11,5,22,3,17,2,6,9,8,3,11,5,22,3,17,2,6,9,9,3,10,5,22,3,17,2,7,9,8,3,10,5,22,3,17,2,7,9,8,3,10,5,\" ;\n// Sage\n// String s = \"2,1,19,2,16,3,27,4,2,1,19,2,16,3,27,4,21,2,16,3,27,4,21,2,16,3,27,4,21,2,16,3,27,4,21,2,16,3,27,4,21,2,43,4,1,1,20,2,43,4,21,2,43,4,21,2,43,4,21,2,43,4,21,2,43,4,1,2,11,5,9,2,43,4,1,2,11,5,9,2,43,4,12,5,9,2,40,4,3,6,12,5,9,2,40,4,3,6,12,5,3,2,46,4,3,6,61,4,3,6,61,4,3,6,61,4,3,6,61,4,3,6,61,4,3,6,53,4,11,6,53,4,11,6,6,7,22,4,8,8,17,4,11,6,6,7,22,4,8,8,17,4,11,6,6,7,22,4,8,8,17,4,11,6,6,7,22,4,8,8,17,4,11,6,6,7,47,4,11,6,6,7,47,4,11,6,6,7,47,4,11,6,6,7,47,4,11,6,6,7,47,4,11,6,1,4,5,7,47,4,11,6,1,4,5,7,47,4,11,6,53,4,11,6,53,4,11,6,53,4,11,6,53,4,11,6,53,4,11,6,53,4,11,6,1,9,1,4,12,10,39,4,11,6,2,9,12,10,39,4,11,6,2,9,13,10,38,4,11,6,2,9,13,10,29,4,9,9,1,3,10,6,2,9,13,10,29,4,9,9,1,3,10,6,2,9,13,10,29,4,9,9,1,3,10,6,2,9,13,10,27,4,1,11,1,4,9,9,1,3,10,6,2,9,13,10,38,9,1,3,10,6,2,9,13,10,38,9,1,3,10,6,2,9,13,10,38,9,1,3,10,6,53,9,1,3,10,6,53,9,1,3,10,6,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,55,9,9,12,\" ;\n \n java.util.StringTokenizer st = new java.util.StringTokenizer(s, \",\\r\\n \") ;\n\n int xx = 0 ;\n int yy = 0 ;\n while (st.hasMoreTokens()) {\n int count = Integer.parseInt(st.nextToken()) ;\n //BUG: should really do something more about missing element.\n if (!st.hasMoreTokens()) continue ;\n int ownerNum = Integer.parseInt(st.nextToken()) ;\n Owner owner = rr.getOwner(ownerNum) ;\n Color cc ;\n if (owner.isLinden()) {\n cc = new Color(100,100,100) ;\n }\n else {\n cc = OwnerColors.getOwnerColor(ownerNum) ; \n }\n g2d.setColor(cc) ;\n\n while (xx + count >= ROW_SIZE) {\n int finishRow = ROW_SIZE - xx ;\n \n g2d.fillRect(xx, yy, finishRow, 1) ;\n \n // trial of svg\n // <rect x=\"0\" y=\"8\" width=\"512\" height=\"8\"\n // style=\"fill:rgb(255,255,255)\"/>\n// char q = '\"' ;\n// System.out.println(\n// \"<rect x=\" + q + xx + q + \" y=\" + q + yy + q +\n// \" width=\" + q + finishRow + q + \" height=\" + q + \"1\" + q +\n// \" style=\" + q + \"fill:rgb(\" + \n// cc.getRed() + \",\" + cc.getGreen() + \",\" + cc.getBlue() \n// + \")\" + q + \"/>\") ;\n \n count -= finishRow ;\n yy++ ;\n xx = 0 ;\n }\n if (count > 0) { \n g2d.fillRect(xx, yy, count, 1) ;\n \n// char q = '\"' ;\n// System.out.println(\n// \"<rect x=\" + q + xx + q + \" y=\" + q + yy + q +\n// \" width=\" + q + count + q + \" height=\" + q + \"1\" + q +\n// \" style=\" + q + \"fill:rgb(\" + \n// cc.getRed() + \",\" + cc.getGreen() + \",\" + cc.getBlue() \n// + \")\" + q + \"/>\") ;\n\n \n xx += count ;\n }\n\n } // while more tokens \n \n // Graphics context no longer needed so dispose it\n g2d.dispose() ;\n\n return bufferedImage ;\n }", "public void ToImage(){\n\t\tint row=SL.length;\n\t\tint col=SL[0].length;\n\t\tint cr=0;\n\t\tint cb=0;\n\t\t// System.out.println(row+\" \"+col);\n\t\tint[] intArray = new int[3*row*col];\n\t\tint w=row;\n\t int h=col;\n\t BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n\t\tint pixel = 0;\n\t\tfor(int x=0;x<row;x++){\n\t\t\tfor(int y=0;y<col;y++){\n\t\t\t\tint rByte = (int)(SL[x][y]);\n\t\t int gByte = (int)(SL[x][y]);\n\t\t int bByte = (int)(SL[x][y]);\n\t\t \n\t\t // int rByte = (int)(SL[x][y]+1.402*(cr-128));\n\t\t // int gByte = (int)(SL[x][y]-0.3414*(cb-128)-0.71414*(cr-128));\n\t\t // int bByte = (int)(SL[x][y]+1.772*(cb-128));\n\t\t int rgb = (rByte *65536) + (gByte * 256) + bByte;\n\t\t image.setRGB(x,y,rgb);\n\t \t}\n\t\t}\n\t try {\n\t ImageIO.write(image, \"bmp\", new File(\"\"+picture_num+\".png\"));\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}", "public String getAnoFilmagem();", "private void guardarFoto() {\n if (foto != null && is != null) {\n\n Image foto_Nueva;\n foto_Nueva = foto.getScaledInstance(frmPersona.getLblFoto().getWidth(), frmPersona.getLblFoto().getHeight(), Image.SCALE_SMOOTH);\n frmPersona.getLblFoto().setIcon(new ImageIcon(foto_Nueva));\n cancelarFoto();\n ctrFrmPersona.pasarFoto(is);\n } else {\n JOptionPane.showMessageDialog(vtnWebCam, \"Aun no se a tomado una foto.\");\n }\n\n }", "String getImage();", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\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}\n\t\treturn image;\n\t}", "public void codifRLC()\n\t{\n\t\tList<Integer> result= new ArrayList<Integer>();\n\t\tint rgb=0;\n\t\tColor color;\n\t\tint r=0;\n\t\tint ant=-1;\n\t\tint acum=0;\n\t\tfor(int i=this.inicalto;i<=this.alto;i++) {\n\t\t\tfor(int j=this.inicancho;j<=this.ancho;j++)\n\t\t\t{\n\t\t\t\trgb = this.img.getRGB(j, i);\n\t\t\t\tcolor = new Color(rgb, true);\n\t\t\t\tr = color.getRed();\n\t\t\t\t\tif(ant==-1) {\n\t\t\t\t\t\tant=r;\n\t\t\t\t\t\tacum=1;\n\t\t\t\t\t}\n\t\t\t\t\t\tif(r==ant && acum<256)\n\t\t\t\t\t\t\tacum++;\n\t\t\t\t\t\t\tif(r!=ant){\n\t\t\t\t\t\t\t\tresult.add(ant);\n\t\t\t\t\t\t\t\tresult.add(acum);\n\t\t\t\t\t\t\t\tacum=1;\n\t\t\t\t\t\t\t\tant=r;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(acum==255){\n\t\t\t\t\t\t\t\t\tresult.add(ant);\n\t\t\t\t\t\t\t\t\tresult.add(acum);\n\t\t\t\t\t\t\t\t\tacum=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tresult.add(ant);\n\t\tresult.add(acum);\n\t\t\n\t\tthis.CR=new CabeceraRLC(this.inicancho,this.inicalto,this.ancho,this.alto,img.TYPE_INT_RGB);\n\t\tthis.codResultRLC=result;\n\t\tthis.generarArchivoRLC(result);\n\t}", "public void actualizarImagen() {\n\t\tentidadGrafica.actualizarImagen(this.valor);\n\t}", "public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn kartaPozadine;\r\n\t}", "private Texture mapaAleatorio(int noAleatorio) {\n if (estadoMapa == EstadoMapa.RURAL){\n if(noAleatorio == 1){\n return texturaFondo1_1;\n }\n if(noAleatorio == 2){\n return texturaFondo1_2;\n }\n if(noAleatorio == 3){\n return texturaFondo1_3;\n }\n if(noAleatorio == 4){\n return texturaFondo1_4;\n }\n if(noAleatorio == 5){\n return texturaFondo1_5;\n }\n } else\n if (estadoMapa == EstadoMapa.URBANO) {\n if(noAleatorio == 1){\n return texturaFondo2_1;\n }\n if(noAleatorio == 2){\n return texturaFondo2_2;\n }\n if(noAleatorio == 3){\n return texturaFondo2_3;\n }\n if(noAleatorio == 4){\n return texturaFondo2_4;\n }\n if(noAleatorio == 5){\n return texturaFondo2_5;\n }\n } else if (estadoMapa == EstadoMapa.UNIVERSIDAD) {\n if(noAleatorio == 1){\n return texturaFondo3_1;\n }\n if(noAleatorio == 2){\n return texturaFondo3_2;\n }\n if(noAleatorio == 3){\n return texturaFondo3_3;\n }\n if(noAleatorio == 4){\n return texturaFondo3_4;\n }\n if(noAleatorio == 5){\n return texturaFondo3_5;\n }\n }else if (estadoMapa == EstadoMapa.SALONES) {\n if (noAleatorio == 1) {\n return texturaFondo4_1;\n }\n if (noAleatorio == 2) {\n return texturaFondo4_2;\n }\n if (noAleatorio == 3) {\n return texturaFondo4_3;\n }\n if (noAleatorio == 4) {\n return texturaFondo4_4;\n }\n if (noAleatorio == 5) {\n return texturaFondo4_5;\n }\n } else if (estadoMapa == EstadoMapa.RURALURBANO) { //Trancisiones\n return texturaRuralUrbano;\n } else if (estadoMapa == EstadoMapa.URBANOUNIVERSIDAD) {\n return texturaUrbanoUniversidad;\n } else if (estadoMapa == EstadoMapa.UNIVERSIDADSALONES) {\n return texturaUniversidadSalones;\n }\n return null;\n }", "public int[][] RdB() {\t\t\t\t\t\t\t\t// cherche les 4 points noirs\n\t\tint[][] pixNoirs = new int[img.getWidth()*img.getHeight()][2];\n\n\t\tint i=0;\n\t\tint radius=8;\t\t\t\t\t\t\t\t\t// 19= limite de detection de checkCircle\n\t\tfor (int ty=0; ty<img.getHeight();ty++) {\n\t\t\tfor (int tx=0;tx<img.getWidth();tx++) {\n\n\t\t\t\tColor tmp=new Color(img.getRGB(tx, ty));\n\t\t\t\tif (tmp.getGreen()<20) { \t\t\t\t//si le pixel est noir\n\t\t\t\t\tif (checkCircle(tx,ty,radius) ) {\t//verifie si un cercle de radius entoure le pixel\n\t\t\t\t\t\tpixNoirs[i][0]=tx;\n\t\t\t\t\t\tpixNoirs[i][1]=ty;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"fin\");\n\t\tint tmp=1;\n\t\tint centreX[][]=new int [img.getWidth()*img.getHeight()][2];\n\t\tcentreX[0]=pixNoirs[0];\n\t\tfor (int l=0;l<img.getHeight()*img.getWidth() && (pixNoirs[l][1]!=0 || pixNoirs[l][0]!=0);l++) {\n\t\t\tif((pixNoirs[l][0]-centreX[tmp-1][0])<5 || pixNoirs[l][1]-centreX[tmp-1][1]<5 ){\t\t//x-(x-1)>5 ou y-(y-1)>5\n\t\t\t\tcentreX[tmp][0]=pixNoirs[l][0];\t\t\t//efface le precedent roar2 si il était a 1 pixel de diff\n\t\t\t\tcentreX[tmp][1]=pixNoirs[l][1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttmp++;\n\t\t\t\tcentreX[tmp]=pixNoirs[l];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//boucle de determination des points noirs\n\t\t//System.out.println(\"roar2debut\");\n\t\tint points[][]=new int [4][2];\n\t\tint centres[][]=new int [centreX.length][2]; int boucl=0; int lasti=0;\n\t\tint t=0;\n\t\tfor (int l=1;l<=img.getHeight()*img.getWidth() && (centreX[l-1][1]!=0 || centreX[l-1][0]!=0);l++) {\n\n\n\t\t\t\n\t\t\tint diffx=centreX[l][0]-centreX[l-1][0];\n\t\t\tint diffy=centreX[l][1]-centreX[l-1][1];\n\t\t\tint diff=Math.abs(diffx)+Math.abs(diffy);\n\t\t\tif (diff>img.getWidth()*0.85)\n\t\t\t{\n\t\t\t\tpoints[t]=centreX[l];\n\t\t\t\tt++;\n\t\t\t}\n\t\t\t\n\t\t\tif (diffx<10 && diffy<10) {\n\t\t\t\tboucl++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcentres[lasti][0]=centreX[l-boucl/2][0];\n\t\t\t\tcentres[lasti][1]=centreX[l-boucl/2][1];\n\t\t\t\tlasti++;boucl=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tfor (int l=0;l<=centres.length && (centres[l][1]!=0 || centres[l][0]!=0);l++) {\t\n\t\t\tboolean test=true;\n\t\t\tint maxPoint=0;\n\t\t\tfor (int li=0;li<=points.length && (points[li][1]!=0 || points[li][0]!=0);li++) {\n\t\t\t\tint diffx=\tMath.abs(centres[l][0]-points[li][0]);\n\t\t\t\tint diffy=\tMath.abs(centres[l][1]-points[li][1]);\n\t\t\t\tboolean testx=\t\tdiffx>img.getWidth()*0.85 \t|| diffx<img.getWidth()*0.2;\t//diff <0.1 ou >0.8 x la largeur de feuille\n\t\t\t\tboolean testy=\t\tdiffy>img.getHeight()*0.8 \t|| diffy<img.getWidth()*0.2;\n\t\t\t\tboolean Repeat=\tdiffx+diffy>img.getWidth()*0.2;\t //si point deja présent\n\n\t\t\t\tif (!Repeat || (!testx || !testy) )\t// si 0.2>diffx>0.8 ou \"diffy\" et \n\t\t\t\t{\n\t\t\t\t\ttest=false;\n\t\t\t\t}\n\t\t\t\tmaxPoint=li;\n\t\t\t}\n\t\t\t\n\t\t\tif(test && maxPoint<2) {\n\t\t\t\t//System.out.println(lastRoar[l][0]+\" \"+lastRoar[l][1]);\n\t\t\t\tpoints[maxPoint+1][0]=centres[l][0];\n\t\t\t\tpoints[maxPoint+1][1]=centres[l][1];\n\t\t\t}\n\t\t}\n\t\treturn points;\n\n\t}", "public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }", "public void cambiarImagenGrande(ImagenTemp it) {\n\t\t\n\t\t//TODO automatizar haciendo que el método directamente coloque la imagen escalada en el panel?\n\t\tImage imgtemp = VistaPrincipal.ponerImagenEscalada(it.getbImagen(), panelImagenGrande);\n\t\tlabelImagenGrande.setIcon(new ImageIcon(imgtemp));\n\t\tlabelImagenGrande.setBounds((int)(((float)panelImagenGrande.getWidth()/2) - ((float)imgtemp.getWidth(null))/((float)2)), (int)(((float)panelImagenGrande.getHeight()/2) - ((float)imgtemp.getHeight(null))/((float)2)),imgtemp.getWidth(null), imgtemp.getHeight(null));\n\t\t\n\t\t\n\t\t//Se rellenan los datos de la imagen seleccionada\n\t\tlabelNombre.setText(it.getNombre()+it.getExtension());\n\t\t\n\t\tLocalDate localDate = LocalDate.ofEpochDay(it.getFecha()/(1000*60*60*24));//TODO llevar esto a un método estático de VistaPrincipal si se repite\n\t\tlabelFecha.setText(localDate.getDayOfMonth() + \"/\" + localDate.getMonthValue() + \"/\" + localDate.getYear());\n\t\t\n\t\tlabelResolucion.setText(it.getbImagen().getWidth() + \" x \" + it.getbImagen().getHeight());\n\t\t\n\t\tString peso = it.getImagen().length()/1024 < 1000 ? (float)(it.getImagen().length()/1024) + \" kB\" : (int)(it.getImagen().length()/(1024*1024)) + \" MB\";\n\t\tlabelPeso.setText(peso);\n\t\t\n\t\t\n\t\t//Se rellenan las etiquetas\n\t\tpanelImagenEtiquetas.removeAll();\n\t\tfor(Etiquetas e : it.getArrayEtiquetas()) panelImagenEtiquetas.add(e);\n\t\tresultadosEste.revalidate();\n\t\tresultadosEste.repaint();\n\t\t\n\t}", "java.lang.String getImage();", "public static void main(String[] args) {\n try {\n File image = new File(\"petite_image.png\");\n ImageSerializer serializer = new ImageSerializerBase64Impl();\n\n // Sérialization\n String encodedImage = (String) serializer.serialize(image);\n System.out.println(splitDisplay(encodedImage,76));\n\n // Désérialisation\n byte[] deserializedImage = (byte[]) serializer.deserialize(encodedImage);\n\n // Vérifications\n // 1/ Automatique\n assert (Arrays.equals(deserializedImage, Files.readAllBytes(image.toPath())));\n System.out.println(\"Cette sérialisation est bien réversible :)\");\n // 2/ Manuelle\n File extractedImage = new File(\"petite_image_extraite.png\");\n new FileOutputStream(extractedImage).write(deserializedImage);\n System.out.println(\"Je peux vérifier moi-même en ouvrant mon navigateur de fichiers et en ouvrant l'image extraite dans le répertoire de ce Test\");\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void guardar() {\n\t\t//JFileChooser fglobal = principal.getFglobal();\n\t\tprincipal.getFglobal().setDialogTitle(ic.buscar(38)); // Tag 38\n\n\t\t\tprincipal.getFglobal().setDialogType(JFileChooser.SAVE_DIALOG);\n\n\t\tAccesorio pep = new Accesorio(principal.getFglobal(),t, principal.getIC());\n\t\tprincipal.getFglobal().setAccessory(pep);\n\t\tpep.setProfundidad(true);\n\t\t\n principal.getFglobal().resetChoosableFileFilters();\n \n ExampleFileFilter filtroT = new ExampleFileFilter (\n new String [] {\"tiff\",\n \"tif\",\n },\n ic.buscar(3)); // Tag 3\n \n\n \n\t\t\t\n ExampleFileFilter filtroJ = new ExampleFileFilter (\n new String [] {\"jpeg\",\n \"jpg\"\n },\n ic.buscar(4)); // Tag 4\n principal.getFglobal().addChoosableFileFilter(filtroT);\n principal.getFglobal().addChoosableFileFilter(filtroJ);\n\t\t\n\t\t\n\t\t\n\t\tint retval = principal.getFglobal().showDialog(t, null);\n\t\tif (retval == JFileChooser.APPROVE_OPTION) \n\t\t{\t\t\n\t\t\tFile guardar = principal.getFglobal().getSelectedFile();\n \n\t\t\tif (\tprincipal.getFglobal().getFileFilter().getDescription().equals(filtroJ.getDescription()) )\n\t\t\t{// Guardar como JPEG\n \n\t\t\t\tJAI.create(\"filestore\",imagen_original,guardar.getPath(),\"JPEG\", new JPEGEncodeParam());\n\t\t\t}\n\t\t\telse if (principal.getFglobal().getFileFilter().getDescription().equals(filtroT.getDescription()))\n\t\t\t{// Guardar como TIFF\n\t\t\t\tint profundidad = pep.getEP().getMarcada();\n\t\t\t\t// Cubre todas las posibilidades (¿esto guarda los metadatos?)\n\t\t\t\tTiledImage tiled = null;\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\ttiled = \n ElegirProfundidad.crearProfundidadReducida(\n ipixel_o, \n profundidad, \n imagen_original.getWidth(), \n imagen_original.getHeight());\n\t\t\t\t}\n\n\t\t\t\t//imgGuardar = djai.getSource();\n\t\t\t\tParameterBlock pb = new ParameterBlock();\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(tiled);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(imagen_original);\n\t\t\t\t}\n\t\t\t\tpb.add(guardar);\n\t\t\t\tpb.add(\"TIFF\");\n\t\t\t\tpb.add(false); //UseProperties\n\t\t\t\tpb.add(false); //Transcode\n\t\t\t\tpb.add(true); //VerifyOutput\n\t\t\t\tpb.add(false); //AllowPixelReplacement\n\t\t\t\tpb.add(null); //TileSize\n\t\t\t\tpb.add(streamData);\n\t\t\t\tpb.add(imageData);\n\t \t\t\tJAI.create(\"imagewrite\", pb);\n\t\t\t\t\n\t\t\t\t//JAI.create(\"imagewrite\",tiled,guardar.getPath(),\"TIFF\");\n\t\t\t}\n\t\t\telse\n\t\t\t{// No tiene extensión o es una extensión extraña\n\t\t\t\tJAI.create(\"imagewrite\",imagen_original,guardar.getPath()+\".tif\",\"TIFF\");\n\t\t\t}\n\t\t\t\n\t\t}\t\t\t \n\t\telse \n\t\t{\n\t\t\tdibujarMensajesError(retval);\n\t\t} \n\t\t\n\t\t\n\t}", "int getExpoBracketingNImagesPref();", "private void aumentarPilha() {\n this.pilhaMovimentos++;\n }", "public static BufferedImage filtroGrisBrillo(String nameFile) throws IOException{\n cargarImagen(nameFile);\n int [] pixel = null;\n int max, min;\n int gris;\n for (int i = 0; i < altoImg; i++) {\n for (int j = 0; j < anchoImg; j++) {\n pixel = rasterImg.getPixel(j, i, pixel);\n max = pixel[0] > pixel[1] ? pixel[0] : pixel[1];\n min = pixel[1] < pixel[0] ? pixel[1] : pixel[0]; \n max = max > pixel[2] ? max : pixel[2];\n min = min < pixel[2] ? min : pixel[2];\n gris = (max+min)/2;\n dstImg.setSample(j, i, 0, gris); // Rojo\n dstImg.setSample(j, i, 1, gris); // Verde\n dstImg.setSample(j, i, 2, gris); // Azul\n }\n }\n buffImg.setData(dstImg);\n return buffImg;\n }", "Imagem getImagem();", "private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }", "public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public BufferedImage ROI(BufferedImage timg) {\n\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n int[][][] ImageArray = convertToArray(timg);\n int[][][] ImageArray1 = convertToArray(timg);\n int[][][] ImageArray3 = convertToArray(timg);\n // for region ogf interest 100 - 200 y-axis and 100 - 200 x -axis\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n ImageArray1[x][y][1] = 0; //r\n ImageArray1[x][y][2] = 0; //g\n ImageArray1[x][y][3] = 0; //b\n }\n }\n\n for (int y = 150; y < 400; y++) {\n for (int x = 150; x < 400; x++) {\n ImageArray1[x][y][1] = 1; //r\n ImageArray1[x][y][2] = 1; //g\n ImageArray1[x][y][3] = 1; //b\n }\n }\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n ImageArray1[x][y][1] = (int) (ImageArray1[x][y][1] * ImageArray[x][y][1]); //r\n ImageArray1[x][y][2] = (int) (ImageArray1[x][y][2] * ImageArray[x][y][2]); //g\n ImageArray1[x][y][3] = (int) (ImageArray1[x][y][3] * ImageArray[x][y][3]); //b\n }\n }\n ImageArray3 = rescaleShift(ImageArray1);\n\n return convertToBimage(ImageArray3);\n\n }", "public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }", "public MatrizGrafo valoresRelaciones() throws IOException\n {\n // Lectura del fichero\n flireReader = new FileReader (archivo);\n bufferedReader = new BufferedReader(flireReader);\n String fila;\n while((fila=bufferedReader.readLine())!=null)\n {\n String[] arreglo;\n arreglo=fila.split(\" \");\n grafo.nuevaCon(arreglo[0], arreglo[1], arreglo[2]);\n }\n return grafo;\n }", "public ModelImage readImage(boolean one) throws IOException {\r\n // The data types are Sun, hence the byte order is big-endian.\r\n int i;\r\n int num; //image number within file\r\n\r\n boolean endianess = LITTLE_ENDIAN;\r\n\r\n try {\r\n file = new File(fileDir + fileName);\r\n raFile = new RandomAccessFile(file, \"r\");\r\n progressBar = new ViewJProgressBar(ViewUserInterface.getReference().getProgressBarPrefix() + fileName,\r\n ViewUserInterface.getReference().getProgressBarPrefix() + \"BioRad image(s) ...\", 0, 100,\r\n false, null, null);\r\n xDim = getSignedShort(endianess); // 0\r\n yDim = getSignedShort(endianess); // 2\r\n zDim = getSignedShort(endianess); // 4\r\n ramp1Min = (short)getSignedShort(endianess); // 6\r\n ramp1Max = (short)getSignedShort(endianess); // 8\r\n notes = getInt(endianess); // 10\r\n byteFormat = (short)getSignedShort(endianess); // 14\r\n num = (short)getSignedShort(endianess); // 16\r\n\r\n setProgressBarVisible(!one);\r\n\r\n for (i = 0; i < 32; i++) {\r\n name[i] = 0;\r\n }\r\n readAgain = true;\r\n i = 0;\r\n while(readAgain) {\r\n name[i++] = raFile.readByte(); // 18\r\n if (name[i-1] == 0) {\r\n readAgain = false;\r\n }\r\n }\r\n fName = new String(name,0,i-1);\r\n raFile.seek(50);\r\n merged = (short)getSignedShort(endianess); // 50\r\n color1 = getUnsignedShort(endianess); // 52\r\n fileID = getUnsignedShort(endianess); // 54\r\n if (fileID != 12345) {\r\n throw new IOException(\"fileID is an illegal \" + fileID);\r\n }\r\n ramp2Min = (short)getSignedShort(endianess); // 56\r\n ramp2Max = (short)getSignedShort(endianess); // 58\r\n color2 = getUnsignedShort(endianess); // 60\r\n edited = (short)getSignedShort(endianess); // 62\r\n lens = (short)getSignedShort(endianess); // 64\r\n magFactor = getFloat(endianess); // 66\r\n // Position to the start of the image data\r\n raFile.seek(76);\r\n\r\n fileInfo = new FileInfoBioRad(fileName, fileDir, FileBase.BIORAD); // dummy fileInfo\r\n fileInfo.setEndianess(endianess);\r\n if (zDim > 1) {\r\n imgExtents = new int [3];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n imgExtents[2] = zDim;\r\n }\r\n else {\r\n imgExtents = new int [2];\r\n imgExtents[0] = xDim;\r\n imgExtents[1] = yDim;\r\n }\r\n\r\n fileInfo.setExtents(imgExtents);\r\n if (byteFormat == 1) {\r\n dataType = ModelStorageBase.UBYTE;\r\n bufferSize = xDim*yDim;\r\n }\r\n else { // byteFormat == 0\r\n dataType = ModelStorageBase.SHORT;\r\n bufferSize = xDim*yDim;\r\n }\r\n /*else { // merged pseudocolor\r\n dataType = ModelStorageBase.ARGB;\r\n bufferSize = 4*xDim*yDim;\r\n }*/\r\n fileInfo.setDataType(dataType);\r\n\r\n if (one) {\r\n image = new ModelImage(dataType, new int[] {imgExtents[0], imgExtents[1]}, fileInfo.getFileName(), UI);\r\n zDim = 1;\r\n }\r\n else {\r\n image = new ModelImage(dataType, imgExtents, fileInfo.getFileName(), UI);\r\n }\r\n\r\n imgBuffer = new float[bufferSize];\r\n for (i = 0; i < zDim; i++){\r\n try {\r\n if (one && imgExtents.length > 2) {\r\n if (dataType == ModelStorageBase.UBYTE) {\r\n raFile.seek(imgExtents[2]/2*xDim*yDim);\r\n }\r\n else {\r\n raFile.seek(imgExtents[2]*xDim*yDim);\r\n }\r\n readBuffer(imgExtents[2]/2, imgBuffer);\r\n }\r\n else {\r\n readBuffer(i, imgBuffer); // Slice a time;\r\n }\r\n image.setFileInfo(fileInfo, i);\r\n }\r\n catch (IOException error){\r\n throw new IOException(\"FileTiff: read: \" + error);\r\n }\r\n image.importData(i*bufferSize, imgBuffer, false);\r\n } // for (i = 0; i < imageSlice; i++)\r\n\r\n raFile.close();\r\n progressBar.dispose();\r\n }\r\n catch (OutOfMemoryError error) {\r\n if (image != null) {\r\n image.disposeLocal();\r\n image = null;\r\n }\r\n byteBuffer = null;\r\n System.gc();\r\n throw error;\r\n }\r\n\r\n return image;\r\n }", "public Image getSix();", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void carregar() {\n\t\tSystem.out.println(\"carregar imagem png\");\n\t\t\n\t}", "public int getImage();", "public String getImg_3() {\n return img_3;\n }", "public Image getCrotchetRest();", "WorldImage getImage();", "public vistaVentas() {\n initComponents();\n URL url = getClass().getResource(\"/imagenes/logoCarisma.jpg\");\n ImageIcon img = new ImageIcon(url);\n setIconImage(img.getImage());\n llenardescuento();\n }", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public String getImg_0() {\n return img_0;\n }", "public CopyOfPlayer(){ //Loads and scales the images\n for (int i = 0; i < robotImages.length; i++){\n for (int j = 0; j < black.length; j++){\n robotImages[i][j].scale(300, 300);\n }\n }\n costume = PrefLoader.getCostume(); //Sets costume according to file\n setImage(robotImages[costume][2]);\n }", "GenerateurDeCartesImages(String nomDuTheme, String[] Tableau){\n\t\tsuper(nomDuTheme);\n\t\tthis.nomDuTheme=nomDuTheme;\n\t\tthis.optionsDeImage=Tableau;\n\t\tinitializePickedCardsArray();\n\t}", "public interface CambioImagenPerfil{\n\n void opcionEscogida(String app);\n }", "private int seleccionarImagenTipo(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"compañia\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"informatica\")){\n return R.drawable.ordenador;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"clases\")){\n return R.drawable.clases;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"menaje/hogar\")){\n return R.drawable.herramientas;\n }\n return 0;\n }", "public static Image filtroGrisAzul(Image img){\n WritableImage resultImg = new WritableImage((int)img.getWidth(),(int)img.getHeight());\n PixelReader pixelr = img.getPixelReader();\n PixelWriter pixelw = resultImg.getPixelWriter();\n \n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color = pixelr.getColor(j, i);\n double blue;\n blue = color.getBlue();\n blue *= 255;\n pixelw.setColor(j, i, Color.rgb((int)blue, (int)blue, (int)blue));\n }\n }\n \n return resultImg;\n }", "public Image getSemibreve();", "public void prepareSorpresas(){\n\t\tfor( int x= 0 ; x < game.getAmountSorpresas();x++){\n\t\t\tSorpresa s = game.getSorpresa(x);\n\t\t\timage = s.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(s.getAncho(), s.getAlto(), Image.SCALE_SMOOTH);\n\t\t\ts.setImage(new ImageIcon(temporal));\n\t\t}\n\t}", "void makeAvocado() {\n this.hungerDeltaPcrntArray.add(0.17f);\n this.speedDeltaPcrntArray.add(0.50f);\n this.pointsDeltaArray.add(600);\n this.imageLocationArray.add(\"avocado.png\");\n }", "public static BufferedImage filtroGris2(String nameFile) throws IOException{\n cargarImagen(nameFile);\n int [] pixel = null;\n int gris;\n for (int i = 0; i < altoImg; i++) {\n for (int j = 0; j < anchoImg; j++) {\n pixel = rasterImg.getPixel(j, i, pixel);\n gris = (int) (rasterImg.getSample(j, i, 0)*0.21 // rojo\n + rasterImg.getSample(j, i, 1)*0.71 // Verde\n + rasterImg.getSample(j, i, 2)*0.07); // Azul\n dstImg.setSample(j, i, 0, gris); // Rojo\n dstImg.setSample(j, i, 1, gris); // Verde\n dstImg.setSample(j, i, 2, gris); // Azul\n }\n }\n buffImg.setData(dstImg);\n return buffImg;\n }", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public static void main(String[] args) \n\t{\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME );\n\t\tMatToBufferedImage M2B = new MatToBufferedImage();\n \tMat mat = Highgui.imread(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\Projects\\\\OpenCV\\\\image6.png\",Highgui.CV_LOAD_IMAGE_COLOR);\n \tMat newMat = new Mat(mat.rows(), mat.cols(), mat.type());\n \tmat.convertTo(mat, CvType.CV_64FC3); //CV_64FC3 it can use double[] instead of byte[] \n \t//Mat newMat = mat.clone();\n \n \t//byte buff[] = new byte[(int) (mat.total() * mat.channels())];\n \tdouble buff[] = new double[(int) (mat.total() * mat.channels())];\n \n\t\tdouble alpha = 2.2;\n \tint beta = 50; \n \n \tSystem.out.println(mat.type());\n \n \tmat.get(0, 0, buff);\n \n \tImageShow imshow = new ImageShow(M2B.getBufferedImage(mat));\n \n \tfor( int i = 0; i<buff.length; i++)\n \t{\n \t\tbuff[i] = (alpha*buff[i]+beta);\n \t}\n \n \tnewMat.put(0, 0, buff);\n \n\t\tImageShow imshow1 = new ImageShow(M2B.getBufferedImage(newMat));\n \n\n\t}", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "public void vision()\n {\n NIVision.IMAQdxGrab(session, colorFrame, 1);\t\t\t\t\n RETRO_HUE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro hue min\", RETRO_HUE_RANGE.minValue);\n\t\tRETRO_HUE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro hue max\", RETRO_HUE_RANGE.maxValue);\n\t\tRETRO_SAT_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro sat min\", RETRO_SAT_RANGE.minValue);\n\t\tRETRO_SAT_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro sat max\", RETRO_SAT_RANGE.maxValue);\n\t\tRETRO_VAL_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro val min\", RETRO_VAL_RANGE.minValue);\n\t\tRETRO_VAL_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro val max\", RETRO_VAL_RANGE.maxValue);\n\t\tAREA_MINIMUM = SmartDashboard.getNumber(\"Area min %\");\n\t\t//MIN_RECT_WIDTH = SmartDashboard.getNumber(\"Min Rect Width\", MIN_RECT_WIDTH);\n\t\t//MAX_RECT_WIDTH = SmartDashboard.getNumber(\"Max Rect Width\", MAX_RECT_WIDTH);\n\t\t//MIN_RECT_HEIGHT = SmartDashboard.getNumber(\"Min Rect Height\", MIN_RECT_HEIGHT);\n\t\t//MAX_RECT_HEIGHT= SmartDashboard.getNumber(\"Max Rect Height\", MAX_RECT_HEIGHT);\n\t\t\n\t\t//SCALE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Scale Range Min\");\n\t\t//SCALE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Scale Range Max\");\n\t\t//MIN_MATCH_SCORE = (int)SmartDashboard.getNumber(\"Min Match Score\");\n //Look at the color frame for colors that fit the range. Colors that fit the range will be transposed as a 1 to the binary frame.\n\t\t\n\t\tNIVision.imaqColorThreshold(binaryFrame, colorFrame, 255, ColorMode.HSV, RETRO_HUE_RANGE, RETRO_SAT_RANGE, RETRO_VAL_RANGE);\n\t\t//Send the binary image to the cameraserver\n\t\tif(cameraView.getSelected() == BINARY)\n\t\t{\n\t\t\tCameraServer.getInstance().setImage(binaryFrame);\n\t\t}\n\n\t\tcriteria[0] = new NIVision.ParticleFilterCriteria2(NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA, AREA_MINIMUM, 100.0, 0, 0);\t\t\n\t\t\n NIVision.imaqParticleFilter4(binaryFrame, binaryFrame, criteria, filterOptions, null);\n\n // NIVision.RectangleDescriptor rectangleDescriptor = new NIVision.RectangleDescriptor(MIN_RECT_WIDTH, MAX_RECT_WIDTH, MIN_RECT_HEIGHT, MAX_RECT_HEIGHT);\n// \n// //I don't know\n// NIVision.CurveOptions curveOptions = new NIVision.CurveOptions(NIVision.ExtractionMode.NORMAL_IMAGE, 0, NIVision.EdgeFilterSize.NORMAL, 0, 1, 1, 100, 1,1);\n// NIVision.ShapeDetectionOptions shapeDetectionOptions = new NIVision.ShapeDetectionOptions(1, rectAngleRanges, SCALE_RANGE, MIN_MATCH_SCORE);\n// NIVision.ROI roi = NIVision.imaqCreateROI();\n//\n// NIVision.DetectRectanglesResult result = NIVision.imaqDetectRectangles(binaryFrame, rectangleDescriptor, curveOptions, shapeDetectionOptions, roi);\n// //Dummy rectangle to start\n// \n// NIVision.RectangleMatch bestMatch = new NIVision.RectangleMatch(new PointFloat[]{new PointFloat(0.0, 0.0)}, 0, 0, 0, 0);\n// \n// //Find the best matching rectangle\n// for(NIVision.RectangleMatch match : result.array)\n// {\n// \tif(match.score > bestMatch.score)\n// \t{\n// \t\tbestMatch = match;\n// \t}\n// }\n// SmartDashboard.putNumber(\"Rect height\", bestMatch.height);\n// SmartDashboard.putNumber(\"Rect Width\", bestMatch.width);\n// SmartDashboard.putNumber(\"Rect rotation\", bestMatch.rotation);\n// SmartDashboard.putNumber(\"Rect Score\", bestMatch.score);\n \n //Report how many particles there are\n\t\tint numParticles = NIVision.imaqCountParticles(binaryFrame, 1);\n\t\tSmartDashboard.putNumber(\"Masked particles\", numParticles);\n\t\t\n \n\t\tif(numParticles > 0)\n\t\t{\n\t\t\t//Measure particles and sort by particle size\n\t\t\tVector<ParticleReport> particles = new Vector<ParticleReport>();\n\t\t\tfor(int particleIndex = 0; particleIndex < numParticles; particleIndex++)\n\t\t\t{\n\t\t\t\tParticleReport par = new ParticleReport();\n\t\t\t\tpar.Area = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA);\n\t\t\t\tpar.AreaByImageArea = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA);\n\t\t\t\tpar.BoundingRectTop = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_TOP);\n\t\t\t\tpar.BoundingRectLeft = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_LEFT);\n\t\t\t\tpar.BoundingRectHeight = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_HEIGHT);\n\t\t\t\tpar.BoundingRectWidth = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_WIDTH);\n\t\t\t\tparticles.add(par);\n\n\t\t\t}\n\t\t\tparticles.sort(null);\n\n\t\t\t//This example only scores the largest particle. Extending to score all particles and choosing the desired one is left as an exercise\n\t\t\t//for the reader. Note that this scores and reports information about a single particle (single L shaped target). To get accurate information \n\t\t\t//about the location of the tote (not just the distance) you will need to correlate two adjacent targets in order to find the true center of the tote.\n//\t\t\tscores.Aspect = AspectScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Aspect\", scores.Aspect);\n//\t\t\tscores.Area = AreaScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Area\", scores.Area);\n//\t\t\tboolean isTote = scores.Aspect > SCORE_MIN && scores.Area > SCORE_MIN;\n//\n\t\t\tParticleReport bestParticle = particles.elementAt(0);\n\t\t NIVision.Rect particleRect = new NIVision.Rect((int)bestParticle.BoundingRectTop, (int)bestParticle.BoundingRectLeft, (int)bestParticle.BoundingRectHeight, (int)bestParticle.BoundingRectWidth);\n\t\t \n\t\t //NIVision.imaqOverlayRect(colorFrame, particleRect, new NIVision.RGBValue(0, 0, 0, 255), DrawMode.PAINT_VALUE, \"a\");//;(colorFrame, colorFrame, particleRect, DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 20);\n\t\t NIVision.imaqDrawShapeOnImage(colorFrame, colorFrame, particleRect, NIVision.DrawMode.DRAW_VALUE, ShapeMode.SHAPE_RECT, 0.0f);\n\t\t SmartDashboard.putNumber(\"Rect Top\", bestParticle.BoundingRectTop);\n\t\t SmartDashboard.putNumber(\"Rect Left\", bestParticle.BoundingRectLeft);\n\t\t SmartDashboard.putNumber(\"Rect Width\", bestParticle.BoundingRectWidth);\n\t\t SmartDashboard.putNumber(\"Area by image area\", bestParticle.AreaByImageArea);\n\t\t SmartDashboard.putNumber(\"Area\", bestParticle.Area);\n\t\t double bestParticleMidpoint = bestParticle.BoundingRectLeft + bestParticle.BoundingRectWidth/2.0;\n\t\t double bestParticleMidpointAimingCoordnates = pixelCoordnateToAimingCoordnate(bestParticleMidpoint, CAMERA_RESOLUTION_X);\n\t\t angleToTarget = aimingCoordnateToAngle(bestParticleMidpointAimingCoordnates, VIEW_ANGLE);\n\t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\tangleToTarget = 0.0;\n\t\t}\n\n if(cameraView.getSelected() == COLOR)\n {\n \tCameraServer.getInstance().setImage(colorFrame);\n }\n\t SmartDashboard.putNumber(\"Angle to target\", angleToTarget);\n\n }", "public imageAlphaClass()\n {\n array_lineas = new ArrayList<>();\n array_modelos = new ArrayList<>();\n array_productos = new ArrayList<>();\n }", "public void InitParam(Bitmap[] bm, int vitesse, int intru, int laserColor) {\n screenSizeX = getResources().getDisplayMetrics().widthPixels;\n screenSizeY = getResources().getDisplayMetrics().heightPixels;\n\n //On recupere toutes nos images\n this.bm = bm;\n\n //On recupere la couleur du laser\n this.laserColor = laserColor;\n\n //Et celui qui est l'intru\n this.intru = intru;\n\n //On creer nos tableau avec comme longueur notre nombre d'images\n pathMeasure = new PathMeasure[this.bm.length];\n pathLength = new float[this.bm.length];\n pos = new float[this.bm.length][2]; // ici 2 positions, x et y\n animPath = new Path[this.bm.length];\n distance = new float[this.bm.length];\n resultBitmap = new Bitmap[this.bm.length];\n\n //On boucle pour instancier chaque objets de nos tableaux\n for(int j=0;j<this.bm.length;j++){\n\n animPath[j]= getRandomPath();\n pathMeasure[j] = new PathMeasure(animPath[j],false);\n pathLength[j] = pathMeasure[j].getLength();\n\n resultBitmap[j] = Bitmap.createBitmap(bm[j], 0, 0,\n bm[j].getWidth() - 1, bm[j].getHeight() - 1);\n }\n\n //On definit le pas\n step = vitesse;\n\n // On creer la matrice\n matrix = new Matrix();\n\n //Parametre dans le cas ou l'ecran est touché / pour les laser\n fired=false;\n touchedPosition = new float[2];\n distGaucheRest = new float[2];\n distGaucheRest[0]=0;\n distGaucheRest[1]=screenSizeY;\n fireGauchePas = new float[2];\n fireGauchePas[0]=0;\n fireGauchePas[1]=0;\n\n distDroitRest = new float[2];\n distDroitRest[0]=screenSizeX;\n distDroitRest[1]=screenSizeY;\n fireDroitPas = new float[2];\n fireDroitPas[0]=0;\n fireDroitPas[1]=0;\n\n //Au cas ou le vaiseau explose\n xplosed=false;\n countBeforeXplose=0;\n\n }", "private JPanel getJPGraficoViolacao()\n\t{\n\t\tif ( jPGraficoViolacao == null )\n\t\t{\n\t\t\tjPGraficoViolacao = new JPanel();\n\t\t\tjPGraficoViolacao.setLayout(null);\n\t\t\tjPGraficoViolacao.setBounds(new Rectangle(530, 210, 465, 400));\n\t\t}\n\t\treturn jPGraficoViolacao;\n\t}", "public void prepareObjetivos(){\n\t\tfor( int x= 0 ; x < game.getAmountObjetivos();x++){\n\t\t\tObjetivo o = game.getObjetivo(x);\n\t\t\timage = o.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(o.getAncho(), o.getAlto(), Image.SCALE_SMOOTH);\n\t\t\to.setImage(new ImageIcon(temporal));\n\t\t}\n\t\t\n\t}", "public static BufferedImage localizarRetangulo(BufferedImage pImage) {\n int rows = pImage.getWidth();\n int cols = pImage.getHeight();\n int type = CvType.CV_16UC1;\n\n Mat image = new Mat(rows, cols, type);\n Mat hierarchy = new Mat();\n Mat gray = null;\n Imgproc.cvtColor(image, gray, Imgproc.COLOR_GRAY2BGR);\n Imgproc.Canny(gray, gray, 100, 200, 3, false);\n List<MatOfPoint> contornos = new ArrayList<>();\n\n Imgproc.findContours(gray, contornos, hierarchy, Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE);\n /// Draw contours\n Mat drawing = new Mat();\n\n for (int i = 0; i < contornos.size(); i++) {\n Scalar color = new Scalar(200);\n Imgproc.drawContours(drawing, contornos, i, color, 2, 8, hierarchy, 0, new Point());\n }\n return convert(drawing);\n\n }", "public static Image filtroGrisRojo(Image img){\n WritableImage resultImg = new WritableImage((int)img.getWidth(),(int)img.getHeight());\n PixelReader pixelr = img.getPixelReader();\n PixelWriter pixelw = resultImg.getPixelWriter();\n \n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color = pixelr.getColor(j, i);\n double red;\n red = color.getRed();\n red *= 255;\n pixelw.setColor(j, i, Color.rgb((int)red, (int)red, (int)red));\n }\n }\n \n return resultImg;\n }", "private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }", "public void execute(OutputManager om) {\n\n int numRegions = allROIs.length;\n \n \n // get the voxel classification\n // either from a voxel class map or from a brain / background segmentation\n int[][][] vc = new int[xDataDim][yDataDim][zDataDim];\n \n // number of PDs in each voxel (for Bayesian images)\n int[][][] voxelNumPDs = new int[xDataDim][yDataDim][zDataDim];\n \n for (int k = 0; k < zDataDim; k++) {\n for (int j = 0; j < yDataDim; j++) {\n for (int i = 0; i < xDataDim; i++) {\n vc[i][j][k] = 2;\n voxelNumPDs[i][j][k] = 1;\n }\n }\n }\n \n if (CL_Initializer.bgMaskFile != null) {\n \n if (ImageHeader.imageExists(CL_Initializer.bgMaskFile)) {\n if ( !CL_Initializer.headerTemplate.sameSpace(CL_Initializer.bgMaskFile) ) {\n throw new LoggedException(\"Brain mask must be in the same voxel space as the input data\");\n }\n }\n\n CL_Initializer.initMaskSource();\n \n for (int k = 0; k < zDataDim; k++) {\n for (int j = 0; j < yDataDim; j++) {\n for (int i = 0; i < xDataDim; i++) {\n \n double maskValue = CL_Initializer.bgMask.nextVoxel()[0];\n \n vc[i][j][k] = maskValue > 0.0 ? 2 : -1;\n voxelNumPDs[i][j][k] = maskValue > 0.0 ? 1 : 0;\n }\n }\n }\n \n }\n \n \n // use VC from file if we have it - note this overrides the bgmask\n\n // This needs generalizing to support NIfTI files / other formats. Ideally it should be decoupled from the\n // SH order (which is ambiguous over order 4 anyhow), it should be simply the number of PDs in the voxel\n //\n // Actually doing this will require work to the TractographyImage tree and other classes\n //\n if (CL_Initializer.voxelClassMap != null) {\n vc = new int[xDataDim][yDataDim][zDataDim];\n \n DataSource vcSource = ExternalDataSource.getDataSource(CL_Initializer.voxelClassMap, 1, \"int\");\n \n for (int k = 0; k < zDataDim; k++) {\n for (int j = 0; j < yDataDim; j++) {\n for (int i = 0; i < xDataDim; i++) {\n vc[i][j][k] = (int)vcSource.nextVoxel()[0];\n }\n }\n }\n }\n \n // get the anisotropy map, if any\n //\n // Could be FA or any scalar image where we cease tracking below a threshold\n double[][][] anisMap = null;\n \n if (anisMapFile != null) {\n if (ImageHeader.imageExists(anisMapFile)) {\n try {\n \n ImageHeader ih = ImageHeader.readHeader(anisMapFile);\n\n \n if (!CL_Initializer.headerTemplate.sameSpace(ih)) {\n throw new LoggedException(\"Anisotropy image must be in the same voxel space as the input data\");\n }\n\n\n anisMap = ih.readSingleVolumeData();\n }\n catch (IOException e) {\n throw new LoggedException(e);\n }\n }\n else {\n anisMap = new double[xDataDim][yDataDim][zDataDim];\n \n DataSource anisSource =\n ExternalDataSource.getDataSource(anisMapFile, 1, CL_Initializer.inputDataType);\n \n for (int k = 0; k < zDataDim; k++) {\n for (int j = 0; j < yDataDim; j++) {\n for (int i = 0; i < xDataDim; i++) {\n anisMap[i][j][k] = anisSource.nextVoxel()[0];\n }\n }\n }\n \n }\n }\n\n\n // set up the image\n \n TractographyImage image = null;\n \n switch (imageType) {\n\n\tcase BEDPOSTX : case BEDPOSTX_DYAD :\n\n\t boolean probabilistic = ( imageType == ImageType.BEDPOSTX ); \n\t \n\t image = BedpostxTractographyImage.getTractographyImage(bedpostxDir, probabilistic, bedpostxMinF, anisMap, anisThresh,\n\t\t\t\t\t\t\t\t new int[] {xDataDim, yDataDim, zDataDim},\n\t\t\t\t\t\t\t\t new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, ran);\n\t \n\t break;\n\n \n case REPBS_DT: case REPBS_MULTITENSOR: \n \n CL_Initializer.initImagingScheme();\n \n \n image =\n RepBS_DWI_TractographyImage.getTractographyImage(CL_Initializer.bsDataFiles,\n CL_Initializer.inputDataType,\n CL_Initializer.imPars,\n CL_Initializer.inversionIndices,\n vc, anisMap, anisThresh,\n new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, ran);\n \n break;\n \n \n case WILDBS_DT:\n\t CL_Initializer.initImagingScheme();\n \n\t image =\n\t\tDT_WildBS_DWI_TractographyImage.getTractographyImage(CL_Initializer.inputFile,\n\t\t\t\t\t\t\t\t CL_Initializer.inputDataType,\n\t\t\t\t\t\t\t\t CL_Initializer.imPars,\n\t\t\t\t\t\t\t\t vc, anisMap, anisThresh, \n\t\t\t\t\t\t\t\t new int[] {xDataDim, yDataDim, zDataDim},\n\t\t\t\t\t\t\t\t new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, ran);\n \n\t break;\n \n \n \n case PICO :\n \n image = PICoTractographyImage.getTractographyImage\n (CL_Initializer.inputFile, CL_Initializer.inputDataType, CL_Initializer.numPDsIO,\n picoPDF, anisMap, anisThresh, new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, ran);\n \n break;\n \n case BAYESDIRAC: case BAYESDIRAC_DT :\n \n CL_Initializer.initImagingScheme();\n \n // Friman Bayesian method\n // add anisotropy map option\n\n BayesDataModel dataModel = imageType == ImageType.BAYESDIRAC ? BayesDataModel.BALL_STICK : BayesDataModel.CYL_SYMM_DT;\n\n BayesDiracTractographyImage bi = BayesDiracTractographyImage.getTractographyImage\n (CL_Initializer.inputFile, CL_Initializer.inputDataType,\n CL_Initializer.imPars, dataModel, voxelNumPDs, anisMap, anisThresh,\n new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, CL_Initializer.pointSetInd, ran);\n \n if (curvePriorK > 0.0) {\n bi.setCurvePriorKappa(curvePriorK);\n }\n if (curvePriorG > 0.0) {\n bi.setCurvePriorGamma(curvePriorG);\n }\n \n if (externalPriorImageFile != null) {\n PICoTractographyImage ePrior = PICoTractographyImage.getTractographyImage\n (externalPriorImageFile, externalPriorDataType, CL_Initializer.numPDsIO,\n picoPDF, anisMap, anisThresh, new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim}, ran);\n \n bi.setExternalPriors(ePrior);\n }\n \n image = bi;\n \n break;\n \n case SF_PEAK :\n image =\n SF_TractographyImage.getTractographyImage(CL_Initializer.inputFile, CL_Initializer.inputDataType,\n CL_Initializer.numPDsIO, anisMap, anisThresh,\n new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim});\n break;\n \n case DT: case MULTITENSOR :\n image =\n DT_TractographyImage.getTractographyImage(CL_Initializer.inputFile, CL_Initializer.inputDataType,\n CL_Initializer.maxTensorComponents, anisMap, anisThresh,\n new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim});\n break;\n\n case DWI_DT : case DWI_MULTITENSOR:\n\n CL_Initializer.initImagingScheme();\n\n image =\n DWI_TractographyImage.getTractographyImage(CL_Initializer.inputFile, CL_Initializer.inputDataType,\n CL_Initializer.imPars, CL_Initializer.inversionIndices,\n vc, anisMap, anisThresh, \n new int[] {xDataDim, yDataDim, zDataDim},\n new double[] {xVoxelDim, yVoxelDim, zVoxelDim});\n break;\n\n\tcase VECTOR : \n\n\t image = PD_TractographyImage.getTractographyImage(vectorFiles, CL_Initializer.inputDataType,\n\t\t\t\t\t\t\t anisMap, anisThresh, \n\t\t\t\t\t\t\t new int[] {xDataDim, yDataDim, zDataDim},\n\t\t\t\t\t\t\t new double[] {xVoxelDim, yVoxelDim, zVoxelDim});\n\t break;\n \n default : throw new LoggedException(\"Unsupported image type : \" + imageType);\n \n }\n \n \n // Set up the interpolation\n\n ImageInterpolator interp = null;\n\n \n switch (dataInterpolation) {\n\n\n case NEAREST_NEIGHBOUR: \n \n interp = new NearestNeighbourInterpolator(image);\n\n break;\n\n case NEIGHBOUR_CHOICE: \n\n interp = new NeighbourChoiceInterpolator(image, ran);\n\n break;\n\n case DWI_TRILINEAR: \n\n interp = new DWI_LinearInterpolator((DWI_TractographyImage)image);\n\n break;\n\n case VECTOR_TRILINEAR: \n\n interp = new VectorLinearInterpolator(image);\n\n break;\n\n case TEND_NN: case TEND_NC:\n\n // how to interpolate the tensor data itself, in order to provide\n // the tensor for the TEND term\n TensorInterpolator dataInterp = null;\n\n if (dataInterpolation == DataInterpolation.TEND_NC) {\n dataInterp = new DT_NC_Interpolator((TensorTractographyImage)image, ran);\n }\n else {\n dataInterp = new DT_NN_Interpolator((TensorTractographyImage)image);\n }\n\n if (tendF_File != null) {\n try { \n ImageHeader ih = ImageHeader.readHeader(tendF_File);\n \n interp = new TendInterpolator((TensorTractographyImage)image, dataInterp, ih.readSingleVolumeData(), tendG);\n }\n catch (IOException e) {\n throw new LoggedException(e);\n\n }\n \n }\n else {\n interp = new TendInterpolator((TensorTractographyImage)image, dataInterp, tendF, tendG); \n }\n \n break;\n\n default: throw new LoggedException(\"Unsupported interpolation : \" + dataInterpolation);\n\n\n }\n\n \n // set up the tracker\n\n FibreTracker tracker = null;\n\n\n switch (trackingAlgorithm) {\n\n case FACT:\n \n tracker = new FACT_FibreTracker(image);\n \n break;\n \n case EULER: \n \n tracker = new EulerFibreTracker(interp, stepSize); \n\n break;\n\n case RK4: \n\n tracker = new RK4FibreTracker(interp, stepSize);\n\n break;\n }\n\n tracker.setCurveCheckInterval(checkCurveLength);\n tracker.setIP_Threshold(ipThresh);\n \n \n // And finally, do the tracking\n \n regions : for (int region = 0; region < allROIs.length; region++) {\n\n RegionOfInterest roi = allROIs[region];\n \n if (regionIndex > -1) {\n if (roi.getRegionLabel() != regionIndex) {\n continue;\n }\n }\n \n \n int outputRegionID = roi.getRegionLabel();\n \n \n // points defined in Camino space\n Point3D[] seeds = roi.getSeedPoints();\n \n if (!silent) {\n System.err.println(\"Processing ROI \" + (region + 1) + \" of \" + numRegions);\n }\n \n FileOutputStream fout = null;\n DataOutputStream dout = null;\n \n try {\n \n if (outputRoot == null) {\n dout = om.getOutputStream();\n }\n else {\n \n if (gzip) {\n fout = new FileOutputStream(outputRoot + outputRegionID + \".Bfloat.gz\");\n dout = new DataOutputStream(new GZIPOutputStream(fout, 1024*1024*16));\n \n }\n else {\n fout = new FileOutputStream(outputRoot + outputRegionID + \".Bfloat\");\n dout = new DataOutputStream\n (new BufferedOutputStream(fout, 1024*1024*16));\n }\n }\n \n \n \n \n seed: for (int sp = 0; sp < seeds.length; sp++) {\n \n if (!silent) {\n System.err.print(\"\\rProcessing seed \" + (sp + 1) + \" of \" + seeds.length);\n }\n \n Point3D seedPoint = seeds[sp];\n \n if (!tracker.inBounds(seedPoint)) {\n logger.warning(\"Seed point \\n\\t\" + seedPoint + \"\\n is outside the diffusion image space, ignoring\");\n continue seed;\n }\n\n int xVox = (int)(seedPoint.x / xVoxelDim);\n int yVox = (int)(seedPoint.y / yVoxelDim);\n int zVox = (int)(seedPoint.z / zVoxelDim);\n \n int numPDs = image.numberOfPDs(xVox, yVox, zVox);\n \n // if number of PDs is zero, track once\n // tracker will return the seed point\n numPDs = numPDs == 0 ? 1 : numPDs;\n \n for (int p = 0; p < numPDs; p++) {\n \n for (int i = 0; i < iterations; i++) {\n \n Tract t = tracker.trackFromSeed(seedPoint, p);\n \n // warp tracts to physical space\n t.transformToPhysicalSpace(voxelToPhysicalTrans, xVoxelDim, yVoxelDim, zVoxelDim);\n \n t.writeRaw(dout);\n \n }\n \n }\n \n } // end for seedpoints\n \n if (!silent) {\n System.err.println(\"\\n\");\n }\n \n if (outputRoot != null) {\n // want to close file\n dout.close();\n }\n \n }\n catch(IOException e) {\n throw new LoggedException(e);\n }\n \n } // end for all ROIs\n \n // close om stream\n if(om != null)\n om.close();\n \n }", "private void enhanceImage(){\n }", "private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }", "@Generated(hash = 1786532268)\npublic synchronized void resetImagemOcorrencias() {\n imagemOcorrencias = null;\n}", "public static void lukisImej(BufferedImage image_dest) {\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n\n//\t\tfor(int y=0; y<h;y++)\n//\t\t{\n//\t\t\tfor(int x =0 ; x<w; x++)\n//\t\t\t{\n//\t\t\t\tif(image_dest.getRGB(x, y)==-1)\n//\t\t\t\t\tSystem.out.print(\"1\");\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\t//System.err.print(\"X\"+x+\" Y : \"+y);\n//\t\t\t\t\t//return;\n//\t\t\t\t\tSystem.out.print(\"0\");\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tSystem.out.println(\"\");\n//\t\t}\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == CODIGO_DE_SOLICITUD_IMAGEN\n && resultCode == RESULT_OK\n && data!=null\n && data.getData() != null){\n\n RutaArchivoUri = data.getData();\n try {\n //Convertimos a bitmap\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),RutaArchivoUri);\n //seteamos la imagen\n ImagenAgregarSerie.setImageBitmap(bitmap);\n\n }catch (Exception e){\n Toast.makeText(this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n }", "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "public void novaIgra() {\r\n\t\tbroj_slobodnih = 16;\r\n\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++)\r\n\t\t\t\ttabela[i][j] = 0;\r\n\t\tpobjeda = false;\r\n\t\tigrajPoslijePobjede = false;\r\n\t\tgenerisiPolje();\r\n\t\tgenerisiPolje();\r\n\t}", "public String getImg_1() {\n return img_1;\n }", "public Image getFour();", "public Image getImgMario() {return imgMario;}", "public Image frogImg(int num){\n\t\tfrog = new Image[8];\n\t\tfrog[0] = new Image(\"file:src/main/resources/Img/froggerUp.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[1] = new Image(\"file:src/main/resources/Img/froggerLeft.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[2] = new Image(\"file:src/main/resources/Img/froggerDown.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[3] = new Image(\"file:src/main/resources/Img/froggerRight.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[4] = new Image(\"file:src/main/resources/Img/froggerUpJump.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[5] = new Image(\"file:src/main/resources/Img/froggerLeftJump.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[6] = new Image(\"file:src/main/resources/Img/froggerDownJump.png\", FrogImgSize, FrogImgSize, true, true);\n\t\tfrog[7] = new Image(\"file:src/main/resources/Img/froggerRightJump.png\", FrogImgSize, FrogImgSize, true, true);\n\t\treturn frog[num];\n\t}", "public void vignette() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n int middleRow = rows/2; //Height of the right angle\n int middleCol = cols/2; //Width of the right angle\n double hfD = (Math.sqrt(Math.pow(rows,2)+Math.pow(cols,2)))/2;\n \n //Outer: Rows, Inner: Columns\n for(int rr = 0; rr < rows; rr++){\n \n for(int cc = 0; cc < cols; cc++){\n \n int rgb= currentIm.getPixel(rr,cc);\n double red= DM.getRed(rgb);\n double blue= DM.getBlue(rgb);\n double green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double currentDistance = Math.sqrt(Math.pow(Math.abs(middleRow-rr),2)+\n Math.pow(Math.abs(middleCol-cc),2));\n \n double vigValue = 1-Math.pow((currentDistance/hfD),2);\n \n red = red * vigValue;\n green = green * vigValue;\n blue = blue * vigValue;\n \n currentIm.setPixel(rr, cc,\n (alpha << 24) | ((int)red << 16) | ((int)green << 8) | \n (int)blue);\n }\n \n }\n \n }", "private void openCVImage(){\n Imgcodecs codec = new Imgcodecs();\n image = codec.imread(currentPhotoPath, Imgcodecs.IMREAD_COLOR);\n }", "public Image getSemiquaverRest();" ]
[ "0.69076514", "0.6514402", "0.6497707", "0.63678205", "0.61174077", "0.6099315", "0.60795975", "0.60763234", "0.60612273", "0.6016863", "0.5967179", "0.5917874", "0.58797383", "0.5875419", "0.58717996", "0.5855185", "0.5852358", "0.58369386", "0.5827458", "0.5800354", "0.5787408", "0.57539636", "0.574693", "0.57423306", "0.5730398", "0.57158893", "0.5711824", "0.57093316", "0.5690109", "0.5687817", "0.5682359", "0.5673173", "0.56616354", "0.5656589", "0.56355476", "0.5623891", "0.56225306", "0.56213903", "0.5619452", "0.56123555", "0.56109023", "0.5610018", "0.5605351", "0.5590369", "0.5590319", "0.5587459", "0.55744344", "0.55695534", "0.5566616", "0.55623525", "0.5562275", "0.5560272", "0.5556456", "0.5552745", "0.5549925", "0.554967", "0.5546522", "0.5538859", "0.5537526", "0.5533433", "0.55321616", "0.5528775", "0.5519876", "0.55190957", "0.55133706", "0.5512702", "0.5511228", "0.5504753", "0.5498911", "0.54937035", "0.54935247", "0.5492917", "0.54922587", "0.54897153", "0.5487171", "0.54866827", "0.5476639", "0.5470332", "0.54608035", "0.5460581", "0.54541504", "0.5447588", "0.54471576", "0.5444837", "0.54444915", "0.5440701", "0.54316294", "0.5425956", "0.54243463", "0.5419549", "0.5415909", "0.54075533", "0.54045504", "0.5401615", "0.5394007", "0.53930604", "0.5390531", "0.538667", "0.5385504", "0.53834033", "0.53807586" ]
0.0
-1
METODOS DE SUPORTE ///////////////////////////////////////////
public void copiaImg() { try { String tipo = caminhoImagem.replaceAll(".*\\.", ""); System.out.println(tipo); String l = caminhoImagem; String i = "../MASProject/imagens/" + idObra.getText() + "." + tipo; caminhoImagem = i; @SuppressWarnings("resource") FileInputStream fisDe = new FileInputStream(l); @SuppressWarnings("resource") FileOutputStream fisPara = new FileOutputStream(i); FileChannel fcPara = fisDe.getChannel(); FileChannel fcDe = fisPara.getChannel(); if (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) { fcPara.close(); fcDe.close(); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\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\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private stendhal() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void getData() {\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}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public void gored() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void prot() {\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@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 public void init() {\n\n }", "@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\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 prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "void berechneFlaeche() {\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\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 trabajar() {\n\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}" ]
[ "0.64939", "0.64902234", "0.6448907", "0.64373016", "0.6363212", "0.63387406", "0.63275474", "0.6285016", "0.62502384", "0.6243006", "0.62274", "0.62274", "0.62245536", "0.62121534", "0.6210023", "0.6157671", "0.6130622", "0.61241585", "0.61191463", "0.60736847", "0.6061936", "0.6025939", "0.601941", "0.601369", "0.59924734", "0.5986896", "0.5977657", "0.59678066", "0.59643537", "0.59505534", "0.5922971", "0.5921882", "0.59156847", "0.59110063", "0.5895201", "0.5895201", "0.58851874", "0.58760214", "0.5870017", "0.5870017", "0.5833501", "0.58328265", "0.5829639", "0.5789975", "0.5786423", "0.57854754", "0.5764742", "0.5753416", "0.5752815", "0.5744762", "0.5728696", "0.572257", "0.57225317", "0.5706012", "0.5702136", "0.56916195", "0.568645", "0.5661548", "0.56558037", "0.56554663", "0.56554663", "0.56554663", "0.564907", "0.5644143", "0.5644143", "0.5644143", "0.5644143", "0.5644143", "0.5637101", "0.5637101", "0.5637101", "0.5637101", "0.5637101", "0.5637101", "0.56362677", "0.5635014", "0.56310946", "0.56278825", "0.5624767", "0.5619248", "0.56168085", "0.56117433", "0.56051886", "0.56051886", "0.56051886", "0.56051886", "0.56051886", "0.56051886", "0.56051886", "0.5604288", "0.5603916", "0.5603916", "0.55961525", "0.55924255", "0.55924255", "0.55911154", "0.5589687", "0.5586395", "0.55857277", "0.55726546", "0.5572654" ]
0.0
-1
ALTEREI O NOME pesquisarArtistaEditar POR editarArtista pAController = new ArtistaPesqCtrl(btnEditarArtista, dataAquisicao, cbCategoria);
public void editarArtista() { ArrayList<String> listString = new ArrayList<>(); ArrayList<ArtistaMdl> listArtista = new ArrayList<>(); String[] possibilities = pAController.getArtista(); for (String s : possibilities) { String text = s.replaceAll(".*:", ""); listString.add(text); if (s.contains("---")) { ArtistaMdl artista = new ArtistaMdl(); artista.setNome(listString.get(1)); listArtista.add(artista); listString.clear(); } } String[] possibilities2 = new String[listArtista.size()]; for (int i = 0; i < listArtista.size(); i++) { possibilities2[i] = listArtista.get(i).getNome(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor,\r\n\t\t\tJComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT,\r\n\t\t\tJComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial,\r\n\t\t\tJTextField nomeArtista, JTextField nomeObra, JTextField txtNovaObra, JFormattedTextField dataAquisicao,\r\n\t\t\tJEditorPane descricaoObra, JLabel msgGravar, JLabel msgVazio, JFormattedTextField txtValor,\r\n\t\t\tJButton btnPesqArtist, JButton btnNovoArtista, JButton btnEditarArtista, JButton btnNovaCategoria,\r\n\t\t\tJButton btnEditarCategoria, JButton btnNovoMaterial, JButton btnEditarMaterial, JButton btnNovoSetor,\r\n\t\t\tJButton btnEditarSetor, JButton btnNovoSetorT, JButton btnEditarSetorT, JTextField idObra,\r\n\t\t\tJButton btnGravar) {\r\n\r\n\t\tthis.frmAcervo = frmAcervo;\r\n\t\tthis.btnGravar = btnGravar;\r\n\t\tthis.idObra = idObra;\r\n\t\tthis.obras = new ArrayList<ObraMdl>();\r\n\t\tthis.imagem = imagem;\r\n\t\tthis.lblValor = lblValor;\r\n\t\tthis.nomeArtista = nomeArtista;\r\n\t\tthis.txtNovaObra = txtNovaObra;\r\n\t\tthis.lblStatus = lblStatus;\r\n\t\tthis.nomeObra = nomeObra;\r\n\t\tthis.dataAquisicao = dataAquisicao;\r\n\t\tthis.edtDescricao = descricaoObra;\r\n\t\tthis.cbMaterial = cbMaterial;\r\n\t\tthis.cbObras = cbObras;\r\n\t\tthis.cbCategoria = cbCategoria;\r\n\t\tthis.cbSetor = cbSetor;\r\n\t\tthis.cbSetorT = cbSetorT;\r\n\t\tthis.cbStatus = cbStatus;\r\n\t\tthis.cbStatusT = cbStatusT;\r\n\t\tthis.btnPesqArtist = btnPesqArtist;\r\n\t\tthis.btnNovoArtista = btnNovoArtista;\r\n\t\tthis.btnEditarArtista = btnEditarArtista;\r\n\t\tthis.btnNovaCategoria = btnNovaCategoria;\r\n\t\tthis.btnEditarCategoria = btnEditarCategoria;\r\n\t\tthis.btnNovoMaterial = btnNovoMaterial;\r\n\t\tthis.btnEditarMaterial = btnEditarMaterial;\r\n\t\tthis.btnNovoSetor = btnNovoSetor;\r\n\t\tthis.btnEditarSetor = btnEditarSetor;\r\n\t\tthis.btnNovoSetorT = btnNovoSetorT;\r\n\t\tthis.btnEditarSetorT = btnEditarSetorT;\r\n\t\tthis.txtValor = txtValor;\r\n\t\tthis.msgGravar = msgGravar;\r\n\t\tthis.msgVazio = msgVazio;\r\n\t\tthis.caminhoImagem = \"\";\r\n\r\n\t\tlerAcervo();\r\n\t}", "public EmpresaEditView(String codigo, JDesktopPane index) {\n super(\"EDITAR EMPRESA\");\n index.add(this);\n initComponents();\n EmpresaDAO dao = new EmpresaDAO();\n EmpresaBEAN empresas = dao.get(codigo);\n txtNome.setText(empresas.getNome());\n txtEndereco.setText(empresas.getEndereco());\n txtBairro.setText(empresas.getBairro());\n txtCodigo.setText(empresas.getCodigo());\n txtCnpj.setText(empresas.getCnpj());\n txtTelefone.setText(empresas.getTelefone());\n txtLogradouro.setText(empresas.getLogradouro());\n selectEstado.setSelectedItem(empresas.getEstado());\n\n }", "public void pesquisarArtista() {\n\t\t\r\n\t\tpAController = new ArtistaCtrl();\r\n\t\tObject[] possibilities = pAController.getArtista();\r\n\t\tString s = (String) JOptionPane.showInputDialog(frmAcervo, \"Escolha o artista:\\n\", \"Pesquisar o Artista\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, possibilities, possibilities[0]);\r\n\t\tif (s != null && s.length() > 0) {\r\n\t\t\tnomeArtista.setText(s);\r\n\t\t\tartistaNome = s;\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "@FXML\r\n private void editar(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n\r\n //Se tem algum cliente selecionado\r\n if (selecionado != null) { //tem clienteonado\r\n //Pegar os dados do cliente e jogar nos campos do\r\n //formulario\r\n textFieldNumeroCliente.setText(\r\n String.valueOf( selecionado.getIdCliente() ) );\r\n textfieldNome.setText( selecionado.getNome() ); \r\n textFieldEmail.setText(selecionado.getEmail());\r\n textFieldCpf.setText(selecionado.getCpf());\r\n textFieldRg.setText(selecionado.getRg());\r\n textFieldRua.setText(selecionado.getRua());\r\n textFieldCidade.setText(selecionado.getCidade());\r\n textFieldBairro.setText(selecionado.getBairro());\r\n textFieldNumeroCasa.setText(selecionado.getNumeroCasa());\r\n textFieldDataDeNascimento.setValue(selecionado.getDataNascimemto());\r\n textFieldTelefone1.setText(selecionado.getTelefone1());\r\n textFieldTelefone2.setText(selecionado.getTelefone2());\r\n textFieldCep.setText(selecionado.getCep());\r\n \r\n \r\n \r\n }else{ //não tem cliente selecionado na tabela\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n\r\n }", "public ArtikelUebersichtController(AuftragController aC) {\r\n\t\tthis.mAC = aC;\r\n\t}", "public void activarVista(){\r\n\tvista.getVerVistaAutorObra().addActionListener(r->{\r\n\t\tCrearVista.crearVIstaAutorObra(con);\r\n\t\tvista.getTable().removeAll();\r\n\t\tlistaArte= new ArrayList<ObraArte>();\r\n\t\tlistaArte.removeAll(listaArte);\r\n\t\tlistaArte=SeleccionarDatosVista.getTodosRegistros(con);\r\n\t\ttableModelArteVista= new TableModelArteVista(listaArte, CABECERA);\r\n\t\tvista.getTable().setModel(tableModelArteVista);\r\n\t\tvista.getTxtBarraStatus().setText(\"VISTA CREADA. DICHA VISTA NO ES EDITABLE.\");\r\n\t\tvista.getButton_Modificar().setEnabled(false);\r\n\t\tvista.getButtonBorrar().setEnabled(false);\r\n\t\tvista.getMntmBorrarFila().setEnabled(false);\r\n\t\tvista.getButtonInsertarNuevo().setEnabled(false);\r\n\t\tvista.getLabelSize().setText(vista.getTable().getRowCount()+\" elementos.\");\r\n\t\t\r\n\t});\r\n}", "private intFrmArticulos() {\r\n initComponents();\r\n lista2 = p.listarArticulos2();\r\n artList.addAll(lista2);\r\n ArticulosTableFormat tblArt = new ArticulosTableFormat();\r\n EventTableModel<Articulos> artTableModel = new EventTableModel(artList, tblArt);\r\n jTable1.setModel(artTableModel);\r\n \r\n\r\n }", "public SubcategoriaController() {\n emf = EntityProvider.provider();\n System.out.println(\"creado\");\n FacesContext.getCurrentInstance().getViewRoot().setLocale(\n new Locale(\"es-Mx\"));\n this.subcategoria = new Subcategorias();\n this.categoria = new Categoria();\n //descripcion = \"nada\";\n nombresubcategoria = \"\";\n nombrecategoria = \"\";\n }", "public void abrirVentanaEditarLista(ActionEvent event){\n Parent root;\n try {\n //Se carga la ventana\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"editarListaSample.fxml\"));\n root =loader.load();\n Stage stage = new Stage();\n stage.setTitle(\"Lista\");\n stage.setScene(new Scene(root,600,450));\n //Se define la selecciono de lista y lo que se hara con ella\n ListaCompras listaSeleccionada = ListasComprasTabla.getSelectionModel().getSelectedItem();\n if (listaSeleccionada!=null) {\n EditarListaSample controllerEditarLista = loader.getController();\n controllerEditarLista.definirPantalla(listaSeleccionada);\n\n listaSeleccionada.getArticulos().forEach(articulo -> controllerEditarLista.anadirArticulos(articulo));\n\n\n //Se muestra la ventana\n stage.show();\n }else{\n System.out.println(\"No ha seleccionado nada\");\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public PanEditarCliente() {\r\n initComponents();\r\n }", "public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "abstract void botonEditar_actionPerformed(ActionEvent e);", "public Editar_Encargado() {\n \n initComponents();\n //Mandamos a llamar el metodo que carga el Grid;\n CargarTabla();\n\n }", "@FXML private void handleEditar(ActionEvent event) {\r\n \tmain.mostrarVistaEditarArchivosCompartidos();\r\n }", "public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "public void setController(Prompter aController) {\n controller = aController;\n }", "public ControllerNewCRV(newCRV fenetre, DAOProduit DaoProd, DAOCategorie DaoCat,DAOMedecin daoMed,DAOVisiteur daoVisi, DAOCompteRendu daoCRV) {\n\t\t\n\t\tthis.fenetre = fenetre;\n\t\tthis.daoCat = DaoCat;\n\t\tthis.daoProd = DaoProd;\n\t\tthis.daoMed = daoMed;\n\t\tthis.daoVisi = daoVisi;\n\t\tthis.daoCRV = daoCRV;\n\t\tfenetre.getBtnRetour().addActionListener(this);\n\t\tfenetre.getBtnValider().addActionListener(this);\n\t\tfenetre.getBtnAjouter().addActionListener(this);\n\t\tfenetre.getComboBox_cat().addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t //\n\t // Get the source of the component, which is our combo\n\t // box.\n\t //\n\t JComboBox comboBox = (JComboBox) event.getSource();\n\t String comboBoxname = comboBox.getName();\n\t \t\t\n\t \t\tswitch (comboBoxname) {\n\t \t\tcase \"selectionner\":\n\t \t\t\tviewProduit();\n\t \t\t\tbreak;\t\n\n\t \t\tdefault:\n\t \t\t\tbreak;\n\t \t\t}\t\t\n\t \n\n\t }\n\t });\n\t}", "private void jb_modificarActionPerformed(java.awt.event.ActionEvent evt) {\n String Arch = JOptionPane.showInputDialog(\"INGRESE LA CARPETA A MODIFICAR\");\n String NEWArch = JOptionPane.showInputDialog(\"INGRESE EL NUEVO NOMBRE DE LA CARPETA\");\n ini.ListaGen.modificarCAR(ListaGen.head, NombreUs, Arch, NEWArch);\n }", "public void actionPerformed(ActionEvent e) {\r\n\r\n\t\tif(e.getActionCommand().equals(\"Cerrar\")){\r\n\t\t\t\r\n\t\t\tventanaAcercade.dispose(); //Se cierra la clase VentanaAcercaDe\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tControllerVentanaPrincipal ControllerVentanaPrincipal=new ControllerVentanaPrincipal();\r\n\t\t}\r\n\t\t\r\n\t}", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public RequisitoController(Livro livro,MainController mainController) {\r\n\t\t name = livro.getName();\r\n\t\t barcode = livro.getBarcode();\r\n\t\t reservado = livro.isReservado();\r\n\t\t this.mainController = mainController;\r\n\t}", "public EditarDados(Produto dados) {\n \tthis.dados = dados;\n initComponents();\n setLocationRelativeTo(null);\n }", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tFrmCategoriaEdit frame = new FrmCategoriaEdit();\r\n\t\t\tframe.setVisible(true);\r\n\t\t\tframe.setLocation(0,0);\r\n\t\t}", "public void SalvarNovaArtista() {\n\n\t\tartistaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\n\n\t\tartistaRepository.SalvarNovoRegistro(this.artistaModel);\n\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\n\n\t\tartistaModel = null;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n labelCodigo = new javax.swing.JLabel();\n textCodigo = new javax.swing.JTextField();\n labelDescricao = new javax.swing.JLabel();\n textDescricao = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n tableCategorias = new javax.swing.JTable();\n buttonNovo = new javax.swing.JButton();\n buttonEditar = new javax.swing.JButton();\n buttonExcluir = new javax.swing.JButton();\n buttonSalvar = new javax.swing.JButton();\n buttonCancelar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n labelCodigo.setText(\"Código\");\n\n textCodigo.setEnabled(false);\n textCodigo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n textCodigoActionPerformed(evt);\n }\n });\n\n labelDescricao.setText(\"Descrição\");\n\n tableCategorias.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null},\n {null, null},\n {null, null},\n {null, null}\n },\n new String [] {\n \"Código\", \"Descrição\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tableCategorias.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tableCategoriasMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tableCategorias);\n if (tableCategorias.getColumnModel().getColumnCount() > 0) {\n tableCategorias.getColumnModel().getColumn(0).setMaxWidth(100);\n }\n\n buttonNovo.setText(\"Novo\");\n buttonNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonNovoActionPerformed(evt);\n }\n });\n\n buttonEditar.setText(\"Editar\");\n buttonEditar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonEditarActionPerformed(evt);\n }\n });\n\n buttonExcluir.setText(\"Excluir\");\n buttonExcluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonExcluirActionPerformed(evt);\n }\n });\n\n buttonSalvar.setText(\"Salvar\");\n buttonSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonSalvarActionPerformed(evt);\n }\n });\n\n buttonCancelar.setText(\"Cancelar\");\n buttonCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonCancelarActionPerformed(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(0, 153, 51));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Categorias\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(161, 161, 161)\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(buttonNovo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(buttonEditar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(buttonExcluir)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(buttonSalvar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonCancelar)\n .addContainerGap(25, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(labelCodigo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(textCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(labelDescricao)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(textDescricao)))\n .addContainerGap())))\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelCodigo)\n .addComponent(textCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelDescricao)\n .addComponent(textDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buttonNovo)\n .addComponent(buttonEditar)\n .addComponent(buttonExcluir)\n .addComponent(buttonSalvar)\n .addComponent(buttonCancelar))\n .addContainerGap())\n );\n\n pack();\n }", "public AgendaController(){\n setService(new JavaServiceFacade());\n setActividadRegistrar(new CalendarActivityClinica());\n setModel(new CalendarModelClinica());\n if(this.isPermisoAgendaPersonal()){\n setUsuarioAgenda(LoginController.getUsuarioLogged());\n }\n generarActividades();\n setListaPacientes(service.getPacienteFindAll());\n setListaUsuarios(service.getUsuarioFindAll());\n setMensajeRegistrar(\"\");\n setMensajeEditar(\"\");\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getActionCommand().equals(\"Agregar\")){\r\n\t\t\tboolean validacion =camposPrecios();\r\n\t\t\t\r\n\t\t\tif(validacion==true){\r\n\t\t\t\tagregarJTable();\r\n\t\t\t\tvc.habilitarBotones();\r\n\t\t\t\tvc.cantidadProductos();\r\n\t\t\t\tthis.vc.total();\r\n\t\t\t\tthis.vc.tipoPago();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else if(e.getActionCommand().equals(\"Eliminar Producto\")){\r\n\t\t\tvc.eliminacionFila();\r\n\t\t\tvc.cantidadProductos();\r\n\t\t\tthis.vc.total();\r\n\t\t\r\n\t\t}else if(e.getActionCommand().equals(\"Eliminar Todo\")){\r\n\t\t\tvc.borrarJtable(\"todo\");\r\n\t\t\tvc.cantidadProductos();\r\n\t\t\tthis.vc.total();\r\n\t\t}else if(e.getActionCommand().equals(\"Guardar\")){\r\n\t\t\tagregarCompra();\r\n\t\t\tvc.dispose();\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"static-access\")\r\n\tprivate void abrirTelaNovoArtista() {\r\n\t\t\r\n\t\tFrmArtistaCad newArtista = new FrmArtistaCad();\r\n\t\tnewArtista.setVisible(true);\r\n\t\tnewArtista.setDefaultCloseOperation(newArtista.DISPOSE_ON_CLOSE);\r\n\t\tnewArtista.setResizable(false);\r\n\t}", "public ControllerProtagonista() {\n\t}", "public ABTemaPropioController(){\n }", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "public void actionPerformed(ActionEvent ae) {\r\n //----Valida txt de Intentario---//\r\n validaTxt();\r\n //----Valida txt de Intentario---//\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere modificar este producto?\");\r\n if (i == 0) {\r\n modificaDato();\r\n DTM.setRowCount(0);\r\n llenartabla();\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabelProduto = new javax.swing.JLabel();\n jCampoProduto = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jCampoDescricao = new javax.swing.JTextField();\n jBotaoIncluir = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTabela = new javax.swing.JTable();\n jbotaoAlterar = new javax.swing.JButton();\n jbotaoApagar = new javax.swing.JButton();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setTitle(\"Cadastro\");\n\n jLabelProduto.setText(\"Nome do Produto:\");\n\n jLabel1.setText(\"Descrição:\");\n\n jBotaoIncluir.setText(\"Incluir\");\n jBotaoIncluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBotaoIncluirActionPerformed(evt);\n }\n });\n\n jTabela.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"ID\", \"Produto\", \"Descrição\"\n }\n ));\n jTabela.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTabelaMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTabela);\n\n jbotaoAlterar.setText(\"Alterar\");\n jbotaoAlterar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbotaoAlterarActionPerformed(evt);\n }\n });\n\n jbotaoApagar.setText(\"Apagar\");\n jbotaoApagar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbotaoApagarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabelProduto)\n .addComponent(jCampoProduto, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCampoDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jBotaoIncluir))\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbotaoAlterar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jbotaoApagar)\n .addContainerGap(18, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabelProduto)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCampoProduto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCampoDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jBotaoIncluir)\n .addComponent(jbotaoAlterar)\n .addComponent(jbotaoApagar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "@FXML\n\tpublic void handleEditar(MouseEvent event) {\n\t\tif(colNome.getCellData(jtvIngredienteTable.getSelectionModel().getSelectedIndex()) != null){\n\t\t\tingredienteService = new IngredienteService();\n\t\t\tIngrediente ingrediente = jtvIngredienteTable.getSelectionModel().getSelectedItem();\n\t\t\tScreenUtils.abrirNovaJanela(\"fxml/Compras/NovoIngrediente.fxml\", ingrediente);\n\t\t}else{\n\t\t\tScreenUtils.janelaInformação(spDialog, Internationalization.getMessage(\"header_erro3\"), Internationalization.getMessage(\"item_nao_selecionado\"), Internationalization.getMessage(\"erro_button2\"));\n//\t\t\tScreenUtils.janelaInformação(spDialog, \"Ops\", \"Por favor, selecione um item.\", \"Sem problemas\");\n\t\t}\n\t}", "FrameIntroGUI_botonEditar_actionAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}", "public PacienteController() {\n\t\t\n\t\tatualizarTela();\n\t\t}", "public DeleteFurniture(Controller controller) {\n controller_ = controller;\n initComponents();\n }", "private void iniciarDatos(Cliente pCliente, int pOpcionForm, FrmClienteLec pFrmPadre) {\n frmPadre = pFrmPadre;\n clienteActual = new Cliente();\n opcionForm = pOpcionForm;\n this.txtNombre.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtApellido.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtDui.setEditable(true); // colocar txtNombre que se pueda editar \n this.txtNumero.setEditable(true); // colocar txtNombre que se pueda editar \n switch (pOpcionForm) {\n case FormEscOpcion.CREAR:\n btnOk.setText(\"Nuevo\"); // modificar el texto del boton btnOk a \"Nuevo\" cuando la pOpcionForm sea CREAR\n this.btnOk.setMnemonic('N'); // modificar la tecla de atajo del boton btnOk a la letra N\n this.setTitle(\"Crear un nuevo Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n break;\n case FormEscOpcion.MODIFICAR:\n btnOk.setText(\"Modificar\"); // modificar el texto del boton btnOk a \"Modificar\" cuando la pOpcionForm sea MODIFICAR\n this.btnOk.setMnemonic('M'); // modificar la tecla de atajo del boton btnOk a la letra M\n this.setTitle(\"Modificar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n llenarControles(pCliente);\n break;\n case FormEscOpcion.ELIMINAR:\n btnOk.setText(\"Eliminar\");// modificar el texto del boton btnOk a \"Eliminar\" cuando la pOpcionForm sea ELIMINAR\n this.btnOk.setMnemonic('E'); // modificar la tecla de atajo del boton btnOk a la letra E\n this.setTitle(\"Eliminar el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n case FormEscOpcion.VER:\n btnOk.setText(\"Ver\"); // modificar el texto del boton btnOk a \"Ver\" cuando la pOpcionForm sea VER\n btnOk.setVisible(false); // ocultar el boton btnOk cuando pOpcionForm sea opcion VER\n this.setTitle(\"Ver el Cliente\"); // modificar el titulo de la pantalla de FrmRolEsc\n this.txtNombre.setEditable(false); // deshabilitar la caja de texto txtNombre\n this.txtApellido.setEditable(false);\n this.txtDui.setEditable(false);\n this.txtNumero.setEditable(false);\n llenarControles(pCliente);\n break;\n default:\n break;\n }\n }", "private void iniFormEditar()\r\n\t{\r\n\t\tthis.operacion = Variables.OPERACION_EDITAR;\r\n\t\t\r\n\t\t/*Verificamos que tenga permisos*/\r\n\t\tboolean permisoNuevoEditar = this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_NUEVO_EDITAR);\r\n\t\t\r\n\t\tif(permisoNuevoEditar){\r\n\t\t\t\r\n\t\t\tthis.btnEditar.setVisible(false);\r\n\t\t\tthis.conciliar.setVisible(true);\r\n\t\t\tthis.btnEliminar.setVisible(false);\r\n\t\t\tthis.conciliar.setCaption(\"Guardar\");\r\n\t\t\t\r\n\t\t\tthis.nroDocum.setEnabled(false);\r\n\t\t\tthis.fecDoc.setEnabled(true);\r\n\t\t\tthis.observaciones.setEnabled(true);\r\n\t\t\t\r\n\t\t\tthis.botones.setWidth(\"187\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\t/*Mostramos mensaje Sin permisos para operacion*/\r\n\t\t\tMensajes.mostrarMensajeError(Variables.USUSARIO_SIN_PERMISOS);\r\n\t\t}\r\n\t}", "@FXML\n public void alteraCidade(){\n \tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n \t\n \tif(sel!=null){\n \t\tsel.setNome(txtNome.getText());\n \t\tsel.setUf(txtUf.getSelectionModel().getSelectedItem());\n \t\tsel.altera(conn);\n \t\tattTblCidade();\n \t\tlimpaCidade();\n \t}else{\n \t\tMensagens.msgErro(\"FALHA\", \"Selecione uma cidade\");\n \t}\n }", "public void actionPerformed(ActionEvent e) {\r\n\r\n\t\tif(e.getActionCommand().equals(\"Menu\")){\r\n\t\t\t\r\n\t\t\tventanaConsultaJuegos.dispose(); //Se cierra la clase VentanaConsultaJuegos\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tControllerVentanaPrincipal controladorVentanaPrincipal=new ControllerVentanaPrincipal(); //Hace visible la ventanaPrincipal\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }", "private void editar(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 149 */ int idRecurso = 0;\n/* */ try {\n/* 151 */ idRecurso = Integer.parseInt(comms.request.getParameter(\"idRecurso\"));\n/* */ }\n/* 153 */ catch (Exception e) {}\n/* */ \n/* */ \n/* 156 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 157 */ PrcRecursoDTO reg = ob.cargarRegistro(idRecurso);\n/* 158 */ if (reg != null) {\n/* 159 */ this.pagHTML.getElementIdRecurso().setValue(\"\" + reg.getIdRecurso());\n/* 160 */ this.pagHTML.getElementDescripcionRecurso().setValue(\"\" + reg.getDescripcionRecurso());\n/* 161 */ this.pagHTML.getElementUsuarioInsercion().setValue(\"\" + reg.getUsuarioInsercion());\n/* 162 */ this.pagHTML.getElementFechaInsercion().setValue(\"\" + reg.getFechaInsercion());\n/* 163 */ this.pagHTML.getElementUsuarioModificacion().setValue(\"\" + reg.getUsuarioModificacion());\n/* 164 */ this.pagHTML.getElementFechaModificacion().setValue(\"\" + reg.getFechaModificacion());\n/* 165 */ HTMLSelectElement combo = this.pagHTML.getElementIdTipoRecurso();\n/* 166 */ comboMultivalores(combo, \"tipo_recurso\", \"\" + reg.getIdTipoRecurso(), true);\n/* */ \n/* 168 */ combo = this.pagHTML.getElementIdProcedimiento();\n/* 169 */ llenarCombo(combo, \"prc_procedimientos\", \"id_procedimiento\", \"objetivo\", \"1=1\", \"\" + reg.getIdProcedimiento(), true);\n/* */ \n/* 171 */ combo = this.pagHTML.getElementEstado();\n/* 172 */ comboMultivalores(combo, \"estado_activo_inactivo\", \"\" + reg.getEstado(), true);\n/* */ \n/* */ \n/* 175 */ this.pagHTML.getElementIdRecurso().setReadOnly(true);\n/* */ } \n/* 177 */ this.pagHTML.getElement_operacion().setValue(\"M\");\n/* 178 */ activarVista(\"nuevo\");\n/* */ }", "public static void editar(Categoria editarCategoria) {\n em.getTransaction().begin();\n em.merge(editarCategoria);\n em.getTransaction().commit();\n Tipo tipo = editarCategoria.getPerteneceTipo();\n tipo.getAgrupaCategorias().add(editarCategoria);\n// em.refresh(tipoOriginal);\n }", "public formArticulo() {\r\n initComponents();\r\n this.tableModel = (javax.swing.table.DefaultTableModel)tblArt.getModel();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jPanel1 = new javax.swing.JPanel();\r\n jScrollPane2 = new javax.swing.JScrollPane();\r\n tblArt = new javax.swing.JTable();\r\n btnCargar = new javax.swing.JButton();\r\n jPanel2 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n txtId = new javax.swing.JTextField();\r\n jLabel7 = new javax.swing.JLabel();\r\n jLabel8 = new javax.swing.JLabel();\r\n btnActualizar = new javax.swing.JButton();\r\n txtActPrecio = new javax.swing.JTextField();\r\n jLabel9 = new javax.swing.JLabel();\r\n txtActNombre = new javax.swing.JTextField();\r\n btnEliminar = new javax.swing.JButton();\r\n btnAgregar = new javax.swing.JButton();\r\n lblImagen = new javax.swing.JLabel();\r\n btnFin = new javax.swing.JButton();\r\n btnLimp = new javax.swing.JButton();\r\n cmbTipo = new javax.swing.JComboBox<>();\r\n jLabel2 = new javax.swing.JLabel();\r\n txtCant = new javax.swing.JTextField();\r\n\r\n setBackground(new java.awt.Color(51, 51, 51));\r\n setFocusable(false);\r\n setMaximumSize(new java.awt.Dimension(795, 492));\r\n\r\n jPanel1.setBackground(new java.awt.Color(51, 51, 51));\r\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Articulos\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 0, 11), new java.awt.Color(255, 255, 255))); // NOI18N\r\n\r\n tblArt.setBackground(new java.awt.Color(255, 255, 255));\r\n tblArt.setForeground(new java.awt.Color(0, 0, 0));\r\n tblArt.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n\r\n },\r\n new String [] {\r\n \"Id\", \"Nombre\", \"Tipo\", \"Precio\", \"Cantidad\"\r\n }\r\n ) {\r\n boolean[] canEdit = new boolean [] {\r\n false, false, false, false, false\r\n };\r\n\r\n public boolean isCellEditable(int rowIndex, int columnIndex) {\r\n return canEdit [columnIndex];\r\n }\r\n });\r\n tblArt.setToolTipText(\"\");\r\n jScrollPane2.setViewportView(tblArt);\r\n\r\n btnCargar.setBackground(new java.awt.Color(255, 255, 255));\r\n btnCargar.setForeground(new java.awt.Color(0, 0, 0));\r\n btnCargar.setText(\"Cargar\");\r\n btnCargar.setFocusable(false);\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 709, Short.MAX_VALUE)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(btnCargar)\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addContainerGap())\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(btnCargar)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap())\r\n );\r\n\r\n jPanel2.setBackground(new java.awt.Color(51, 51, 51));\r\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Actualizar Articulo\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 0, 11), new java.awt.Color(255, 255, 255))); // NOI18N\r\n\r\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel1.setText(\"Id\");\r\n\r\n txtId.setBackground(new java.awt.Color(0, 0, 51));\r\n txtId.setForeground(new java.awt.Color(255, 255, 255));\r\n\r\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel7.setText(\"Tipo\");\r\n\r\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel8.setText(\"Precio\");\r\n\r\n btnActualizar.setBackground(new java.awt.Color(255, 255, 255));\r\n btnActualizar.setForeground(new java.awt.Color(0, 0, 0));\r\n btnActualizar.setText(\"Actualizar\");\r\n btnActualizar.setFocusable(false);\r\n\r\n txtActPrecio.setBackground(new java.awt.Color(0, 0, 51));\r\n txtActPrecio.setForeground(new java.awt.Color(255, 255, 255));\r\n\r\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel9.setText(\"Nombre\");\r\n\r\n txtActNombre.setBackground(new java.awt.Color(0, 0, 51));\r\n txtActNombre.setForeground(new java.awt.Color(255, 255, 255));\r\n\r\n btnEliminar.setBackground(new java.awt.Color(255, 255, 255));\r\n btnEliminar.setForeground(new java.awt.Color(0, 0, 0));\r\n btnEliminar.setText(\"Eliminar\");\r\n btnEliminar.setFocusable(false);\r\n\r\n btnAgregar.setBackground(new java.awt.Color(255, 255, 255));\r\n btnAgregar.setForeground(new java.awt.Color(0, 0, 0));\r\n btnAgregar.setText(\"Agregar Articulo\");\r\n btnAgregar.setFocusable(false);\r\n\r\n lblImagen.setBackground(new java.awt.Color(51, 51, 51));\r\n lblImagen.setForeground(new java.awt.Color(255, 255, 255));\r\n lblImagen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n lblImagen.setText(\"+\");\r\n lblImagen.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 51)));\r\n lblImagen.setMaximumSize(new java.awt.Dimension(258, 192));\r\n lblImagen.setMinimumSize(new java.awt.Dimension(258, 192));\r\n lblImagen.setOpaque(true);\r\n\r\n btnFin.setBackground(new java.awt.Color(255, 255, 255));\r\n btnFin.setForeground(new java.awt.Color(0, 0, 0));\r\n btnFin.setText(\"Finalizar\");\r\n btnFin.setFocusable(false);\r\n\r\n btnLimp.setBackground(new java.awt.Color(255, 255, 255));\r\n btnLimp.setForeground(new java.awt.Color(0, 0, 0));\r\n btnLimp.setText(\"Limpiar\");\r\n btnLimp.setFocusable(false);\r\n\r\n cmbTipo.setBackground(new java.awt.Color(255, 255, 255));\r\n cmbTipo.setForeground(new java.awt.Color(0, 0, 0));\r\n cmbTipo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"PLATILLO\", \"BEBIDA\", \"MONTAJE\", \"MESA\", \"SILLA\" }));\r\n cmbTipo.setFocusable(false);\r\n\r\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\r\n jLabel2.setText(\"Cantidad\");\r\n\r\n txtCant.setBackground(new java.awt.Color(0, 0, 51));\r\n txtCant.setForeground(new java.awt.Color(255, 255, 255));\r\n\r\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\r\n jPanel2.setLayout(jPanel2Layout);\r\n jPanel2Layout.setHorizontalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(txtActPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(cmbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(txtCant, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(txtActNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txtId, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(lblImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(14, 14, 14))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnAgregar)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnActualizar)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnEliminar)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnLimp)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnFin)\r\n .addGap(25, 25, 25))\r\n );\r\n jPanel2Layout.setVerticalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(lblImagen, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txtActNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(cmbTipo, 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(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(txtActPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(txtCant, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(0, 0, Short.MAX_VALUE)))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnEliminar)\r\n .addComponent(btnAgregar)\r\n .addComponent(btnFin)\r\n .addComponent(btnActualizar)\r\n .addComponent(btnLimp))\r\n .addContainerGap())\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n this.setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(137, 137, 137)\r\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap(40, 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()\r\n .addComponent(jPanel1, 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(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n }", "public PanelAdministrarMarcas() {\n initComponents();\n cargarTabla();\n }", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "public AdicionarProdutoCarrinhoVIew() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public AlterarCategoria() {\n initComponents();\n }", "protected void do_btnModificar_actionPerformed(ActionEvent e) {\t\n\t\n\t\tint intIdSistemaEspecificoSeleccionado = (Integer)idSistemaEspecificoSeleccionado;\n\t\t//Asi solo funciona si se ha seleccionado una fila\t\t\t\n\t\tif ( intIdSistemaEspecificoSeleccionado> 0){\n\t\t\tboolean bl1 = listUniqueIdVerModificarSistemaEspecifico.add(intIdSistemaEspecificoSeleccionado);\t\n\t\t\tif (bl1){\n\t\t\t\t//Se le pasa el cbFabricante, para que al actualizar la tabla desde miModificarXXX, lo haga desde el comboBox que el usuario a escogido\n\t\t\t\tModificarSistemaEspecifico miModificarSistemaEspecifico = new ModificarSistemaEspecifico(objetoSistemaEspecifico, miVerModificarController, miConsultaController,miIdSistemaEspecifico,cbFabricante, cbModelo, cbSerie, listUniqueIdVerModificarSistemaEspecifico );\n\t\t\t\tmiVerModificarController.getActualizarElemento().addPropertyChangeListener(PROP_ACTUALIZAR_SISTEMA_ESPECIFICO, miModificarSistemaEspecifico);\n\t\t\t\tidSistemaEspecificoSeleccionado =0;\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n ModificaInventario = new javax.swing.JDialog();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n BtnModificarM = new javax.swing.JButton();\n BtnAtrasM = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n TxtProducto = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n TxtCantidad = new javax.swing.JComboBox();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n TablaInventario = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n BtnAtras = new javax.swing.JButton();\n BtnElimiar = new javax.swing.JButton();\n BtnModificarI = new javax.swing.JButton();\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jLabel2.setText(\"Nombre del Producto:\");\n\n BtnModificarM.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/Modify.png\"))); // NOI18N\n BtnModificarM.setText(\"Modificar\");\n BtnModificarM.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnModificarMActionPerformed(evt);\n }\n });\n BtnModificarM.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n BtnModificarMKeyPressed(evt);\n }\n });\n\n BtnAtrasM.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/Back.png\"))); // NOI18N\n BtnAtrasM.setText(\"Atras\");\n BtnAtrasM.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnAtrasMActionPerformed(evt);\n }\n });\n BtnAtrasM.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n BtnAtrasMKeyPressed(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Narkisim\", 0, 18)); // NOI18N\n jLabel9.setText(\"System LOMAC\");\n\n TxtProducto.setEditable(false);\n TxtProducto.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n TxtProductoActionPerformed(evt);\n }\n });\n TxtProducto.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n TxtProductoKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n TxtProductoKeyTyped(evt);\n }\n });\n\n jLabel3.setText(\"Cant\");\n\n TxtCantidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\", \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", \"29\", \"30\" }));\n TxtCantidad.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n TxtCantidadKeyPressed(evt);\n }\n });\n\n jLabel4.setText(\"Modificar Cantidad de Inventario\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(141, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(TxtCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(135, 135, 135))))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(BtnModificarM)))))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(TxtProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(51, 51, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, Short.MAX_VALUE)\n .addComponent(BtnAtrasM)\n .addGap(22, 22, 22)))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(TxtCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(89, 89, 89))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel9)\n .addGap(43, 43, 43)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(TxtProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(BtnModificarM, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(BtnAtrasM))\n .addGap(37, 37, 37)))\n );\n\n javax.swing.GroupLayout ModificaInventarioLayout = new javax.swing.GroupLayout(ModificaInventario.getContentPane());\n ModificaInventario.getContentPane().setLayout(ModificaInventarioLayout);\n ModificaInventarioLayout.setHorizontalGroup(\n ModificaInventarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n ModificaInventarioLayout.setVerticalGroup(\n ModificaInventarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ModificaInventarioLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 11, Short.MAX_VALUE))\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jLabel6.setFont(new java.awt.Font(\"Lucida Calligraphy\", 0, 18)); // NOI18N\n jLabel6.setText(\"RESTAURANT O.L.A.M\");\n\n TablaInventario.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n jScrollPane2.setViewportView(TablaInventario);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Inventario\");\n\n BtnAtras.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/Back.png\"))); // NOI18N\n BtnAtras.setText(\"Atras\");\n BtnAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnAtrasActionPerformed(evt);\n }\n });\n BtnAtras.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n BtnAtrasKeyPressed(evt);\n }\n });\n\n BtnElimiar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/Delete.png\"))); // NOI18N\n BtnElimiar.setText(\"Eliminar\");\n BtnElimiar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnElimiarActionPerformed(evt);\n }\n });\n BtnElimiar.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n BtnElimiarKeyPressed(evt);\n }\n });\n\n BtnModificarI.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/Modify.png\"))); // NOI18N\n BtnModificarI.setText(\"Modificar\");\n BtnModificarI.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnModificarIActionPerformed(evt);\n }\n });\n BtnModificarI.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n BtnModificarIKeyPressed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 403, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel6))))\n .addGroup(layout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(BtnElimiar)\n .addGap(34, 34, 34)\n .addComponent(BtnModificarI)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(BtnAtras)))\n .addContainerGap(24, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BtnAtras)\n .addComponent(BtnElimiar)\n .addComponent(BtnModificarI))\n .addGap(13, 13, 13))\n );\n\n pack();\n }", "public ServicoDoSistemaView() {\n initComponents();\n this.removidos = new ArrayList<ServicoDoSistema>();\n try {\n this.c = new ServicoDoSistemaController();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"Houve erros: \"\n + ex.getMessage());\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroProdutoEstoque cadastroprodutoestoque;\n\t\t\t\ttry {\n\t\t\t\t\tcadastroprodutoestoque = new CadastroProdutoEstoque();\n\t\t\t\t\tcadastroprodutoestoque.setLocationRelativeTo(null);\n\t\t\t\t\tcadastroprodutoestoque.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastroprodutoestoque.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public SpedContribuicoesGrid(SpedContribuicoesGridController controller) {\n initComponents();\n\n this.controller = controller;\n\n ContadorGridController contadorController = new ContadorGridController();\n gridControlContador.setController(contadorController);\n gridControlContador.setGridDataLocator(contadorController);\n\n comboVersaoSped.addItem(\"003 - Versão 2.01A ADE Cofis nº 20/2012\");\n comboVersaoSped.addItem(\"002 - Versão 2.00 ADE Cofis nº 20/2012\");\n comboVersaoSped.addItem(\"002 - Versão 1.01 ADE Cofis nº 34/2010, atualizado pleo ADE Cofis nº 37/2010\");\n comboVersaoSped.addItem(\"001 - Versão 1.00 ADE Cofis nº 31/2010\");\n\n comboTipoEscrituracao.addItem(\"0 - Original\");\n comboTipoEscrituracao.addItem(\"1 - Retificadora\");\n\n }", "@FXML\n public void editSet(MouseEvent e) {\n AnchorPane root = null;\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/learn_update.fxml\"));\n try {\n root = loader.load();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n LearnUpdateController controller = loader.getController();\n controller.initData(txtTitle.getText(), rootController, learnController, apnLearn);\n rootController.setActivity(root);\n root.requestFocus();\n }", "void autofinanciarPoliza(AutofinanciarPolizaCancelCommand datosPoliza);", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "public void fecharConta() {\n\t\tcliente.setConta(new Conta());\r\n\t\tRepositorioCliente repositorioCliente = new FabricaRepositorio().getRepCliente();\r\n\t\trepositorioCliente.editar((ClienteIndividual)cliente);\r\n//\t\tGerenciadorContaImpl contaImpl = new GerenciadorContaImpl();\r\n//\t\ttry {\r\n//\t\t\tcontaImpl.fecharConta(cliente);\r\n//\t\t} catch (OperacaoInvalidaException e) {\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t}", "public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }", "public String editarRutina(Rutina tp) {\n\t\t//newRutina = ts;\n\t\tvEditing = true;\n\t\tvTitulo = \"EDITAR\";\n\t\treturn \"nueva-rutina?faces-redirect=true&id=\"+tp.getIdRutina();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n txtCod = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n txtNom = new javax.swing.JTextField();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n txtPrecio = new javax.swing.JTextField();\r\n txtKg = new javax.swing.JTextField();\r\n btnGuardar = new javax.swing.JButton();\r\n btnBorrarArt = new javax.swing.JButton();\r\n jLabel13 = new javax.swing.JLabel();\r\n jScrollPane2 = new javax.swing.JScrollPane();\r\n jTable1 = new javax.swing.JTable();\r\n btnActualizarArt = new javax.swing.JButton();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n setTitle(\"Mantenimiento de Artículos\");\r\n\r\n jLabel1.setText(\"Codigo:\");\r\n\r\n jLabel2.setText(\"Nombre:\");\r\n\r\n jLabel3.setText(\"Precio:\");\r\n\r\n jLabel4.setText(\"Kgs:\");\r\n\r\n btnGuardar.setText(\"Guardar\");\r\n btnGuardar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnGuardarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnBorrarArt.setText(\"Borrar Artículo\");\r\n btnBorrarArt.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnBorrarArtActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/logo_acodike.gif\"))); // NOI18N\r\n jLabel13.setText(\"jLabel13\");\r\n\r\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\r\n new Object [][] {\r\n {null, null, null, null},\r\n {null, null, null, null},\r\n {null, null, null, null},\r\n {null, null, null, null}\r\n },\r\n new String [] {\r\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\r\n }\r\n ));\r\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jTable1MouseClicked(evt);\r\n }\r\n });\r\n jScrollPane2.setViewportView(jTable1);\r\n\r\n btnActualizarArt.setText(\"Actualizar\");\r\n btnActualizarArt.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnActualizarArtActionPerformed(evt);\r\n }\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()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jLabel4)\r\n .addComponent(jLabel3)\r\n .addComponent(jLabel1)\r\n .addComponent(jLabel2))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(txtCod, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(txtPrecio, javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(txtKg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(btnGuardar))\r\n .addComponent(txtNom, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 123, Short.MAX_VALUE)\r\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnActualizarArt))))\r\n .addComponent(btnBorrarArt))\r\n .addContainerGap())\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(txtCod, 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.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(txtNom, 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.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(txtPrecio, 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.BASELINE)\r\n .addComponent(jLabel4)\r\n .addComponent(txtKg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(btnGuardar)\r\n .addComponent(btnActualizarArt)))\r\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(btnBorrarArt)\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }", "public ePortfolioEditController(ePortfolioMakerView initUI) {\n\tui = initUI;\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroProdutoEstoque cadastroprodutoestoque;\n\t\t\t\ttry {\n\t\t\t\t\tcadastroprodutoestoque = new CadastroProdutoEstoque();\n\t\t\t\t\tcadastroprodutoestoque.setLocationRelativeTo(null);\n\t\t\t\t\tcadastroprodutoestoque.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastroprodutoestoque.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "public PlanoContasConsulta() {\r\n setTitle(\"Cadastro de Plano Contas\");\r\n setLayout(new BorderLayout());\r\n pBotoes = new JPanel(new FlowLayout());\r\n tabela = new JTable(new PlanoContasTableModel());\r\n btExcluir = new JButton(\"Excluir\");\r\n btAlterar = new JButton(\"Alterar\");\r\n btIncluir = new JButton(\"Incluir\");\r\n btPesquisar = new JButton(\"Pesquisar\");\r\n lFiltro = new JLabel(\"Filtar\");\r\n tfFiltro = new JTextField(30);\r\n\r\n add(pBotoes, BorderLayout.NORTH);\r\n add(new JScrollPane(tabela), BorderLayout.CENTER);\r\n\r\n pBotoes.add(lFiltro);\r\n pBotoes.add(tfFiltro);\r\n pBotoes.add(btPesquisar);\r\n pBotoes.add(btIncluir);\r\n pBotoes.add(btAlterar);\r\n pBotoes.add(btExcluir);\r\n \r\n btPesquisar.addActionListener(this);\r\n btIncluir.addActionListener(this);\r\n btAlterar.addActionListener(this);\r\n btExcluir.addActionListener(this);\r\n \r\n \r\n\r\n pack();\r\n setVisible(true);\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }", "public VistaProductos() {\n setUndecorated(true);\n initComponents();\n ValidadSoloNumeros(TextCodProduct);\n ValidadCaracteres(TextDescripcion);\n ValidadSoloNumeros(TextPrecio);\n ValidadSoloNumeros(TextCostoproduc);\n ValidadSoloNumeros(txtIvap);\n cn = Conexion.getConn();\n cargar();\n\n LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(cc.listaProvee().toArray()));\n\n obj = ControllerSql.getInstancia();\n proveedores = cc.listaProvee();\n // LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(proveedores.toArray()));\n LitsadeProovedores.setSelectedIndex(-1);\n }", "public VistaCrearPedidoAbonado() {\n initComponents();\n errorLabel.setVisible(false);\n controlador = new CtrlVistaCrearPedidoAbonado(this);\n }", "public VistaArticulosBajas() {\r\n\t\tsetTitle(\"Baja_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 367, 208);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Baja Artículo\r\n\t\tdlgConfBaja.setLayout(new FlowLayout());\r\n\t\tdlgConfBaja.add(lblConfBaja);\r\n\t\tdlgConfBaja.add(btnConfBajaSi);\r\n\t\tdlgConfBaja.add(btnConfBajaNo);\r\n\t\tdlgConfBaja.setSize(200, 150);\r\n\t\tdlgConfBaja.setLocationRelativeTo(null);\r\n\t\tdlgConfBaja.addWindowListener(this);\r\n\t\tbtnConfBajaSi.addActionListener(this);\r\n\t\tbtnConfBajaNo.addActionListener(this);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Escoge un Art\\u00EDculo\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblNewLabel.setBounds(10, 23, 147, 23);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\r\n\t\tchcArticuloBajas = new Choice();\r\n\t\tchcArticuloBajas.setBounds(10, 46, 169, 20);\r\n\t\tcontentPane.add(chcArticuloBajas);\r\n\t\t// Mostrar los artículos en el choice chcArticuloBajas conectando con la BD\r\n\t\tResultSet articulos = null;\r\n\t\tConnection conArticulo = null;\r\n\t\tconArticulo = modelo.conectar();\r\n\t\tarticulos = modelo.consultaArticulos(conArticulo);\r\n\t\ttry {\r\n\t\t\tString id;\r\n\t\t\tString descripcion;\r\n\t\t\twhile(articulos.next()) {\r\n\t\t\t\tid = articulos.getInt(\"idArticulos\")+\"\";\r\n\t\t\t\tdescripcion = articulos.getString(\"descripcionArticulo\");\r\n\t\t\t\tchcArticuloBajas.add(id+\" - \"+descripcion);\r\n\t\t\t}\r\n\t\t\tmodelo.desconectar(conArticulo);\r\n\t\t}catch(SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Botón Volver. Acción --> vuelve al Menú Principal\r\n\t\tJButton btnVolverBajas = new JButton(\"VOLVER\");\r\n\t\tbtnVolverBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverBajas.setBounds(252, 46, 89, 23);\r\n\t\tcontentPane.add(btnVolverBajas);\r\n\r\n\t\t// Botón Eliminar. Acción --> abre el Diálogo Confirmar_Baja \r\n\t\tJButton btnEliminarBajas = new JButton(\"ELIMINAR\");\r\n\t\tbtnEliminarBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdlgConfBaja.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnEliminarBajas.setBounds(252, 126, 89, 23);\r\n\t\tcontentPane.add(btnEliminarBajas);\r\n\r\n\t}", "@FXML\n private void boton_nuevoPuesto(ActionEvent event) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"Views/Puestos/puestos_nuevo.fxml\"));\n Parent root = fxmlLoader.load(); \n Puestos_nuevoController puestosNuevo = fxmlLoader.getController();\n\n \n puestosNuevo.setIdArea(idArea);\n puestosNuevo.setNombreArea(nombreArea);\n \n Scene scene = new Scene(root);\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.setScene(scene);\n stage.show();\n }", "public agendaVentana() {\n initComponents();\n setIconImage(new ImageIcon(this.getClass().getResource(\"/IMG/maqui.png\")).getImage());\n citasDAO = new CitasDAO();\n clienteDAO = new ClienteDAO();\n loadmodel();\n loadClientesCombo();\n loadClientesComboA();\n jTabbedPane1.setEnabledAt(2, false);\n\n }", "@Autowired\n\tpublic ContaController(ContaDAO contaDAO) {\n\t\tsuper();\n\t\tthis.contaDAO = contaDAO;\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == menu.MenusCliente) {\n vista.setVisible(true);\n }\n if (e.getSource() == vista.btnGuardar) {\n this.insertar();\n }\n if (e.getSource() == vista.btnEliminar) {\n JOptionPane.showMessageDialog(null, \"Hacer doble clic en el registro que desea eliminar\");\n }\n if (e.getSource() == vista.btnEditar) {\n this.modi();\n }\n if (e.getSource() == menu.jmiClientesR) {\n this.reporte();\n }\n }", "public VendaView(int idVenda) throws SQLException {\n initComponents();\n\n jTextFieldIDFuncionario.setEnabled(false);\n jTextFieldNomeCliente.setEnabled(false);\n jTextFieldNomeFuncionario.setEnabled(false);\n// jTextFieldNotaFiscal.setEnabled(false);\n jTextFieldNumeroParcelas.setEnabled(false);\n jTextFieldValorVenda.setEnabled(false);\n jFormattedTextDataVenda.setEnabled(false);\n jTextFieldIDCliente.setEnabled(false);\n int idVenda1 = idVenda;\n buscarPressedEnter();\n\n if (idVenda != -1) {\n textFieldIDVenda.setText(\"\" + idVenda1);\n\n Connection connection;\n try {\n connection = new ConnectionFactory().getConnection();\n\n VendaDAO vendaDAO = new VendaDAO(connection);\n modeloVenda1 = vendaDAO.buscaPorId(Long.parseLong(String.valueOf(idVenda1)));\n\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ClienteDAO clienteDAO = new ClienteDAO(connection);\n ParcelaDAO parcelasDao = new ParcelaDAO(connection);\n List<ModeloParcela> modeloParcelas = new ArrayList<ModeloParcela>();\n\n if (null == pedidoDAO.buscaPorVenda(Integer.parseInt(String.valueOf(modeloVenda1.getId())))) {\n\n } else {\n modeloPedido1 = pedidoDAO.buscaPorVenda(Integer.parseInt(String.valueOf(modeloVenda1.getId())));\n\n idPedidoClasse = modeloPedido1.getId();\n viewProdutoPedidos = pedidoDAO.buscarPedidoproduto(Integer.parseInt(String.valueOf(idPedidoClasse)));\n modeloParcelas = parcelasDao.listaPorIdVenda(modeloVenda1.getId());\n listarParcelas(modeloParcelas);\n PreencherTabela();\n PreencherTabela2();\n }\n\n FuncionarioDAO funcionarioDAO = new FuncionarioDAO(connection);\n ModeloFuncionario modeloFuncionario = new ModeloFuncionario();\n\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n ModeloCliente modeloCliente = new ModeloCliente();\n modeloFuncionario = funcionarioDAO.buscaPorId(modeloVenda1.getIdfuncionario());\n modeloCliente = clienteDAO.buscaPorId(modeloVenda1.getIdcliente());\n System.out.println(modeloVenda1.getIdcliente());\n jTextFieldIDFuncionario.setText(\"\" + modeloFuncionario.getId());\n jTextFieldNomeFuncionario.setText(modeloFuncionario.getNome());\n jFormattedTextDataVenda.setText(format.format(modeloVenda1.getDataVenda()));\n\n jTextFieldIDCliente.setText(\"\" + modeloCliente.getId());\n jTextFieldNomeCliente.setText(\"\" + modeloCliente.getNome());\n jTextFieldNotaFiscal.setText(modeloVenda1.getNotaFiscal());\n\n jTextFieldValorVenda.setText(\"\" + modeloVenda1.getValorVenda());\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(rootPane, ex);\n Logger.getLogger(VendaView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }", "public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }", "private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed\n boolean respuesta = false;\n int id =Integer.parseInt(this.txtCodigoPlatDia.getText());\n String valor = this.txtValueModified.getText();\n String atributo = \"\";\n switch (this.cbxTypeModified.getSelectedIndex()) {\n case 1: atributo = \"PDIA_NOMBRE\"; break;\n case 2: atributo = \"PDIA_DESCRIPCION\"; break;\n case 3: atributo = \"PDIA_ENTRADA\"; break;\n case 4: atributo = \"PDIA_PRINCIPIO\"; break;\n case 5: atributo = \"PDIA_BEBIDA\"; break;\n case 6: atributo = \"PDIA_CARNE\"; break;\n case 7: atributo = \"PDIA_PRECIO\"; break;\n default: break;\n }\n if(atributo.equals(\"PDIA_PRECIO\")){\n if(!Utilities.isNumeric(valor)){\n JOptionPane.showMessageDialog(null, \"el precio debe contener valores numericos, VERIFIQUE\");\n return;\n }\n }\n try {\n respuesta = this.servicioRestaurante.updatePlatoDia(id, atributo, valor);\n if(!respuesta){\n JOptionPane.showMessageDialog(null, \"verifique los datos, ITEM NO ENCONTRADO\");\n }else{\n this.listar();\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ha fallado el servicio, intentelo de nuevo\");\n }\n this.txtCodigoPlatDia.setText(null);\n this.cbxTypeModified.setSelectedIndex(0);\n this.txtValueModified.setText(null);\n this.btnActualizar.setEnabled(false);\n }", "public jdCadastraPedido(java.awt.Frame parent, boolean modal) {\r\n// super(parent, modal);\r\n initComponents();\r\n pedCont = new PedidoController();\r\n clCont = new ClienteController();\r\n orcCont = new OrcamentoController();\r\n usrCont = new UsuarioController();\r\n\r\n init();\r\n\r\n List<ClienteVO> clCombo = clCont.getAll();\r\n DefaultComboBoxModel modelo = (DefaultComboBoxModel) cbClientes.getModel();\r\n modelo.removeAllElements();\r\n for (ClienteVO cl : clCombo) {\r\n modelo.addElement(cl.getNome());\r\n }\r\n\r\n List<OrcamentoVO> orcCombo = orcCont.getAll();\r\n DefaultComboBoxModel modPrd = (DefaultComboBoxModel) cbOrcamento.getModel();\r\n modPrd.removeAllElements();\r\n for (OrcamentoVO orc : orcCombo) {\r\n modPrd.addElement(orc.getId() + \" - \" + orc.getDataEmissao().toString() + \" - \" + clCont.getById(orc.getCliente()).getNome());\r\n }\r\n\r\n }", "public void prepareOferente(ActionEvent event) {\n if (this.getSelected() != null && oferenteController.getSelected() == null) {\n oferenteController.setSelected(this.getSelected().getOferente());\n }\n }", "public void modificar() {\r\n\r\n ModificaProducto modprodu = new ModificaProducto(vista, true);//C.P.M instanciamos la forma de modificar producto en modo modal y le mandamos al vista \r\n int Opcion = vista.jTbuscar.getSelectedRow();//C.P.M obtenemos los datos de la fila la cual este seleccionada\r\n modprodu.id = vista.jTbuscar.getValueAt(Opcion, 0).toString();//C.P.M se los mandamos a la forma dentro de sus campos\r\n modprodu.jTbcodigobarras.setText(vista.jTbuscar.getValueAt(Opcion, 1).toString());\r\n modprodu.jTproducto.setText(vista.jTbuscar.getValueAt(Opcion, 2).toString());\r\n modprodu.jTbprecio.setText(vista.jTbuscar.getValueAt(Opcion, 3).toString());\r\n modprodu.jTbcaducidad.setText(vista.jTbuscar.getValueAt(Opcion, 4).toString());\r\n modprodu.jTbexistencia.setText(vista.jTbuscar.getValueAt(Opcion, 5).toString());\r\n modprodu.jTbdescripcion2.setText(vista.jTbuscar.getValueAt(Opcion, 6).toString());\r\n modprodu.jTbespecificaciones.setText(vista.jTbuscar.getValueAt(Opcion, 7).toString());\r\n modprodu.setLocationRelativeTo(vista);//C.P.M centramos la forma a la vista\r\n modprodu.setVisible(true);//C.P.M y la asemos visible\r\n }", "private void jMenuItemControlAsistenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemControlAsistenciaActionPerformed\n JDialogControlAsistencia vca = new JDialogControlAsistencia(this, modal, listaDeportes);\n LOG.info(\"Launching JDialogControlAsistencia...\");\n vca.setLocationRelativeTo(this);\n vca.setVisible(true);\n}", "@FXML\n private void handleBtnNovoAction (ActionEvent event) { \n \n //passa um ModelCliente vazio para limpar os campos\n setModelProdutosBinds( new ModelClientes() );\n \n //Retira o bind do modelProdutos com esse ModelProduto vazio\n setModelProdutosBinds(null);\n \n //Comfiguração dos componentes da tela\n edtNome.requestFocus();\n \n //No próximo click o botao executa a ação \"Cancelar\"\n btnNovo.setOnAction((e) -> { handleBtnCancelarAction(e); });\n }", "@Override\n public void actionPerformed(ActionEvent ae) {\n String command = ae.getActionCommand();\n switch (command) {\n case \"Conferma\":\n if (convalidaCampi()) {\n salvaPrescrizione(creaPrescrizione());\n Utility.chiudiDialog(ae);\n }\n break;\n case \"Annulla\":\n Utility.chiudiDialog(ae);\n break;\n }\n }", "public BuscarProducto(AgregandoProductos ventanaPadre) {\n this.daoProductos = new ProductoJpaController();\n this.ventanaPadre = ventanaPadre;\n initComponents();\n this.setupComponents();\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\tif (e.getSource() == barra.btnuevo\r\n\t\t\t\t\t|| e.getSource() == barra.btmodifi) {\r\n\t\t\t\tif (e.getSource() == barra.btnuevo) {\r\n\t\t\t\t\ttfrif.setText(\"\");\r\n\t\t\t\t\ttfrazon.setText(\"\");\r\n\t\t\t\t\ttfdireccion.setText(\"\");\r\n\t\t\t\t\ttftelefono.setText(\"\");\r\n\t\t\t\t\ttfcorreo.setText(\"\");\r\n\t\t\t\t\tcbCiudad.setSelectedItem(-1);\r\n\t\t\t\t\tultimo = actual;\r\n\t\t\t\t\tactual = new Facturacion();\r\n\t\t\t\t}\r\n\t\t\t\tbarra.Edicion();\r\n\t\t\t\ttfrif.grabFocus();\r\n\r\n\t\t\t\ttfrif.setEditable(true);\r\n\t\t\t\ttfrazon.setEditable(true);\r\n\t\t\t\ttfdireccion.setEditable(true);\r\n\t\t\t\ttftelefono.setEditable(true);\r\n\t\t\t\ttfcorreo.setEditable(true);\r\n\t\t\t\tcbCiudad.setEditable(true);\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btgrabar) {\r\n\t\t\t\tif (tfrif.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfrazon.getText().trim().equals(\"\")\r\n\t\t\t\t\t\t|| tfdireccion.getText().trim().equals(\"\")) {\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\t\"Debe completar todos los Datos del Persona\\nIngreso de Nuevo Persona\");\r\n\t\t\t\t\ttfrif.grabFocus();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactual.setRif(tfrif.getText().trim());\r\n\t\t\t\t\tactual.setRazon(tfrazon.getText().trim());\r\n\t\t\t\t\tactual.setDireccion(tfdireccion.getText().trim());\r\n\t\t\t\t\tactual.setTelefono(tftelefono.getText().trim());\r\n\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setFacOficina(principal.ofic);\r\n\t\t\t\t\tif (cbCiudad.getSelectedIndex()>-1)\r\n\t\t\t\t\t\tactual.setFacCiudad(ModCiudad.getElemento(cbCiudad.getSelectedIndex()));\r\n\t\t\t\t\tactual.setCorreo(tfcorreo.getText().trim());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tsesion.saveOrUpdate(actual);\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btGrabar!!!Errores de Base de Datos!!!\\n\" + e2\r\n\t\t\t\t\t\t\t\t\t\t+ \" \", \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if (pac!=null) { JOptionPane.showMessageDialog(new\r\n\t\t\t\t\t * JFrame(),\r\n\t\t\t\t\t * \"Número de Cédula ya existe!!!\",\"Database Error!\"\r\n\t\t\t\t\t * ,JOptionPane.ERROR_MESSAGE); tfcedula.grabFocus(); }\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbarra.Consulta();\r\n\t\t\t\t\tif (cierra)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tAdminFactura.setFacturacion(actual);\r\n\t\t\t\t\t\tcerrarventana();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// refreshPersona();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btcancel) {\r\n\t\t\t\tif (cierra)\r\n\t\t\t\t{\r\n//\t\t\t\t\tAdminFactura.setFacturacion(actual); corregido el 12/01/2012 estaba dando error, ya que si cancela la ventana no debe grabar nada en AdminFactura.setFacturacion()\r\n\t\t\t\t\tcerrarventana();\r\n\t\t\t\t}\r\n\t\t\t\tif (buscando) {\r\n\t\t\t \tlbbuscando.setText(\"\");\r\n\t\t\t\t\tbuscando = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (actual.equals(new Persona())) actual = ultimo;\r\n\t\t\t\tbarra.Consulta();\r\n\t\t\t\trefreshFacturacion();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btbuscar) {\r\n\t\t\t\tbarrabusca();\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btanteri) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero>0?--puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo < :text order by codigo desc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btAnterior!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsiguie) {\r\n\t\t\t\tif (buscando){\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero<busqueda.size()-1?++puntero:puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tFacturacion per = null;\r\n\t\t\t\t\tint text = actual.getCodigo();\r\n\t\t\t\t\tString q = \"from Facturacion where CodOficina = \"+principal.ccodoff+\" and codigo > :text order by codigo asc\";\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tSession sesion = principal.fabrica.getCurrentSession();\r\n\t\t\t\t\t\tsesion.beginTransaction();\r\n\t\t\t\t\t\tQuery queryResult = sesion\r\n\t\t\t\t\t\t\t\t.createQuery(q);\r\n\t\t\t\t\t\tqueryResult.setInteger(\"text\", text);\r\n\t\t\t\t\t\tqueryResult.setMaxResults(1);\r\n\t\t\t\t\t\tper = (Facturacion) queryResult.uniqueResult();\r\n\t\t\t\t\t\tsesion.getTransaction().commit();\r\n\t\t\t\t\t} catch (HibernateException e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"btsiguie!!!Errores de Base de Datos!!!\\n\" + e2 + \" \"\r\n\t\t\t\t\t\t\t\t\t\t+ text, \"Database Error!\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (per != null) {\r\n\t\t\t\t\t\tactual = per;\r\n\t\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (e.getSource() == barra.btultimo) {\r\n\t\t\t\tif (buscando)\r\n\t\t\t\t{\r\n\t\t\t\t\tpuntero = busqueda.size()-1;\r\n\t\t\t\t\tif (tfrif.isEditable()){\r\n\t\t\t\t\t\tbuscar();\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tactual = busqueda.get(puntero);\r\n\t\t\t\t\t\tSystem.out.println(\"\"+puntero+\"/\"+busqueda.size());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tactual = obtenerUltimo();\r\n\t\t\t\t\trefreshFacturacion();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (e.getSource() == barra.btsalir) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t}", "public VistaRellevancia(CtrlPresentacio ctrlPresentacio) {\r\n System.out.println\r\n (\"isEventDispatchThread: \" + SwingUtilities.isEventDispatchThread());\r\n this.cp = ctrlPresentacio;\r\n initComponents();\r\n inicialitzarbotons();\r\n }", "public void editPrioritaet(int prioID, String bezeichnung) throws Exception;", "@FXML\n\tvoid salvarCidade(ActionEvent event) {\n\t\tCidade cidade;\n\t\tCidadeDAO cidadeDAO;\n\n\t\t// Instancia o objeto\n\t\tcidade = new Cidade();\n\n\t\t// Recebe os valores dos campos de texto\n\t\tcidade.setNomeCidades(txtCidade.getText());\n\t\tcidade.setIdEstado(cboEstado.getValue().getIdEstado());\n\n\t\t// cidade.setSiglaEstado(txtCidade.getText());\n\n\t\t// Verifica se o usuario preencheu os campos\n\t\tif (cidade.getNomeCidades().isEmpty()) {\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\talert.setTitle(\"Atenção!!\");\n\t\t\talert.setHeaderText(null);\n\t\t\talert.setContentText(\"Preencha o campo Cidade\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\t\tif (cidade.getIdEstado() == 0) {\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\talert.setTitle(\"Atenção!!\");\n\t\t\talert.setHeaderText(null);\n\t\t\talert.setContentText(\"Escolha um estado!\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\t//Caso tenha passado pelas validações\n\t\t//Instancia a dao para inserir a nova cidade\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Realiza a inserção do estado\n\t\tcidadeDAO.inserir(cidade);\n\n\t\t// Preenche a tabela novamente\n\t\tpreencherTabela();\n\n\t\t// Limpa os campos\n\t\tlimparCampos();\n\n\t\t// Demonstra uma mensagem de sucesso ao usuário\n\t\tUtil.dialogMessage(\"Atenção!!\", \"Sucesso!!\", \"A cidade \"+cidade.getNomeCidades()+\" foi cadastrada com sucesso!!\");\n\t}", "@FXML\n\t private void updateProductCuloare (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdCuloare(prodIdText.getText(),newCuloareText.getText());\n\t resultArea.setText(\"Colour has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating colour: \" + e);\n\t }\n\t }", "public FrmPartida(JugadorPartida jp){\n initComponents();\n PnlPartida.setVisible(false);\n jugadorPartida = jp;\n this.setTitle(\"Jugador: \" + jp.getJugador().getNombreUsuario() + \" - Esperando en Lobby...\"); \n controller = new PartidaController(this, jugadorPartida);\n lblNumeroJugadores.setText(\"Jugadores esperando: \" + jp.getPartida().getColJugadores().size()); \n btnTirarCarta.setEnabled(false);\n pozo = (jugadorPartida.getPartida().getValorApuesta() * 3);\n \n \n \n \n }", "private void initFormEditMode() {\n initSpinnerSelectionChamps();\n //encodage de la chaine de caracteres correspondant au nom du produit pour etre passé dans l'URL\n String urlCategorieName = null;\n try {\n urlCategorieName = URLEncoder.encode(this.nomCategorie, ENCODING);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n //preparation de l'URL\n String[] params = {urlCategorieName};\n final String url = WebService.buildUrlForRequest(Metier.DOMAIN, Metier.NOM_MODELE_CATEGORIES, WebService.ACTION_GET, params);\n\n //requete pour recuperer la categorie a editer (asynchrone)\n asyncHttpClient.get(getActivity(), url, new AsyncHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = null;\n try {\n response = new String(responseBody, ENCODING);\n JSONObject jsonObject = new JSONObject(response);\n //TODO PAUSE\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.e(\"CATEGORIE_EDIT\", \"fail to connect: \" + url + \" \" + statusCode);\n }\n });\n }", "public EditPanel(ControllerClient controllerClient) {\n\n\t\tthis.controller = controllerClient;\n\t\tthis.panel = this;\n\n\t\tthis.setLayout(new GridBagLayout());\n\n\t\tenterSearchMode(\"\");\n\n\t}", "private void iniciarVentana()\n {\n this.setVisible(true);\n //Centramos la ventana\n this.setLocationRelativeTo(null);\n //Colocamos icono a la ventana\n this.setIconImage(Principal.getLogo());\n //Agregamos Hint al campo de texto\n txt_Nombre.setUI(new Hint(\"Nombre del Archivo\"));\n //ocultamos los componentes de la barra de progreso general\n lblGeneral.setVisible(false);\n barraGeneral.setVisible(false);\n //ocultamos la barra de progreso de archivo\n barra.setVisible(false);\n //deshabiltamos el boton de ElimianrArchivo\n btnEliminarArchivo.setEnabled(false);\n //deshabilitamos el boton de enviar\n btnaceptar.setEnabled(false);\n //Creamos el modelo para la tabla\n modelo=new DefaultTableModel(new Object[][]{},new Object[]{\"nombre\",\"tipo\",\"peso\"})\n {\n //sobreescribimos metodo para prohibir la edicion de celdas\n @Override\n public boolean isCellEditable(int i, int i1) {\n return false;\n }\n \n };\n //Agregamos el modelo a la tabla\n tablaArchivos.setModel(modelo);\n //Quitamos el reordenamiento en la cabecera de la tabla\n tablaArchivos.getTableHeader().setReorderingAllowed(false);\n }", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tbe.setNom(textFieldMarque.getText());\r\n\t\t\t\t\t\tbe.setPrenom(textFieldModele.getText());\r\n\t\t\t\t\t\tbe.setAge(Integer.valueOf(textFieldAge.getText()));\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tbs.update(be);\r\n\t\t\t\t\t\t} catch (DaoException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t}", "@Override\n\tpublic void activarModoPrestamo() {\n\t\tif(uiHomePrestamo!=null){\n\t\t\tif(uiHomePrestamo.getModo().equals(\"HISTORIAL\")){\n\t\t\t\tbtnNuevo.setVisible(false);\t\n\t\t\t\tbtnEliminar.setVisible(false);\n\t\t\t}else{\n\t\t\t\tbtnNuevo.setVisible(true);\n\t\t\t\tbtnEliminar.setVisible(true);\n\t\t\t}\n\t\t}else if(uiHomeCobranza!=null){\n\t\t\tbtnEliminar.setVisible(false);\n\t\t\tbtnNuevo.setVisible(true);\n\t\t\t//pnlEstadoPrestamo.setVisible(false);\n\t\t}\n\t\t\n\t}", "public VistaArticulosModif2() {\r\n\t\tsetTitle(\"Modificar_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 403, 204);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Modificaciones Artículo\r\n\t\tdlgConfModif.setLayout(new FlowLayout());\r\n\t\tdlgConfModif.add(lblConfModif);\r\n\t\tdlgConfModif.add(btnConfModifSi);\r\n\t\tdlgConfModif.add(btnConfModifNo);\r\n\t\tdlgConfModif.setSize(280, 150);\r\n\t\tdlgConfModif.setLocationRelativeTo(null);\r\n\t\tdlgConfModif.addWindowListener(this);\r\n\t\tbtnConfModifSi.addActionListener(this);\r\n\t\tbtnConfModifNo.addActionListener(this);\r\n\r\n\t\tJLabel lblDescripModif2 = new JLabel(\"Descripci\\u00F3n\");\r\n\t\tlblDescripModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblDescripModif2.setBounds(10, 22, 100, 25);\r\n\t\tcontentPane.add(lblDescripModif2);\r\n\r\n\t\tJLabel lblPrecioModif2 = new JLabel(\"Precio\");\r\n\t\tlblPrecioModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblPrecioModif2.setBounds(10, 54, 100, 19);\r\n\t\tcontentPane.add(lblPrecioModif2);\r\n\r\n\t\tJLabel lblCantModif2 = new JLabel(\"Cantidad\");\r\n\t\tlblCantModif2.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblCantModif2.setBounds(10, 84, 100, 25);\r\n\t\tcontentPane.add(lblCantModif2);\r\n\r\n\t\tsetTxtDescripModif2(new JTextField());\r\n\t\tgetTxtDescripModif2().setColumns(10);\r\n\t\tgetTxtDescripModif2().setBounds(103, 26, 274, 20);\r\n\t\tcontentPane.add(getTxtDescripModif2());\r\n\r\n\t\tsetTxtPrecioModif2(new JTextField());\r\n\t\tgetTxtPrecioModif2().setColumns(10);\r\n\t\tgetTxtPrecioModif2().setBounds(103, 53, 86, 20);\r\n\t\tcontentPane.add(getTxtPrecioModif2());\r\n\r\n\t\tsetTxtCantModif2(new JTextField());\r\n\t\tgetTxtCantModif2().setColumns(10);\r\n\t\tgetTxtCantModif2().setBounds(103, 84, 86, 20);\r\n\t\tcontentPane.add(getTxtCantModif2());\r\n\r\n\t\t// Botón Aceptar. Acción --> abre la ventana Confirmar_Modificaciones\r\n\t\tJButton btnAceptarModif2 = new JButton(\"ACEPTAR\");\r\n\t\tbtnAceptarModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdlgConfModif.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAceptarModif2.setBounds(21, 130, 89, 23);\r\n\t\tcontentPane.add(btnAceptarModif2);\r\n\r\n\t\t// Botón Limpiar. Acción --> limpia los TextField de la ventana VistaArticulosModif2\r\n\t\tJButton btnLimpiarModif2 = new JButton(\"LIMPIAR\");\r\n\t\tbtnLimpiarModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tgetTxtDescripModif2().selectAll();\r\n\t\t\t\tgetTxtDescripModif2().setText(\"\");\r\n\t\t\t\tgetTxtPrecioModif2().selectAll();\r\n\t\t\t\tgetTxtPrecioModif2().setText(\"\");\r\n\t\t\t\tgetTxtCantModif2().selectAll();\r\n\t\t\t\tgetTxtCantModif2().setText(\"\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnLimpiarModif2.setBounds(145, 130, 89, 23);\r\n\t\tcontentPane.add(btnLimpiarModif2);\r\n\r\n\t\t// Botón Volver. Acción --> cierra la ventana VistaArticulosModif2\r\n\t\tJButton btnVolverModif2 = new JButton(\"VOLVER\");\r\n\t\tbtnVolverModif2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverModif2.setBounds(275, 130, 89, 23);\r\n\t\tcontentPane.add(btnVolverModif2);\r\n\t\tidArticulosModif1.setVisible(false);\r\n\t\tidArticulosModif1.setEnabled(false);\r\n\t\tidArticulosModif1.setBounds(10, 0, 46, 14);\r\n\t\tcontentPane.add(idArticulosModif1);\r\n\t}", "public UnidadeProdutoFormView(UnidadeProdutoFormController controller) {\n\t\tbuildMainLayout();\n\t\tsetCompositionRoot(mainLayout);\n\n\t\t// TODO add user code here\n\t\tthis.controller = controller;\n\t}" ]
[ "0.65459615", "0.6412728", "0.6374657", "0.608884", "0.60808367", "0.6007776", "0.59655875", "0.5962713", "0.59536016", "0.5942426", "0.5935851", "0.59342986", "0.59334165", "0.5931602", "0.58993363", "0.5864538", "0.5852293", "0.5842495", "0.57865196", "0.5781168", "0.5775522", "0.5767137", "0.57447696", "0.5719692", "0.56969565", "0.56824833", "0.5680878", "0.566944", "0.56604135", "0.5651004", "0.56505877", "0.56446505", "0.56190073", "0.5618814", "0.5618685", "0.5608501", "0.560742", "0.55965054", "0.5593555", "0.5584179", "0.5573752", "0.55728126", "0.5566857", "0.55567473", "0.5551723", "0.5546271", "0.5503231", "0.5495956", "0.5489308", "0.54775184", "0.5475687", "0.5466602", "0.5465787", "0.54584", "0.5450628", "0.54497844", "0.54432446", "0.54407257", "0.54400325", "0.54382235", "0.54368186", "0.5432111", "0.54296273", "0.54240674", "0.5421279", "0.54168755", "0.5416875", "0.5415693", "0.5414054", "0.54040295", "0.54025555", "0.5402468", "0.5399084", "0.539793", "0.53896624", "0.53886694", "0.5379511", "0.5375191", "0.5374889", "0.5370756", "0.53668743", "0.5366736", "0.5365605", "0.5365335", "0.5364537", "0.5362791", "0.53471196", "0.53464544", "0.5343808", "0.53430516", "0.53371894", "0.533577", "0.5334961", "0.5330557", "0.5325038", "0.53219724", "0.53154624", "0.5310283", "0.5310041", "0.5302936" ]
0.60197806
5
ABRE UM JOptionPane COM UMA ComboBox VITOR
public void pesquisarArtista() { pAController = new ArtistaCtrl(); Object[] possibilities = pAController.getArtista(); String s = (String) JOptionPane.showInputDialog(frmAcervo, "Escolha o artista:\n", "Pesquisar o Artista", JOptionPane.INFORMATION_MESSAGE, null, possibilities, possibilities[0]); if (s != null && s.length() > 0) { nomeArtista.setText(s); artistaNome = s; return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void displayComboBox() {\n openingLine = new JLabel(\"Select \" + type + \":\");\n window = new JFrame(frameTitle);\n chooseBox = new JComboBox(range);\n chooseBox.addActionListener(this);\n window.setVisible(true);\n window.setLayout(new BoxLayout(window.getContentPane(), BoxLayout.PAGE_AXIS));\n window.setMinimumSize(new Dimension(300, 100));\n window.setLocationRelativeTo(null);\n confirm = new JButton(\"Confirm\");\n confirm.addActionListener(this);\n confirm.setActionCommand(\"confirm\");\n openingLine = new JLabel(\"Select \" + type + \":\");\n JPanel chooseBoxPane = new JPanel();\n chooseBoxPane.add(openingLine);\n chooseBoxPane.add(chooseBox);\n window.add(chooseBoxPane);\n window.add(confirm);\n\n }", "public void riempiProceduraComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT P.schema, P.nomeProcedura FROM Procedura P\";\n \n proceduraComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //le Procedure nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeProcedura\n //in quanto Procedure appartenenti a Schemi diversi possono avere lo stesso nome\n proceduraComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n proceduraComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }", "public void actiuneComboBox(ActionEvent event) throws IOException {\n\n alegereBD=new String(comboBox.getValue());\n System.out.println(alegereBD);\n functionare();\n }", "public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}", "public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblPlanEstudio = new javax.swing.JLabel();\n comboBox = new ComboBoxPlanEstudios();\n btnAceptar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Planes de estudio\");\n setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/calendario.png\")).getImage());\n setResizable(false);\n\n lblPlanEstudio.setText(\"Plan de estudio:\");\n\n btnAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/iconos/aceptarPeque.png\"))); // NOI18N\n btnAceptar.setText(\"Aceptar\");\n btnAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAceptarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblPlanEstudio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(comboBox, 0, 319, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(165, 165, 165)\n .addComponent(btnAceptar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPlanEstudio)\n .addComponent(comboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)\n .addComponent(btnAceptar)\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField1 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setToolTipText(\"\");\n setPreferredSize(new java.awt.Dimension(600, 500));\n\n jTextField1.setEditable(false);\n jTextField1.setBackground(new java.awt.Color(141, 141, 157));\n jTextField1.setFont(new java.awt.Font(\"Modern No. 20\", 0, 36)); // NOI18N\n jTextField1.setForeground(new java.awt.Color(255, 255, 255));\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n jTextField1.setText(\"Criar Professor\");\n jTextField1.setToolTipText(\"\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Nome: \");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel2.setText(\"Grau Académico:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel3.setText(\"Idade: \");\n\n jButton1.setText(\"Criar Professor\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/GUI/undo.png\"))); // NOI18N\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jButton2.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);\n jButton2.setDefaultCapable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextField2.setName(\"Nome\"); // NOI18N\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTextField3.setName(\"Idade\"); // NOI18N\n\n jComboBox1.setName(\"Grau académico\"); // 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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(197, 197, 197)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE)\n .addGap(88, 88, 88)\n .addComponent(jButton2)\n .addGap(22, 22, 22)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 76, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)\n .addComponent(jTextField3)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(72, 72, 72))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(139, 139, 139)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField3)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1))\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(44, 44, 44))\n );\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Prov = new javax.swing.JComboBox<>();\n Ko = new javax.swing.JComboBox<>();\n Kec = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Prov.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n Prov.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ProvItemStateChanged(evt);\n }\n });\n Prov.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ProvActionPerformed(evt);\n }\n });\n\n Ko.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n Kec.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(79, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(247, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(108, 108, 108))\n );\n\n pack();\n }", "public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }", "private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }", "@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 nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\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 .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cmbFakture = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n cmbProizvod = new javax.swing.JComboBox();\n btnUbaci = new javax.swing.JButton();\n txtKolicina = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Faktura: \");\n\n jLabel2.setText(\"Kolicina:\");\n\n jLabel3.setText(\"Proizvod:\");\n\n btnUbaci.setText(\"Ubaci\");\n btnUbaci.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUbaciActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbProizvod, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cmbFakture, 0, 373, Short.MAX_VALUE)\n .addComponent(txtKolicina)))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnUbaci)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cmbFakture, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(102, 102, 102)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtKolicina, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(82, 82, 82)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(cmbProizvod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addComponent(btnUbaci)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabNom = new javax.swing.JLabel();\n jLabAp1 = new javax.swing.JLabel();\n jLabAp2 = new javax.swing.JLabel();\n jLabSex = new javax.swing.JLabel();\n jLabEdad = new javax.swing.JLabel();\n jLabNomin = new javax.swing.JLabel();\n jLabIRPF = new javax.swing.JLabel();\n jTexNom = new javax.swing.JTextField();\n jTexAp1 = new javax.swing.JTextField();\n jTexNomin = new javax.swing.JTextField();\n jTexAp2 = new javax.swing.JTextField();\n jTexEd = new javax.swing.JTextField();\n jTexIRPF = new javax.swing.JTextField();\n jBAcept = new javax.swing.JButton();\n jBAtras = new javax.swing.JButton();\n jCoBSex = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabNom.setText(\"Nombre :\");\n\n jLabAp1.setText(\"Apellido 1:\");\n\n jLabAp2.setText(\"Apellido 2:\");\n\n jLabSex.setText(\"Sexo:\");\n\n jLabEdad.setText(\"Edad:\");\n\n jLabNomin.setText(\"Nomina:\");\n\n jLabIRPF.setText(\"IRPF:\");\n\n jTexNom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTexNomActionPerformed(evt);\n }\n });\n\n jBAcept.setText(\"Aceptar\");\n jBAcept.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAceptActionPerformed(evt);\n }\n });\n\n jBAtras.setText(\"Atrás\");\n jBAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAtrasActionPerformed(evt);\n }\n });\n\n jCoBSex.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"H\", \"M\", \"NB\" }));\n jCoBSex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCoBSexActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(19, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabNomin)\n .addGap(27, 27, 27)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp1)\n .addComponent(jLabSex))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp1))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jBAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 143, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabAp2)\n .addComponent(jLabEdad)\n .addComponent(jLabIRPF))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTexEd, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTexAp2)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jBAcept, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(116, 116, 116)\n .addComponent(jLabNom)\n .addGap(34, 34, 34)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabNom)\n .addComponent(jTexNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabAp1)\n .addComponent(jLabAp2)\n .addComponent(jTexAp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexAp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabSex)\n .addComponent(jLabEdad)\n .addComponent(jTexEd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jCoBSex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabIRPF)\n .addComponent(jLabNomin)\n .addComponent(jTexNomin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTexIRPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBAtras)\n .addComponent(jBAcept)))\n );\n\n pack();\n }", "@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 selectOrdem = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n nome = new javax.swing.JTextField();\n btnSalvar = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n descErro = new javax.swing.JLabel();\n\n jLabel2.setText(\"Ordem na exibição\");\n\n selectOrdem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\" }));\n\n jLabel1.setText(\"Nome da lista\");\n\n btnSalvar.setText(\"Salvar Lista\");\n\n btnCancelar.setText(\"Cancelar\");\n\n descErro.setForeground(new java.awt.Color(255, 51, 51));\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 .addComponent(btnSalvar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancelar))\n .addComponent(nome, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n .addComponent(descErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, 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(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(descErro, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSalvar)\n .addComponent(btnCancelar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cbplaca = new javax.swing.JComboBox<>();\n cbdia = new javax.swing.JComboBox<>();\n cbcolor = new javax.swing.JComboBox<>();\n imprimirtxt = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n revisar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n cbplaca.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbdia.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cbcolor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n imprimirtxt.setText(\"jTextField1\");\n\n jButton1.setText(\"jButton1\");\n\n revisar.setText(\"jButton2\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cbplaca, 0, 146, Short.MAX_VALUE)\n .addComponent(cbdia, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cbcolor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 210, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(44, 44, 44))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(106, 106, 106))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(revisar)\n .addGap(103, 103, 103))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbplaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addGap(59, 59, 59)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbdia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(imprimirtxt, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cbcolor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(revisar))\n .addContainerGap(140, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }", "private void comboBox1ActionPerformed(ActionEvent e) {\n }", "public void carrega_cidade() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUF.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidade.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidade.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n Conexao.desConectar();\n \n }", "private void combo_diabeticoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n listaPabellonesCB = new javax.swing.JComboBox<>();\n camaUbicacionTF = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n aceptarB = new javax.swing.JButton();\n cancelarB = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n listaPabellonesCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \" \", \"Cuidados intensivos\", \"Cuidados intermedios\" }));\n\n camaUbicacionTF.setBackground(new java.awt.Color(102, 102, 102));\n\n jLabel2.setBackground(new java.awt.Color(0, 0, 0));\n jLabel2.setText(\"Ubicación\");\n\n jLabel3.setBackground(new java.awt.Color(0, 0, 0));\n jLabel3.setText(\"Pabellón\");\n\n aceptarB.setText(\"Aceptar\");\n aceptarB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n aceptarBActionPerformed(evt);\n }\n });\n\n cancelarB.setText(\"Cancelar\");\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 .addGap(114, 114, 114)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(camaUbicacionTF, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(listaPabellonesCB, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(234, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(cancelarB)\n .addComponent(aceptarB, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(62, 62, 62))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(138, 138, 138)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(camaUbicacionTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(listaPabellonesCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(130, 130, 130)\n .addComponent(aceptarB)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cancelarB)\n .addContainerGap(53, Short.MAX_VALUE))\n );\n }", "public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n cmbTipObelezja = new javax.swing.JComboBox<>();\n btnPotvrdi = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Molim Vas odaberite vrstu obelezja iz opadajuce liste:\");\n\n cmbTipObelezja.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Prekidno obelezje\", \"Neprekidno obelezje\" }));\n\n btnPotvrdi.setText(\"Potvrdi!\");\n btnPotvrdi.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPotvrdiActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cmbTipObelezja, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPotvrdi))\n .addGap(0, 0, 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(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(cmbTipObelezja, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnPotvrdi)\n .addContainerGap(29, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void mostrarUsuarios(JComboBox cbx) {\n //cbx.addItem(\"Selecciona\".toUpperCase());\n modeloCombo = new DefaultComboBoxModel(sUsuario.MostrarTipoUsuarios());\n cbx.setModel(modeloCombo);\n mComboRoll = (M_ComboRoll) cbx.getSelectedItem();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jbloco = new javax.swing.JComboBox();\n japartamento = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Condomínio-SJ2\");\n\n jbloco.setForeground(new java.awt.Color(153, 0, 153));\n jbloco.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"BLOCO A\", \"BLOCO B\", \"BLOCO C\", \"BLOCO D\", \"BLOCO F\", \"BLOCO G\", \"BLOCO H\", \"BLOCO I\", \"BLOCO J\", \"BLOCO K\", \" \", \" \" }));\n jbloco.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jblocoActionPerformed(evt);\n }\n });\n\n japartamento.setForeground(new java.awt.Color(204, 0, 204));\n japartamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"APARTAMENTO 101\", \"APARTAMENTO 102\", \"APARTAMENTO 103\", \"APARTAMENTO 104\", \"APARTAMENTO 201\", \"APARTAMENTO 202\", \"APARTAMENTO 203\", \"APARTAMENTO 204\", \"APARTAMENTO 301\", \"APARTAMENTO 302\", \"APARTAMENTO 303\", \"APARTAMENTO 304\", \"APARTAMENTO 401\", \"APARTAMENTO 402\", \"APARTAMENTO 403\", \"APARTAMENTO 404\", \" \", \" \" }));\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Verificar possibilidade de agendamento :\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 431, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(97, 97, 97)\n .addComponent(jButton1)))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel1)\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap(230, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cbTipoFlor = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n btnSalir = new javax.swing.JButton();\n btnAceptar1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setPreferredSize(new java.awt.Dimension(550, 450));\n setSize(new java.awt.Dimension(550, 450));\n\n cbTipoFlor.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setText(\"Nombre\");\n\n btnSalir.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n btnSalir.setText(\"Salir\");\n btnSalir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalirActionPerformed(evt);\n }\n });\n\n btnAceptar1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n btnAceptar1.setText(\"Aceptar\");\n btnAceptar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAceptar1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(68, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addComponent(cbTipoFlor, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(91, 91, 91))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(btnSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(btnAceptar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(8, 8, 8)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(126, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cbTipoFlor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(123, 123, 123)\n .addComponent(btnSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(203, Short.MAX_VALUE)\n .addComponent(btnAceptar1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(92, 92, 92)))\n );\n\n pack();\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "private void jMenuItemTemasAyudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTemasAyudaActionPerformed\n JOptionPane.showMessageDialog(this, \"Leer informe\",\n this.getTitle(), JOptionPane.INFORMATION_MESSAGE);\n}", "private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }", "public void riempiTriggerComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT T.schema, T.nomeTrigger FROM trigger1 T\";\n \n triggerComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //I Trigger nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeTrigger\n //in quanto Trigger appartenenti a Schemi diversi possono avere lo stesso nome\n triggerComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n triggerComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }", "public void carrega_estado() throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUF.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n \n Conexao.desConectar();\n }", "private void setComboBox(JComboBox<String> comboBox) {\n comboBox.addItem(\"Select an item\");\n for (Product product : restaurant.getProducts()) {\n comboBox.addItem(product.getName());\n }\n }", "public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }", "private void tampil_kereta() {\n kereta_combo.addItem (\"Argo Parahyangan\");\n kereta_combo.addItem (\"Argo Jati\");\n kereta_combo.addItem (\"Bangun Karta\");\n kereta_combo.addItem (\"Bima\");\n kereta_combo.addItem (\"Kahuripan\");\n kereta_combo.addItem (\"Lodaya\"); \n kereta_combo.addItem (\"Sembari\");\n kereta_combo.addItem (\"Turangga\");\n \n }", "private void comboClienteActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void actualizarComboboxCursos() {\n\t\tint curso;\n\n\t\tDefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n\t\tdcbm.removeAllElements();\n\n\t\tLinkedHashSet<Integer> resultado = modelo.obtenerCursos();\n\t\tIterator it = resultado.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tcurso = (int) it.next();\n\n\t\t\tdcbm.addElement(curso);\n\t\t}\n\t\tjfad.cBCursos.setModel(dcbm);\n\t\tjfad.cBCursosMod.setModel(dcbm);\n\t\tSystem.out.println(dcbm.getSelectedItem());\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jComboBox_Colecao = new javax.swing.JComboBox();\n btn_Entrar = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"TDG SIS\");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Selecione uma Coleção\"));\n jPanel2.setToolTipText(\"\");\n\n jLabel1.setText(\"Coleção:\");\n\n jComboBox_Colecao.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n btn_Entrar.setText(\"Entrar\");\n btn_Entrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_EntrarActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Gerenciar Coleções\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox_Colecao, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_Entrar, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(16, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox_Colecao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_Entrar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton2))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, 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 layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, 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\n pack();\n }", "void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n txtUrunSeriNo = new javax.swing.JTextField();\n txtSatisFiyati = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtUrunModel = new javax.swing.JTextField();\n txtUrunIsmi = new javax.swing.JTextField();\n txtAlisFiyati = new javax.swing.JTextField();\n txtAdet = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n comboDepo = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Stok Ekle | Stok Otomasyonu |\");\n setFocusTraversalPolicyProvider(true);\n setLocation(new java.awt.Point(0, 0));\n setResizable(false);\n setType(java.awt.Window.Type.UTILITY);\n\n jButton1.setText(\"EKLE\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n txtSatisFiyati.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n txtSatisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtSatisFiyatiKeyTyped(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Ürün Seri No : \");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setText(\"Ürün İsmi :\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel4.setText(\"Ürün Model :\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel5.setText(\"Adet :\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel6.setText(\"Alış Fiyatı :\");\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel7.setText(\"Satış Fiyatı :\");\n\n txtAlisFiyati.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAlisFiyatiKeyTyped(evt);\n }\n });\n\n txtAdet.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtAdetKeyTyped(evt);\n }\n });\n\n jPanel2.setBackground(new java.awt.Color(48, 66, 105));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"# Ürün Ekle #\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)\n .addGap(32, 32, 32))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel8.setText(\"Depo :\");\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.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(comboDepo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)\n .addComponent(txtAdet)\n .addComponent(txtUrunModel)\n .addComponent(txtUrunIsmi)\n .addComponent(txtUrunSeriNo)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunSeriNo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunIsmi, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUrunModel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAdet, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSatisFiyati, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboDepo, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private Object displayOptionsPanel(String message, Object[] possibleValues) {\n return JOptionPane.showInputDialog(\n mainPanel, // parentComponent\n message, // message\n \"\", // title\n JOptionPane.QUESTION_MESSAGE, // messageType\n null, // icon\n possibleValues, // selectionValues\n possibleValues[0] // initialSelectionValue\n );\n }", "public GrafosTP1UI() {\n initComponents();\n control = new Controlador();\n jComboBox1.setSelectedIndex(0); \n }", "public void mostrarCategoria(JComboBox<Categoria>jComboBoxCategoria){\n \n try{\n con = ConexionBD.getConexion();\n String sql=\"SELECT * FROM categorias WHERE id_estado = 1 ORDER BY id_categoria\";\n sent = con.createStatement();\n ResultSet rs = sent.executeQuery(sql);\n \n \n while (rs.next()){\n jComboBoxCategoria.addItem(\n new Categoria (\n rs.getString(\"id_categoria\"), \n rs.getString(\"nombre_categoria\")\n )\n );\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(null,\"error\");\n \n \n \n }\n \n }", "public void verSeleccionarConvocatoriaAnalisis()\r\n\t{\r\n\t\tconvocatoriaanalisis = new SeleccionarConvocatoriaAnalisis(this);\r\n\t\tconvocatoriaanalisis.setVisible(true);\r\n\t}", "public void pulisciInput(){\n nomeVarTextField.setText(\"\");\n tipoVarComboBox.setSelectedIndex(-1);\n if(modalita == TRIGGER) triggerComboBox.setSelectedIndex(-1); \n else proceduraComboBox.setSelectedIndex(-1);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ClinicaFprojectPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"ClinicaFprojectPU\").createEntityManager();\n pacienteQuery = java.beans.Beans.isDesignTime() ? null : ClinicaFprojectPUEntityManager.createQuery(\"SELECT p FROM Paciente p\");\n pacienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : pacienteQuery.getResultList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setClosable(true);\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(356, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(155, 155, 155))\n .addGroup(layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(49, 49, 49))\n );\n\n pack();\n }", "public jHistorialSeleccionarVoluntario() {\n initComponents();\n \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n dialogComissaoMensal = new javax.swing.JDialog();\n jPanel2 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n comboFuncionario = new javax.swing.JComboBox<>();\n jLabel7 = new javax.swing.JLabel();\n btnImprimir = new javax.swing.JButton();\n comboMes = new javax.swing.JComboBox<>();\n comboAno = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n dialogComissaoMensal.setTitle(\"Relatório de Comissão Mensal\");\n dialogComissaoMensal.setBackground(new java.awt.Color(255, 204, 255));\n dialogComissaoMensal.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);\n\n jPanel2.setBackground(new java.awt.Color(255, 204, 255));\n\n jLabel6.setBackground(new java.awt.Color(231, 32, 83));\n jLabel6.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\" Funcionário\");\n jLabel6.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n jLabel6.setOpaque(true);\n\n jLabel7.setBackground(new java.awt.Color(231, 32, 83));\n jLabel7.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 1, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\" Mês/Ano\");\n jLabel7.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n jLabel7.setOpaque(true);\n\n btnImprimir.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 0, 18)); // NOI18N\n btnImprimir.setText(\"Gerar\");\n btnImprimir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnImprimirActionPerformed(evt);\n }\n });\n\n comboMes.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"SELECIONE\", \"JANEIRO\", \"FEVEREIRO\", \"MARÇO\", \"ABRIL\", \"MAIO\", \"JUNHO\", \"JULHO\", \"AGOSTO\", \"SETEMBRO\", \"OUTUBRO\", \"NOVEMBRO\", \"DEZEMBRO\" }));\n\n comboAno.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"SELECIONE\", \"2018\", \"2019\", \"2020\" }));\n comboAno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboAnoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(comboFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(comboMes, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(comboAno, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(comboFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(comboMes, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(comboAno, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)\n .addComponent(btnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52))\n );\n\n javax.swing.GroupLayout dialogComissaoMensalLayout = new javax.swing.GroupLayout(dialogComissaoMensal.getContentPane());\n dialogComissaoMensal.getContentPane().setLayout(dialogComissaoMensalLayout);\n dialogComissaoMensalLayout.setHorizontalGroup(\n dialogComissaoMensalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n dialogComissaoMensalLayout.setVerticalGroup(\n dialogComissaoMensalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Relatórios\");\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 204, 255));\n\n jButton2.setBackground(new java.awt.Color(231, 32, 83));\n jButton2.setFont(new java.awt.Font(\"Calibri\", 1, 20)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"<html><center>Relatório de<br>Comissão Mensal</center></html>\");\n jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(563, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(333, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(750, 555));\n setLocationRelativeTo(null);\n }", "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void betOptionPane(){ \n SpinnerModel sModel = new SpinnerNumberModel(50,1,blackjackController.getHumanPlayer().getBudget(),5); \n JSpinner spinner = new JSpinner(sModel);\n\n Object[] inputFields = {\"Hey! \\nYour current budget is $\"+this.blackjackController.getHumanPlayer().getBudget()+\".\\n\", \"Declare your new bet : \", spinner, \"Good luck!\"};\n int option = JOptionPane.showConfirmDialog(this, inputFields, \"\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);\n\n if (option == JOptionPane.OK_OPTION) {\n this.blackjackController.setBet((Integer) spinner.getValue());\n }else{\n this.dispose();\n }\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n private void addComboBox() throws Exception{\n\n Connection con = Coagent.getConnection();\n PreparedStatement query = con.prepareStatement(\"SELECT Publisher_Name FROM publishers;\");\n ResultSet result = query.executeQuery();\n\n while(result.next()){\n jComboBoxAdd.addItem(result.getString(1));\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cmbInvited = new javax.swing.JComboBox();\n cmbEvent = new javax.swing.JComboBox();\n cmbAttended = new javax.swing.JComboBox();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n cmbInvited.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cmbEvent.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cmbEvent.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmbEventActionPerformed(evt);\n }\n });\n\n cmbAttended.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"No\", \"Yes\" }));\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(cmbInvited, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmbEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbAttended, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cmbInvited, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cmbAttended, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cmbEvent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n }", "public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }", "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }", "public String extraerCombo(){\n String consulta=null,combo;\n \n combo=comboBuscar.getSelectedItem().toString();\n \n if(combo.equals(\"Buscar por No.Control:\")){\n consulta=\"noControl\";\n } \n if(combo.equals(\"Buscar por Nombre:\")){\n consulta=\"nombreCompleto\"; \n }\n if(combo.equals(\"Buscar por Carrera:\")){\n consulta=\"nombreCarrera\";\n }\n return consulta;\n }", "public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n\n String lacname3 = jComboBox27.getSelectedItem().toString();\n\n array3.add(lacname3);\n // System.out.println(array);\n\n // day.addItem(array.get());\n Vector vv3 = new Vector();\n\n for (int i = 0; i < array3.size(); i++) {\n String gette = array3.get(i);\n vv3.add(gette);\n jComboBox26.setModel(new DefaultComboBoxModel<>(vv3));\n }\n }", "public void dropDownInventory(ComboBox combo) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n combo.setItems(dataAccess.menuInventory());\r\n }", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }", "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "private void btnEntrarActionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n Alumno.Aula = jcbAula.getSelectedItem().toString();\n Alumno.Materia = \"\";\n Info_Computo a1 = new Info_Computo();\n a1.setVisible(true);\n }", "public StammvErstellen(java.awt.Frame parent, boolean modal, DBConnection Con, \n String Edvid, String Pfad, boolean anzeigen) {\n super(parent, modal);\n initComponents();\n con = Con;\n edvid = Edvid;\n pfad = Pfad;\n jTextField1.setText(pfad);\n\n if(anzeigen){\n Statement stmt = null;\n ResultSet rs = null;\n int nauf = 0;\n try{\n stmt = con.Connections[0].createStatement();\n rs = stmt.executeQuery(\"SELECT auf, jahr FROM Auf ORDER BY auf\");\n while(rs.next()){\n int aufx = rs.getInt(\"auf\");\n int jahrx = rs.getInt(\"jahr\");\n jComboBox1.addItem(aufx+\" (\"+jahrx+\")\");\n nauf ++;\n }\n } catch (Exception e) {e.printStackTrace();\n } finally{\n try{\n if(stmt!=null) rs.close();\n if(stmt!=null) stmt.close();\n }catch(Exception e) {e.printStackTrace();}\n }\n setVisible(true);\n }\n }", "public DatePopup(JComboBox comboBox) {\r\n\t this.comboBox = comboBox;\r\n\t dateFormat = new SimpleDateFormat(\"EEE , dd MMM\");\r\n\t Calendar now = Calendar.getInstance();\r\n\t selectedDate = new DateTime(now.get(Calendar.DAY_OF_MONTH), now.get(Calendar.MONTH) + 1, now.get(Calendar.YEAR), now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE), 0);\r\n\t setSelectedItem(dateFormat.format(now.getTime()));\r\n\t panel = new UnityDatePanel();\r\n\t panel.addActionListener(this);\r\n\t initializePopup();\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n idtxtPRE = new javax.swing.JTextField();\n nocuentatxt = new javax.swing.JTextField();\n idPre = new javax.swing.JLabel();\n pCompra = new javax.swing.JLabel();\n estatusUL = new javax.swing.JLabel();\n estatusBox = new javax.swing.JComboBox<String>();\n jPanel1 = new javax.swing.JPanel();\n modificarUL = new javax.swing.JLabel();\n cancelarUL = new javax.swing.JLabel();\n pVenta = new javax.swing.JLabel();\n bancotxt = new javax.swing.JTextField();\n producto = new javax.swing.JLabel();\n proveedorBox = new javax.swing.JComboBox<String>();\n\n setBackground(new java.awt.Color(228, 225, 225));\n setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 51), 2, true), \"Modicar Presentacion\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Verdana\", 1, 14), new java.awt.Color(102, 102, 102))); // NOI18N\n\n idtxtPRE.setEnabled(false);\n\n idPre.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n idPre.setText(\"ID:\");\n\n pCompra.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n pCompra.setText(\"NO. CUENTA: \");\n\n estatusUL.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n estatusUL.setText(\"ESTATUS:\");\n\n estatusBox.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n estatusBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"SELECCIONE EL ESTATUS\", \"ACTIVO\", \"INACTIVO\" }));\n\n jPanel1.setBackground(new java.awt.Color(48, 45, 45));\n\n modificarUL.setFont(new java.awt.Font(\"Tw Cen MT Condensed Extra Bold\", 2, 18)); // NOI18N\n modificarUL.setForeground(new java.awt.Color(255, 255, 255));\n modificarUL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/save.png\"))); // NOI18N\n modificarUL.setText(\"MODIFICAR\");\n modificarUL.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white));\n modificarUL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n modificarUL.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n modificarULMouseClicked(evt);\n }\n });\n\n cancelarUL.setFont(new java.awt.Font(\"Tw Cen MT Condensed Extra Bold\", 2, 18)); // NOI18N\n cancelarUL.setForeground(new java.awt.Color(255, 255, 255));\n cancelarUL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagenes/cerrar.png\"))); // NOI18N\n cancelarUL.setText(\"CANCELAR\");\n cancelarUL.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white));\n cancelarUL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n cancelarUL.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n cancelarULMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(54, 54, 54)\n .addComponent(modificarUL, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 347, Short.MAX_VALUE)\n .addComponent(cancelarUL, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(61, 61, 61))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(71, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cancelarUL)\n .addComponent(modificarUL))\n .addGap(45, 45, 45))\n );\n\n pVenta.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n pVenta.setText(\"BANCO:\");\n\n producto.setFont(new java.awt.Font(\"Times New Roman\", 1, 18)); // NOI18N\n producto.setText(\"PROVEEDOR: \");\n\n proveedorBox.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n proveedorBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"SELECCIONE UN PROVEEDOR\" }));\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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(75, 75, 75)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pCompra)\n .addComponent(idPre)\n .addComponent(producto)\n .addComponent(estatusUL)\n .addComponent(pVenta))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(idtxtPRE, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nocuentatxt, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(estatusBox, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(proveedorBox, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bancotxt, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(57, 57, 57))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(idtxtPRE, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(idPre)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(producto)\n .addComponent(proveedorBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pCompra)\n .addComponent(nocuentatxt, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pVenta)\n .addComponent(bancotxt, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(estatusUL)\n .addComponent(estatusBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n getAccessibleContext().setAccessibleName(\"Modificar Categoria \");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel3 = new javax.swing.JLabel();\n jComboBox3 = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Presidente\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel2.setText(\"Alcalde\");\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel3.setText(\"Diputado\");\n\n jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jButton1.setText(\"Votar\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel4.setText(\"¡¡Decide bien tu voto!!\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addGap(41, 41, 41)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox1, 0, 178, Short.MAX_VALUE)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addContainerGap(59, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(88, 88, 88))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jLabel4)\n .addGap(55, 55, 55)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(65, 65, 65)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(62, 62, 62)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(61, 61, 61)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(25, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public Voznje() {\n initComponents();\n lstPodaci.setCellRenderer(new VoznjaCellRenderer());\n obrada = new ObradaVoznja();\n setTitle(Aplikacija.operater.getIme() + \" \" + Aplikacija.operater.getPrezime() + \" - Vožnje\");\n btnObrisi.setText(\"\\u274C\"+ \" Obriši\");\n btnPromijeni.setText(\"\\u2611\\uFE0F\" + \" Promijeni\");\n btnDodaj.setText(\"\\u2795\" + \" Dodaj\");\n ucitajPodatke(); \n \n DefaultComboBoxModel<Vozac> v = new DefaultComboBoxModel<>();\n new ObradaVozac().getPodaci().forEach(s -> {\n v.addElement(s);\n });\n cmbVozaci.setRenderer(new VozacCellRenderer());\n cmbVozaci.setModel(v);\n ucitajPodatke();\n \n \n \n }", "JComboBox gtkGetComboBox() {\n return comboBox;\n }", "private void jMenuItemControlAsistenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemControlAsistenciaActionPerformed\n JDialogControlAsistencia vca = new JDialogControlAsistencia(this, modal, listaDeportes);\n LOG.info(\"Launching JDialogControlAsistencia...\");\n vca.setLocationRelativeTo(this);\n vca.setVisible(true);\n}", "private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}", "private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelColores = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n cboColores = new javax.swing.JComboBox<>();\n cboRojo = new javax.swing.JComboBox<>();\n cboVerde = new javax.swing.JComboBox<>();\n cboAzul = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n panelColores.setBackground(new java.awt.Color(255, 204, 204));\n\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n\n cboColores.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opción-\", \"Rojo\", \"Azul\", \"Verde\", \"Amarillo\", \"Rosa\", \"Negro\", \"Blanco\" }));\n cboColores.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboColoresItemStateChanged(evt);\n }\n });\n cboColores.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cboColoresActionPerformed(evt);\n }\n });\n cboColores.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n cboColoresPropertyChange(evt);\n }\n });\n\n cboRojo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboRojo.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboRojoItemStateChanged(evt);\n }\n });\n cboRojo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cboRojoActionPerformed(evt);\n }\n });\n\n cboVerde.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboVerde.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboVerdeItemStateChanged(evt);\n }\n });\n\n cboAzul.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"-selecciona opcion-\", \"10\", \"20\", \"30\", \"40\", \"50\", \"60\", \"70\", \"80\", \"90\", \"100\" }));\n cboAzul.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cboAzulItemStateChanged(evt);\n }\n });\n\n jLabel1.setText(\"rojo\");\n\n jLabel2.setText(\"verde\");\n\n jLabel3.setText(\"azul\");\n\n javax.swing.GroupLayout panelColoresLayout = new javax.swing.GroupLayout(panelColores);\n panelColores.setLayout(panelColoresLayout);\n panelColoresLayout.setHorizontalGroup(\n panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelColoresLayout.createSequentialGroup()\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(cboColores, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cboVerde, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cboRojo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cboAzul, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 120, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22))\n );\n panelColoresLayout.setVerticalGroup(\n panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelColoresLayout.createSequentialGroup()\n .addComponent(cboColores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboRojo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGap(13, 13, 13)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboVerde, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panelColoresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cboAzul, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(110, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelColores, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panelColores, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n btnSalvar = new javax.swing.JButton();\r\n btnExcluir = new javax.swing.JButton();\r\n btnLimpar = new javax.swing.JButton();\r\n btnFechar = new javax.swing.JButton();\r\n jButton1 = new javax.swing.JButton();\r\n txtCodigo = new javax.swing.JTextField();\r\n txtDescricao = new javax.swing.JTextField();\r\n cmbSituacao = new javax.swing.JComboBox<>();\r\n\r\n jLabel1.setText(\"Código\");\r\n\r\n jLabel2.setText(\"Descricao\");\r\n\r\n jLabel3.setText(\"Situação\");\r\n\r\n btnSalvar.setText(\"Salvar\");\r\n btnSalvar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnSalvarActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnExcluir.setText(\"Excluir\");\r\n btnExcluir.setEnabled(false);\r\n btnExcluir.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnExcluirActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnLimpar.setText(\"Limpar\");\r\n btnLimpar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnLimparActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnFechar.setText(\"Fechar\");\r\n btnFechar.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnFecharActionPerformed(evt);\r\n }\r\n });\r\n\r\n jButton1.setText(\"Pesquisar\");\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n txtCodigo.setEnabled(false);\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 .addGap(21, 21, 21)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel3)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addComponent(cmbSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel2)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(txtDescricao))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel1)\r\n .addGap(18, 18, 18)\r\n .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jButton1)))\r\n .addGap(51, 51, 51))))\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(btnSalvar)\r\n .addGap(29, 29, 29)\r\n .addComponent(btnExcluir)\r\n .addGap(33, 33, 33)\r\n .addComponent(btnLimpar)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)\r\n .addComponent(btnFechar)\r\n .addGap(20, 20, 20))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(16, 16, 16)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel1)\r\n .addComponent(jButton1)\r\n .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel2)\r\n .addComponent(txtDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(cmbSituacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(30, 30, 30)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(btnSalvar)\r\n .addComponent(btnExcluir)\r\n .addComponent(btnLimpar)\r\n .addComponent(btnFechar))\r\n .addContainerGap(48, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n }", "public ComboBoxChooser(int maxNumber, int minNumber, String type, String keyword, PetAdoptionApp parent) {\n this.keyword = keyword;\n this.maxNumber = maxNumber;\n this.minNumber = minNumber;\n this.type = type;\n this.frameTitle = \"Enter Birthday\";\n safeBox.add(parent);\n int[] intRange = java.util.stream.IntStream.rangeClosed(minNumber, maxNumber).toArray();\n range = new String[intRange.length];\n for (int i = 0; i < intRange.length; i++) {\n range[i] = String.valueOf(intRange[i]);\n }\n confirm = new JButton(\"Confirm\");\n confirm.addActionListener(this);\n }", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed\n // TODO add your handling code here:\n\n String lacname2 = jComboBox12.getSelectedItem().toString();\n\n array2.add(lacname2);\n // System.out.println(array);\n\n // day.addItem(array.get());\n Vector vv2 = new Vector();\n\n for (int i = 0; i < array2.size(); i++) {\n String gette = array2.get(i);\n vv2.add(gette);\n jComboBox24.setModel(new DefaultComboBoxModel<>(vv2));\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton3 = new javax.swing.JButton();\n jcbTurmas = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));\n\n jButton3.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n jButton3.setForeground(new java.awt.Color(255, 255, 255));\n jButton3.setText(\"Confirmar\");\n jButton3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButton3.setContentAreaFilled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jcbTurmas.setFont(new java.awt.Font(\"Century Gothic\", 0, 12)); // NOI18N\n jcbTurmas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcbTurmasActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Turma\");\n\n jButton1.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n jButton1.setForeground(new java.awt.Color(255, 255, 255));\n jButton1.setText(\"Nova Atividade\");\n jButton1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButton1.setContentAreaFilled(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"Consultar Planejamento\");\n jButton2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));\n jButton2.setContentAreaFilled(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/img/bg-img.jpg\"))); // NOI18N\n jLabel5.setText(\"jLabel5\");\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 .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)\n .addComponent(jcbTurmas, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap(45, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 290, 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 .addGroup(layout.createSequentialGroup()\n .addGap(288, 288, 288)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addGap(11, 11, 11)\n .addComponent(jcbTurmas, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(217, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 730, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n }", "@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 campoNome = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n campoMatricula = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n campoCPF = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n campoRG = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n campoEmail = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n cursoComboBox = new javax.swing.JComboBox();\n\n setLayout(null);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 25)); // NOI18N\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagens/image_edit.png\"))); // NOI18N\n jLabel2.setText(\"Cadastro de aluno\");\n add(jLabel2);\n jLabel2.setBounds(280, 40, 260, 50);\n\n campoNome.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n add(campoNome);\n campoNome.setBounds(220, 130, 420, 30);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel5.setText(\"Nome Completo\");\n add(jLabel5);\n jLabel5.setBounds(120, 130, 100, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel6.setText(\"Matrícula\");\n add(jLabel6);\n jLabel6.setBounds(150, 180, 60, 30);\n\n campoMatricula.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n campoMatricula.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoMatriculaActionPerformed(evt);\n }\n });\n add(campoMatricula);\n campoMatricula.setBounds(220, 180, 190, 30);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel4.setText(\"Curso\");\n add(jLabel4);\n jLabel4.setBounds(170, 240, 40, 30);\n\n campoCPF.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n add(campoCPF);\n campoCPF.setBounds(220, 290, 190, 30);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel3.setText(\"RG\");\n add(jLabel3);\n jLabel3.setBounds(170, 340, 30, 30);\n\n campoRG.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n campoRG.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoRGActionPerformed(evt);\n }\n });\n add(campoRG);\n campoRG.setBounds(220, 340, 190, 30);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel1.setText(\"Email\");\n add(jLabel1);\n jLabel1.setBounds(170, 390, 40, 30);\n\n campoEmail.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n campoEmail.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoEmailActionPerformed(evt);\n }\n });\n add(campoEmail);\n campoEmail.setBounds(220, 390, 410, 30);\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagens/accept_1.png\"))); // NOI18N\n jButton1.setText(\"Salvar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n add(jButton1);\n jButton1.setBounds(270, 470, 100, 30);\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagens/delete_1.png\"))); // NOI18N\n jButton2.setText(\"Sair\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n add(jButton2);\n jButton2.setBounds(430, 470, 110, 30);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n jLabel7.setText(\"CPF\");\n add(jLabel7);\n jLabel7.setBounds(180, 290, 30, 30);\n\n add(cursoComboBox);\n cursoComboBox.setBounds(220, 240, 190, 30);\n }", "private void jComboBox4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n comboBoxReporte = new javax.swing.JComboBox();\n botonGenerarReporte = new javax.swing.JButton();\n etiquetaTipoReporte = new javax.swing.JLabel();\n etiquetaInicial = new javax.swing.JLabel();\n etiquetaFechaFinal = new javax.swing.JLabel();\n campoFechaInicial = new javax.swing.JTextField();\n campoFechaFinal = new javax.swing.JTextField();\n\n comboBoxReporte.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Empleados\", \"Proveedor\", \"Articulos Vendidos\", \"Ventas\" }));\n comboBoxReporte.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboBoxReporteActionPerformed(evt);\n }\n });\n\n botonGenerarReporte.setText(\"GenerarReporte\");\n\n etiquetaTipoReporte.setText(\"Tipo Reporte\");\n\n etiquetaInicial.setText(\"Fecha Inicial (dd-mm-yyyy)\");\n\n etiquetaFechaFinal.setText(\"Fecha Final (dd-mm-yyyy)\");\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 .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(etiquetaTipoReporte, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(comboBoxReporte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaInicial))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(botonGenerarReporte)\n .addGap(62, 62, 62))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoFechaFinal, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaFechaFinal))\n .addGap(43, 43, 43))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(campoFechaInicial, javax.swing.GroupLayout.PREFERRED_SIZE, 104, 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 .addGroup(layout.createSequentialGroup()\n .addComponent(etiquetaTipoReporte)\n .addGap(5, 5, 5)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboBoxReporte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(botonGenerarReporte))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(etiquetaInicial)\n .addComponent(etiquetaFechaFinal))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(campoFechaInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(campoFechaFinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(26, Short.MAX_VALUE))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel6 = new javax.swing.JLabel();\n NomeProdutoTextField = new javax.swing.JTextField();\n BtnGravar = new javax.swing.JButton();\n BtnCancelar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n DescricaoProdutoTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n GradeComboBox = new javax.swing.JComboBox();\n\n setClosable(true);\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setIconifiable(true);\n\n jLabel6.setText(\"Nome do Produto:\");\n\n NomeProdutoTextField.setColumns(15);\n\n BtnGravar.setText(\"Gravar\");\n BtnGravar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnGravarActionPerformed(evt);\n }\n });\n\n BtnCancelar.setText(\"Cancelar\");\n BtnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BtnCancelarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Descrição do Produto:\");\n\n jLabel2.setText(\"Selecione a Grade:\");\n\n GradeComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n GradeComboBoxItemStateChanged(evt);\n }\n });\n GradeComboBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GradeComboBoxActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel1)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(NomeProdutoTextField)\n .addComponent(DescricaoProdutoTextField)\n .addComponent(GradeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(BtnCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(BtnGravar)))\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.BASELINE)\n .addComponent(jLabel6)\n .addComponent(NomeProdutoTextField, 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(jLabel1)\n .addComponent(DescricaoProdutoTextField, 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(jLabel2)\n .addComponent(GradeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BtnGravar)\n .addComponent(BtnCancelar))\n .addContainerGap())\n );\n\n pack();\n }", "private void jMenuItemCentroInscripcionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCentroInscripcionesActionPerformed\n LOG.trace(evt.paramString());\n\n JDialogCentroInscripciones vci = new JDialogCentroInscripciones(listaDeportes);\n LOG.info(\"Launching JDialogCentroInscripciones...\");\n vci.setModalityType(modal);\n vci.setLocationRelativeTo(this);\n vci.setVisible(true);\n}", "public void addItemsCitas(){\n cmbPacientes.removeAllItems();\n cmbPacientes.addItem(\"Seleccione una opcion\");\n cmbPacientes.addItem(\"Paciente\");\n cmbPacientes.addItem(\"Doctor\");\n cmbPacientes.addItem(\"Mostrar todo\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n LPanal = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 204, 255));\n jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));\n\n jButton1.setText(\"Search\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select Lecturers\", \"Ms.Kushnara Siriwardana \", \"Mr.Jagath Mendis\", \"Ms.Disna Damayanthi\" }));\n\n LPanal.setBackground(new java.awt.Color(153, 153, 255));\n LPanal.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Lecturer Statics\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Cambria\", 0, 18))); // NOI18N\n LPanal.setLayout(new javax.swing.BoxLayout(LPanal, javax.swing.BoxLayout.LINE_AXIS));\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(212, 212, 212))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(281, 281, 281)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(LPanal, javax.swing.GroupLayout.PREFERRED_SIZE, 862, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addComponent(LPanal, javax.swing.GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE))\n );\n\n pack();\n }", "public JDialogZonas(java.awt.Frame parent, boolean modal, Remiseria remiseria, JComboBox cmbZona, Maestro unMaestro, Operario unOperario) {\n super(parent, modal);\n this.remiseria = remiseria;\n this.cmbZona = cmbZona;\n this.unOperario = unOperario;\n this.unMaestro = unMaestro;\n this.utilidades = new Utilidad();\n initComponents();\n this.setModal(true);\n this.setLocationRelativeTo(null);\n this.cargarZonas();\n jXTaskPane1.setCollapsed(true);\n btnGuardarModificaciones.setEnabled(false);\n btnGuardarChofer.setEnabled(false);\n txtNombreZona.setEnabled(false);\n txtDescripcion.setEnabled(false);\n btnModificar.setEnabled(true);\n btnAgregar.setEnabled(true);\n btnEliminar.setEnabled(true); \n try\n {\n tablaZonas.setRowSelectionInterval(0, 0);\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"No hay Zonas registradas aúx\", null, JOptionPane.WARNING_MESSAGE);\n }\n }", "public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton5 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameActivated(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel1.setText(\"* Vehiculo\");\n\n jTextField1.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel2.setText(\"Color\");\n\n jButton1.setBackground(new java.awt.Color(255, 255, 255));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton1.setText(\" \");\n jButton1.setFocusable(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel3.setText(\"* Serie\");\n\n jTextField2.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jLabel4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jLabel4.setText(\"Placas\");\n\n jTextField3.setFont(new java.awt.Font(\"Arial\", 0, 10)); // NOI18N\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton2.setText(\"Agregar\");\n jButton2.setFocusable(false);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setBackground(new java.awt.Color(255, 255, 255));\n jButton3.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton3.setText(\"Cancelar\");\n jButton3.setFocusable(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setBackground(new java.awt.Color(255, 255, 255));\n jButton4.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton4.setText(\"Actualizar\");\n jButton4.setFocusable(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Dialog\", 0, 10)); // NOI18N\n jTextArea1.setLineWrap(true);\n jTextArea1.setRows(5);\n jTextArea1.setWrapStyleWord(true);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Comentario\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 8))); // NOI18N\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton5.setBackground(new java.awt.Color(255, 255, 255));\n jButton5.setFont(new java.awt.Font(\"Arial\", 1, 10)); // NOI18N\n jButton5.setText(\"Eliminar\");\n jButton5.setFocusable(false);\n\n jLabel5.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel5.setText(\"Agencia\");\n\n jComboBox1.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(29, 29, 29)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(22, 22, 22)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 406, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, 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(jLabel2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, 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(jLabel5)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton3)\n .addComponent(jButton2)\n .addComponent(jButton5))\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextField.setText(comboBox.getSelectedItem().toString());\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cod = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n Sact = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n desc = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n Smax = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n agregar = new javax.swing.JButton();\n Smin = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n unitario = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n tipo = new javax.swing.JComboBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Articulo Nuevo\");\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n cod.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n codActionPerformed(evt);\n }\n });\n getContentPane().add(cod, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 20, 105, 30));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Ingrese el Codigo\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, -1, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel5.setText(\"Stock Minimo\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 230, -1, -1));\n\n Sact.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SactActionPerformed(evt);\n }\n });\n getContentPane().add(Sact, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 260, 105, 30));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel3.setText(\"Stock Actual\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 270, -1, -1));\n\n desc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n descActionPerformed(evt);\n }\n });\n getContentPane().add(desc, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 60, 260, 30));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"Descripcion\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, -1, -1));\n\n Smax.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SmaxActionPerformed(evt);\n }\n });\n getContentPane().add(Smax, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 180, 105, 30));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel4.setText(\"Tipo\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 150, -1, -1));\n\n agregar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Iconos/ico_carro.png\"))); // NOI18N\n agregar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n agregarActionPerformed(evt);\n }\n });\n getContentPane().add(agregar, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 330, 80, -1));\n\n Smin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SminActionPerformed(evt);\n }\n });\n getContentPane().add(Smin, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 220, 105, 30));\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel6.setText(\"Precio Unitario\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, -1, -1));\n\n unitario.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n unitarioActionPerformed(evt);\n }\n });\n getContentPane().add(unitario, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 100, 105, 30));\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel7.setText(\"AGREGAR\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 350, -1, -1));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel8.setText(\"Stock Maximo\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 190, -1, -1));\n\n tipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Seleccione el Tipo\" }));\n tipo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tipoActionPerformed(evt);\n }\n });\n getContentPane().add(tipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 150, 190, -1));\n\n pack();\n }", "public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CierreCajaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }", "private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "public AttributeDialog(Frame aFrame, String attribute, Vector aggs, String[] operators) {\r\n super(aFrame, true);\r\n\r\n setTitle(\"Attribute Aggregate/Filter Dialog: \"+attribute);\r\n\r\n this.attribute = attribute;\r\n this.aggregators = aggs;\r\n\r\n JPanel aggPanel = new JPanel();\r\n aggPanel.setBorder(BorderFactory.createTitledBorder(\"Aggregators\"));\r\n\r\n Vector v = new Vector();\r\n v.addElement(\"No Aggregator\");\r\n for (int i=0; i<aggregators.size(); i++) {\r\n v.addElement(((TASKAggInfo)aggregators.elementAt(i)).getName());\r\n }\r\n\r\n aggList = new JComboBox(v);\r\n aggList.setSelectedIndex(0);\r\n aggList.setRenderer(new MyComboBoxRenderer());\r\n aggPanel.add(aggList);\r\n\r\n aggList.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) { \r\n JComboBox cb = (JComboBox)e.getSource();\r\n int index = cb.getSelectedIndex();\r\n if (index == 0) {\r\n arg1.setEnabled(false);\r\n arg1.setText(\"N/A\");\r\n arg2.setEnabled(false);\r\n arg2.setText(\"N/A\");\r\n }\r\n else {\r\n TASKAggInfo ai = (TASKAggInfo)aggregators.elementAt(index-1);\r\n if (ai.getNumConstArgs() == 1) {\r\n arg1.setEnabled(true);\r\n if (arg1.getText().equals(\"N/A\")) {\r\n arg1.setText(\"Argument 1\");\r\n }\r\n arg2.setEnabled(false);\r\n arg2.setText(\"N/A\");\r\n }\r\n else {\r\n arg1.setEnabled(true);\r\n if (arg1.getText().equals(\"N/A\")) {\r\n arg1.setText(\"Argument 1\");\r\n }\r\n arg2.setEnabled(true);\r\n if (arg2.getText().equals(\"N/A\")) {\r\n arg2.setText(\"Argument 2\");\r\n }\r\n }\r\n }\r\n }\r\n });\r\n \r\n arg1 = new JTextField(10);\r\n arg2 = new JTextField(10);\r\n aggPanel.add(arg1);\r\n aggPanel.add(arg2);\r\n arg1.setEnabled(false);\r\n arg1.setText(\"N/A\");\r\n arg2.setEnabled(false);\r\n arg2.setText(\"N/A\");\r\n\r\n JPanel filterPanel = new JPanel(new FlowLayout());\r\n JLabel label = new JLabel(attribute);\r\n filterPanel.setBorder(BorderFactory.createTitledBorder(\"Filter\"));\r\n opMenu = new JComboBox(operators);\r\n field = new JTextField(30);\r\n filterPanel.add(label);\r\n filterPanel.add(opMenu);\r\n filterPanel.add(field);\r\n\r\n JButton ok = new JButton(\"OK\");\r\n ok.addActionListener(this);\r\n JButton cancel = new JButton(\"Cancel\");\r\n cancel.addActionListener(this);\r\n JPanel submit = new JPanel(new FlowLayout(FlowLayout.CENTER,5,5));\r\n submit.add(ok);\r\n submit.add(cancel);\r\n\r\n JPanel main = new JPanel(new GridLayout(0,1));\r\n main.add(aggPanel);\r\n main.add(filterPanel);\r\n main.add(submit);\r\n \r\n getContentPane().add(main);\r\n\r\n addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n }\r\n });\r\n\r\n setResizable(false);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mainWrapper = new javax.swing.JPanel();\n lblAction = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtCpf = new javax.swing.JTextField();\n txtName = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n cbCateg = new javax.swing.JComboBox<>();\n btnAction = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n mainWrapper.setBackground(new java.awt.Color(255, 255, 255));\n\n lblAction.setFont(new java.awt.Font(\"Helvetica\", 1, 24)); // NOI18N\n lblAction.setForeground(new java.awt.Color(102, 102, 102));\n lblAction.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblAction.setText(\"Cadastrar Cliente\");\n\n jLabel2.setFont(new java.awt.Font(\"Helvetica\", 0, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(102, 102, 102));\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"<html>Farma<b>Ware</b></html>\");\n\n jLabel3.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(102, 102, 102));\n jLabel3.setText(\"CPF:\");\n\n txtCpf.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n\n txtName.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n\n jLabel4.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(102, 102, 102));\n jLabel4.setText(\"Nome:\");\n\n jLabel6.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(102, 102, 102));\n jLabel6.setText(\"Categoria:\");\n\n cbCateg.setFont(new java.awt.Font(\"Helvetica\", 0, 14)); // NOI18N\n cbCateg.setForeground(new java.awt.Color(102, 102, 102));\n cbCateg.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Cliente padrão\", \"Aposentado\" }));\n cbCateg.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n\n javax.swing.GroupLayout mainWrapperLayout = new javax.swing.GroupLayout(mainWrapper);\n mainWrapper.setLayout(mainWrapperLayout);\n mainWrapperLayout.setHorizontalGroup(\n mainWrapperLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblAction, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGroup(mainWrapperLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(mainWrapperLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel6)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(txtCpf)\n .addComponent(txtName)\n .addComponent(cbCateg, 0, 268, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n mainWrapperLayout.setVerticalGroup(\n mainWrapperLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainWrapperLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(lblAction)\n .addGap(30, 30, 30)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cbCateg, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)\n .addGap(20, 20, 20))\n );\n\n btnAction.setFont(new java.awt.Font(\"Helvetica\", 1, 14)); // NOI18N\n btnAction.setForeground(new java.awt.Color(102, 102, 102));\n btnAction.setText(\"Cadastrar\");\n btnAction.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n btnAction.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnActionActionPerformed(evt);\n }\n });\n\n btnCancel.setFont(new java.awt.Font(\"Helvetica\", 1, 14)); // NOI18N\n btnCancel.setForeground(new java.awt.Color(102, 102, 102));\n btnCancel.setText(\"Cancelar\");\n btnCancel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(20, Short.MAX_VALUE)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(btnAction, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(20, Short.MAX_VALUE))\n .addComponent(mainWrapper, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(mainWrapper, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAction, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20))\n );\n\n pack();\n }", "protected void do_comboBox_actionPerformed(ActionEvent arg0) {\n\t\tif(genderComboBox.getSelectedItem().toString().equals(\"Other\"))\n\t\t\totherGenderTF.setVisible(true);\n\t}" ]
[ "0.7384198", "0.7049507", "0.6835917", "0.68312067", "0.6784563", "0.66836697", "0.66785115", "0.6668813", "0.66625935", "0.6660611", "0.6656049", "0.66452706", "0.663445", "0.66089845", "0.6582725", "0.6573971", "0.65687615", "0.65239006", "0.651212", "0.65049106", "0.64943975", "0.6470273", "0.6450655", "0.6441205", "0.6430203", "0.64231247", "0.6420202", "0.64002436", "0.63991237", "0.6395103", "0.63921785", "0.63836694", "0.63823605", "0.63793284", "0.6373755", "0.63521886", "0.63462967", "0.6340081", "0.63348824", "0.633089", "0.6317544", "0.6314292", "0.631245", "0.630974", "0.63086075", "0.6295253", "0.62921596", "0.6290363", "0.6283582", "0.6281824", "0.6278955", "0.6276851", "0.6266658", "0.626432", "0.62632525", "0.62632525", "0.62632525", "0.62632525", "0.62632525", "0.6260918", "0.624216", "0.6211153", "0.62095606", "0.6200753", "0.6195804", "0.6185191", "0.61787456", "0.617053", "0.6167584", "0.61672735", "0.6164101", "0.6162861", "0.61621076", "0.61583126", "0.6156311", "0.6150976", "0.61440873", "0.6143254", "0.6138266", "0.6137187", "0.6136457", "0.6134385", "0.61343014", "0.61332244", "0.6130782", "0.6130163", "0.6129567", "0.6125416", "0.61143994", "0.61133224", "0.6111945", "0.61118764", "0.61111015", "0.6106633", "0.6102674", "0.610148", "0.61012256", "0.60996366", "0.60988045", "0.60964787", "0.6096166" ]
0.0
-1
CHAMADA DE TELA ////////////////////////////////////////////
@SuppressWarnings("static-access") private void abrirTelaNovoArtista() { FrmArtistaCad newArtista = new FrmArtistaCad(); newArtista.setVisible(true); newArtista.setDefaultCloseOperation(newArtista.DISPOSE_ON_CLOSE); newArtista.setResizable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "String getCADENA_TRAMA();", "private DittaAutonoleggio(){\n \n }", "private UsineJoueur() {}", "@Override public String getMasa(){\n return \"gruesa \";\n }", "public void leerAlimentos();", "void kiemTraThangHopLi() {\n }", "MaquinaCafetera(){\n }", "public void Ordenamiento() {\n\n\t}", "public void asetaTeksti(){\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n protected String elaboraBody() {\n String text = CostBio.VUOTO;\n int numCognomi = mappaCognomi.size();\n int numVoci = Bio.count();\n int taglioVoci = Pref.getInt(CostBio.TAGLIO_NOMI_ELENCO);\n\n text += A_CAPO;\n text += \"==Cognomi==\";\n text += A_CAPO;\n text += \"Elenco dei \";\n text += LibWiki.setBold(LibNum.format(numCognomi));\n text += \" cognomi '''differenti''' utilizzati nelle \";\n text += LibWiki.setBold(LibNum.format(numVoci));\n text += \" voci biografiche con occorrenze maggiori di \";\n text += LibWiki.setBold(taglioVoci);\n text += A_CAPO;\n text += creaElenco();\n text += A_CAPO;\n\n return text;\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "Lingua getLingua();", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "ConjuntoTDA claves();", "public FaseDescartes faseJuego();", "public void mo4359a() {\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "private void limpiarDatos() {\n\t\t\n\t}", "public void onderbreek(){\n \n }", "protected FanisamBato(){\n\t}", "void pasarALista();", "public void travaille();", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "void tampilKarakterA();", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\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 jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public void datos_elegidos(){\n\n\n }", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic String hablar() {\n\t\treturn \"Hola, soy un Buitre y sť volar\";\n\t}", "public void mo1531a() {\n }", "public void mo12930a() {\n }", "T mo26439a();", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public abstract java.lang.String getAcma_descripcion();", "@Override\n\tvoid geraDados() {\n\n\t}", "Funcionario(){\n }", "public void mo6081a() {\n }", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}", "public void themesa()\n {\n \n \n \n \n }", "@Override\n\tpublic String gettenMonHoc() {\n\t\treturn \"Lâp trình front-end\";\n\t}", "void mo1637a();", "public void mo9848a() {\n }", "@Override\n public String toString() {\n return tla;\n }", "public contrustor(){\r\n\t}", "public void mo5382o() {\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}", "public Aritmetica(){ }", "public TebakNusantara()\n {\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public void aplicarDescuento();", "T mo16685a();", "@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}", "@Override\n\tpublic void anular() {\n\n\t}", "public String getName()\r\n {\n return \"arctan\";\r\n }", "@Override\n public int getAltura(){\n return(super.getAltura());\n }", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "protected void mo6255a() {\n }", "private void mostrarEmenta (){\n }", "public abstract String tiposervicio();", "public void makeTea() {\n\t\tboil();\n\t\taddSugar();\n\t\taddTea();\n\t\tserve();\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public static void main(String[] args) {\n \n //Joueur zidane=new Joueur(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,34,Sponsor.FLY_EMIRATES);\n // Attaquant messi=new Attaquant(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,10,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Milieu xavi=new Milieu(\"xavi\",\"xava\",\"go\", \"12/07/1990\",\"barcelone\",\"espagnol\",78.5f,1.85f, Sexe.HOMME,Pied.DROIT,Tenue.JOGGING,15,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Defenseur ramos=new Defenseur(\"xavi\",\"ramos\",\"ifjiej\", \"18/07/1990\",\"madrid\",\"espagnol\",78.5f,1.88f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES,PosteJoueur.MILIEU);\n //ramos.celebrer();\n //ramos.defendre();\n //Gardien neuer=new Gardien(\"neuer\",\"manuel\",\"ifjiej\", \"18/07/1991\",\"Bayern\",\"bayern\",88.5f,1.95f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES);\n //neuer.sortir();\n //Spectateur paul=new Spectateur(\"bollart\",12,false,false);\n //Arbitre guillaume=new Arbitre(\"ovigneur\",\"guillaume\",\"guigou\",\"12/07/1676\",\"Lille\", \"France\", 1.98f,1.67f,Sexe.HOMME,Pied.DROIT,Tenue.SHORT,48,Sponsor.MORELLE);\n Equipe marseille= new Equipe (NomEquipe.OM);\n Equipe paris= new Equipe (NomEquipe.PSG);\n Match match=new Match(TypeTerrain.GAZON,marseille,paris);\n match.simulerMatch();\n System.out.println(match.equipeGagnante);\n System.out.println(marseille.attaquants[2].getStatTir());\n \n Tournoi tournoi = new Tournoi(); \n tournoi.qualificaionsTournoi();\n tournoi.huitiemes();\n tournoi.quarts();\n tournoi.demi();\n tournoi.finale();\n \n System.out.println(tournoi.getEquipeEnLis());\n System.out.println(tournoi.getEquipeQualifie());\n System.out.println(tournoi.getEquipePerdanteHuit());\n System.out.println(tournoi.getEquipeGagnanteHuit());\n System.out.println(tournoi.getEquipePerdanteQuarts());\n System.out.println(tournoi.getEquipeGagnanteQuarts());\n System.out.println(tournoi.getEquipePerdanteDemi());\n System.out.println(tournoi.getEquipeGagnanteDemi());\n System.out.println(tournoi.getEquipeFinale());\n\n \n \n //Mise en place de \"l'interface\"\n Scanner sc = new Scanner(System.in);\n \n //Choix du mode de jeu\n System.out.println(\"\\n *** Choix du mode de jeu *** \\n\\t| tournoi : taper 1|\\n\\t| mode solo : taper 2|\");\n int modeDeJeu = sc.nextInt();\n sc.nextLine(); //On vide la ligne\n \n //AJOUTER UNE EXCEPTION POUR LE MODE DE JEU\n \n \n \n //Choix de l'equipe a l'aide d'un scanner\n// System.out.println(\"Choisissez votre équipe :\");\n// NomEquipe equipe;\n// Equipe equipeChoisit = new Equipe(nomEquipe);\n \n\n\n /*Scanner sc = new Scanner(System.in);\n System.out.println(\"Voulez vous disputer un match ? Oui=1 ou NON=2 \");\n int i = sc.nextInt();\n System.out.println(\"Saisissez le numéro de l'equipe avec laquelle vous voulez Jouez \"\n + \"PSG :1\"\n + \"MARSEILLE:2 \");\n //On vide la ligne avant d'en lire une autre\n sc.nextLine();\n int equipe = sc.nextInt(); \n System.out.println(\"FIN ! \");\n \n switch(equipe) {\n case 1:\n Equipe paris= new Equipe (NomEquipe.PSG);\n System.out.println(paris.stade);\n break;\n case 2 :\n Equipe marseille= new Equipe (NomEquipe.OM);\n System.out.println(marseille.stade);\n \n }*/\n }", "String getTitolo();", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hola Mundo\");\n\t\t\n\t\t//--------------------------------------------------\n\t\t\n\t\t// Tipos de datos primitivos inician con minúscula\n\t\t\n\t\t// Enteros\n\t\tbyte edad = 24; // Tamaño: -128 a 127\n\t\tshort año = 20020;\n\t\tint idUsuario = 1847590;\n\t\tlong idAmazon = 109399029304012092L; // L es necesario al final, para identificarlo como long\n\t\t\n\t\t// Floante (Decimal)\n\t\tfloat radio = 35.63F; //F es necesario al final, para identificarlo como float\n\t\tdouble precio_acumulado = 34542342.546404935945034; // Se usa para datos con mayor precisión\n\t\t\n\t\t// Char (Un solo caracter)\n\t\tchar genero = 'M';\n\t\t\n\t\t// Lógico (Booleano)\n\t\tboolean visible = false;\n\t\tboolean funciona = true;\n\t\t\n\t\t// Constantes siempre en Mayúsculas\n\t\tint INICIA = 1;\n\t\tint VALOR_MAXIMO = 1524;\n\t\t\n\t\t//Lower camel case para variables, métodos u objetos\n\t\tint minValor = 1;\n\t\tboolean pruebaGit = true;\n\t\t\n\t\t//---------------------------------------------------------------\n\t\t\n\t\t// Cast automático\n\t\tbyte b = 24;\n\t\tshort s = b;\n\t\tb = (byte) s; // Cast explícito o manual\n\t\t\n\t\tint i = 24;\n\t\tdouble d = 12.24;\n\t\ti = (int) d; // Recorta el decimal, solo toma la parte entera del número\n\t\t\n\t\tint codigo = 97;\n\t\tchar codigoASCII = (char) codigo; // Cast explícito\t\t\n\t\t\n\t\t// Short a Byte\n\t\tshort numero = 2020;\n\t\tbyte numByte = (byte) numero; // Casting de un dato mas grande que el rango\n\t\t\t\t\t\t\t\t\t // del tipo de dato destino, genera números \"aleatorios\".\n\t\t\n\t\tSystem.out.println(\"\\n\" + numByte); // + variable (Concatenación)\n\t\tSystem.out.println(codigoASCII);\n\t\t\n\t\t//----------------------------------------------------\n\t\t\n\t\t// Arreglos\n\t\t\n\t\t// Formas de declarar un arreglo\n\t\tint[] arrayEntero;\n\t\tdouble arrayDouble[];\n\t\t\n\t\t// Iniciarlo\n\t\t// tipoDeDato[Dimensión] NombreDelArreglo = new tipoDeDato[N° de elementos]\n\t\tdouble[] arreglo1D = new double[3]; \n\t\tint[][] arreglo2D = new int[2][3]; // Arreglo 2D de 6 elementos\n\t\tchar[][][] arreglo3D = new char[3][3][2]; // Arreglo 3D de 18 elementos\n\t\t\n\t\t// Llenando el arreglo\n\t\tchar[][] days = { {'L','M','M'},\n\t\t\t\t\t\t {'J','V','S'} };\n\t\t\n\t\tchar[][][] days3D = { { {'a','b','c'}, {'d','e','f'} },\n\t\t\t\t\t\t\t { {'d','e','f'}, {'a','b','c'} } };\n\t\t\n\t\t// Agregar elementos al arreglo mediante los índices\n\t\tchar[] saludo = new char[4];\n\t\t\n\t\tsaludo[0] = 'H';\n\t\tsaludo[1] = 'o';\n\t\tsaludo[2] = 'l';\n\t\tsaludo[3] = 'a';\n\t\t\n\t\tSystem.out.println(\"\\n\" + saludo[0]);\n\t\tSystem.out.println(saludo[1]);\n\t\tSystem.out.println(saludo[2]);\n\t\tSystem.out.println(saludo[3]);\n\t\t\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Operadores aritméticos\n\t\tSystem.out.println(\"\\n\"+ 12+21);\n\t\tSystem.out.println(20-5);\n\t\tSystem.out.println(12*15);\n\t\tSystem.out.println(15/3);\n\t\tSystem.out.println(17%5);\n\t\t\n\t\t// Operadores de asignación\n\t\tint a = 10;\n\t\tSystem.out.println(\"\\n\" + (a += 2)); // Es equivalente: a = a + 2; + (Asignaciones de variables)\n\t\tSystem.out.println(a -= 3);\n\t\tSystem.out.println(a *= 4);\n\t\tSystem.out.println(a /= 5);\n\t\tSystem.out.println(a %= 6);\n\t\t\n\t\t\n\t\t// Operadores de incremento y decremento (Prefijo y Postfijo)\n\t\tint p = 5;\n\t\t\n\t\t/* ++p\n\t\t * 1. Incrementa el valor p + 1\n\t\t * 2. Asigna el valor a p */\n\t\tSystem.out.println(\"\\n\" + (++p));\n\t\t\n\t\t/* p++\n\t\t * Asigna el valor a p, p = p\n\t\t * Incrementa el valor p + 1 */\n\t\tSystem.out.println(p++); // Imprime el mismo valor 5\n\t\tSystem.out.println(p); // Imprime el valor aumentado en 1, 6\n\t\t\n\t\t// Operadores de equidad (Booleanos)\n\t\tint r = 24;\n\t\tint w = 12;\n\t\t\n\t\tSystem.out.println(\"\\n\" + (r == w));\n\t\tSystem.out.println(r != w);\n\t\t\n\t\t// Operadores relacionales\n\t\tSystem.out.println(\"\\nr > w -> \" + (r > w));\n\t\tSystem.out.println(r < w);\n\t\tSystem.out.println(r >= w);\n\t\tSystem.out.println(r <= w);\n\t\t\n\t\t// Operadores lógicos\n\t\tboolean n = false;\n\t\tboolean m = true;\n\t\t\n\t\tSystem.out.println(\"\\nn && m -> \" + (n && m));\n\t\tSystem.out.println(n || m);\n\t\tSystem.out.println(!n);\n\t}", "public abstract java.lang.String getAcma_cierre();", "public Cgg_jur_anticipo(){}", "public void makeTea(){\n size();\n temp();\n type();\n additives();\n }", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public void tipoDatos() {\n\t\tint num = 10;\n\t\t// Texto STring\n\t\tString cadena = \"cadena\";\n\n\t\t// Decimale O flotante\n\t\tdouble decimal = 12.16;\n\t\tfloat fl = new Float(10);\n\t\t// Bolean\n\t\tboolean bl = true;\n\n\t\t// ARREGLOS\n\t\t// string\n\t\tString[] veString = new String[5];\n\t\tveString[0] = \"hola mundo\";\n\t\tveString[1] = \"hola mundo\";\n\t\tveString[2] = \"hola mundo\";\n\t\tveString[3] = \"hola mundo\";\n\t\tveString[4] = \"hola mundo\";\n\n\t\tint[] varNum = new int[] { 0, 1, 2, 3, 4, 5 };\n\n\t}", "Makhluk() { // kosong\n\n }", "protected String elaboraTemplateAvviso() {\n String testo = VUOTA;\n String dataCorrente = date.get();\n String personeTxt = \"\";\n personeTxt = text.format(numVoci);\n\n if (usaHeadTemplateAvviso) {\n testo += tagHeadTemplateAvviso;\n testo += \"|bio=\";\n testo += personeTxt;\n testo += \"|data=\";\n testo += dataCorrente.trim();\n testo += \"|progetto=\";\n testo += tagHeadTemplateProgetto;\n testo = LibWiki.setGraffe(testo);\n }// end of if cycle\n\n return testo;\n }", "Reserva Obtener();", "public static void main(String[] args) \n {\n // Llamado de la función etapas\n Scanner sc = new Scanner(System.in); \n int edad_paco = sc.nextInt(); //Obtener por consola edad de paco\n etapas(edad_paco);\n \n }", "public String saludoCastellano () {\n\t\treturn \"hola\";\n\t}", "public FuncionesSemanticas(){\r\n\t}", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public void ciudad(){\n System.out.println(\"ciudad londres\");\n }" ]
[ "0.6434902", "0.6406354", "0.62130445", "0.61277884", "0.61216563", "0.6115799", "0.60209507", "0.6020176", "0.59813356", "0.59578943", "0.5950668", "0.59328914", "0.5897237", "0.58962333", "0.58763635", "0.58571005", "0.5856177", "0.57933515", "0.5785315", "0.57835907", "0.5782027", "0.57544667", "0.57457167", "0.5740978", "0.5740068", "0.57393676", "0.5729604", "0.57251406", "0.5709546", "0.5682555", "0.56807023", "0.56795347", "0.56747186", "0.5670144", "0.56661147", "0.56661147", "0.56661147", "0.56661147", "0.56661147", "0.56661147", "0.56661147", "0.5638199", "0.56366694", "0.563472", "0.56234664", "0.5622416", "0.56168175", "0.56161994", "0.56125677", "0.56099683", "0.5606473", "0.5604407", "0.55980015", "0.5593491", "0.5572617", "0.5570319", "0.5569005", "0.55667514", "0.55651104", "0.55596775", "0.5559044", "0.5551097", "0.55466944", "0.5539057", "0.55376965", "0.553686", "0.55355304", "0.55215716", "0.5519444", "0.55192024", "0.551692", "0.5511355", "0.5507534", "0.5504269", "0.5493132", "0.5489952", "0.54896307", "0.5483683", "0.54794985", "0.54784733", "0.546439", "0.54609036", "0.5456732", "0.54553825", "0.5453655", "0.54509157", "0.544566", "0.54428077", "0.54346466", "0.54342806", "0.5431696", "0.5423383", "0.5423362", "0.5415431", "0.54119825", "0.54110163", "0.54101664", "0.5405087", "0.5399514", "0.5393618", "0.5392127" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { FrmCategoriaEdit frame = new FrmCategoriaEdit(); frame.setVisible(true); frame.setLocation(0,0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Created by yule on 2016/4/29.
public interface OnListFragmentInteractionListener { void onListFragmentInteraction(DummyContent.DummyItem item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\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\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\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 public void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "private void kk12() {\n\n\t}", "@Override\n void init() {\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 }", "public void mo6081a() {\n }", "private void init() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\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\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void init() {\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo12628c() {\n }", "@Override\n public void initialize() { \n }", "private void strin() {\n\n\t}", "protected void mo6255a() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}" ]
[ "0.6243957", "0.62052846", "0.6064328", "0.603671", "0.5978947", "0.5978947", "0.59761715", "0.59683233", "0.59212697", "0.585688", "0.58524334", "0.5849205", "0.581734", "0.5814225", "0.58049953", "0.57922465", "0.5790412", "0.57712847", "0.57638556", "0.5760652", "0.57530606", "0.5746402", "0.5742318", "0.57331324", "0.57331324", "0.57331324", "0.57331324", "0.57331324", "0.57323575", "0.57320905", "0.57249606", "0.57243574", "0.56884223", "0.56874835", "0.56874835", "0.5681476", "0.567885", "0.56704396", "0.5669856", "0.56695646", "0.56695646", "0.56695646", "0.56695646", "0.56695646", "0.56695646", "0.56695646", "0.5663134", "0.56618714", "0.5661588", "0.56585145", "0.5648726", "0.56476676", "0.5628959", "0.56288373", "0.56288373", "0.5611421", "0.5611421", "0.5611421", "0.5611421", "0.5611421", "0.5611421", "0.56110066", "0.56110066", "0.56110066", "0.5603149", "0.56015724", "0.5598913", "0.5598913", "0.5598913", "0.55975676", "0.55975676", "0.5595748", "0.5594991", "0.5592875", "0.5592875", "0.5592875", "0.55913895", "0.5587258", "0.55824816", "0.55720896", "0.5548986", "0.5542046", "0.5541065", "0.5535744", "0.55318594", "0.55279833", "0.5524346", "0.55169636", "0.5516425", "0.5515253", "0.55072504", "0.55043834", "0.54852825", "0.548405", "0.54829085", "0.5467811", "0.54542917", "0.54531646", "0.54500014", "0.54469347", "0.54463947" ]
0.0
-1
/ Gets all the public, protected, default (package) access, and private fields, including inherited fields, that have desired annotations.
static boolean includeFieldAnnotations( AnnotationToXML atx, TypeDeclaration typeDecl, String additionalAnnotation ) { boolean hasFieldAnnotations = false; if (! (typeDecl instanceof ClassDeclaration)) { return hasFieldAnnotations; } ClassDeclaration jclass = (ClassDeclaration) typeDecl; FieldDeclaration[] fields = jclass.getFields(); for (int i = 0; i < fields.length; i++) { AnnotationInstance fieldAnnotation = CompilerUtils.getAnnotation(fields[i], JpfLanguageConstants.SHARED_FLOW_FIELD_TAG_NAME); if (fieldAnnotation == null) { fieldAnnotation = CompilerUtils.getAnnotationFullyQualified(fields[i], CONTROL_ANNOTATION); } if (fieldAnnotation == null && additionalAnnotation != null) { fieldAnnotation = CompilerUtils.getAnnotation(fields[i], additionalAnnotation); } if (fieldAnnotation != null) { atx.include(fields[i], fieldAnnotation); hasFieldAnnotations = true; } } ClassType superclass = jclass.getSuperclass(); boolean superclassHasFieldAnns = false; if (superclass != null) { superclassHasFieldAnns = includeFieldAnnotations(atx, CompilerUtils.getDeclaration(superclass), additionalAnnotation); } return hasFieldAnnotations || superclassHasFieldAnns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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}", "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 String[] getAllFilledAnnotationFields();", "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 }", "private static List<AccessibleObject> getAnnotatedFields(\n Class<? extends Annotation> annotationClass,\n Object obj,\n int maxPerClass) {\n ImmutableList.Builder<AccessibleObject> attrs = ImmutableList.builder();\n\n // Fields\n Class<?> objClass = obj.getClass();\n for (Field field : objClass.getDeclaredFields()) {\n Object annotation = field.getAnnotation(annotationClass);\n if (annotation != null) {\n if (!field.isAccessible()) {\n field.setAccessible(true);\n }\n attrs.add(field);\n }\n }\n\n // Methods\n for (Method method : objClass.getDeclaredMethods()) {\n Object annotation = method.getAnnotation(annotationClass);\n if (annotation != null) {\n if (!method.isAccessible()) {\n method.setAccessible(true);\n }\n attrs.add(method);\n }\n }\n\n // Verify limit\n List<AccessibleObject> attrList = attrs.build();\n if (attrList.size() > maxPerClass) {\n throw new IllegalArgumentException(String.format(\n \"class %s has %d attributes annotated with %s\",\n obj.getClass().getCanonicalName(),\n attrList.size(),\n annotationClass.getCanonicalName()));\n }\n return attrList;\n }", "public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();", "public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate Set<Field> getPersistenceFields(Class<?> clz) {\n\t\tSet fields = new HashSet();\n\t\tfor (Field f : clz.getDeclaredFields()) {\n\t\t\tif (f.isAnnotationPresent(Persistence.class)) {\n\t\t\t\tf.setAccessible(true);\n\t\t\t\tfields.add(f);\n\t\t\t}\n\t\t}\n\t\treturn fields;\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n if (typeExpression != null && typeExpression instanceof J.AnnotatedType) {\n allAnnotations.addAll(((J.AnnotatedType) typeExpression).getAnnotations());\n }\n return allAnnotations;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDExposureField[] getFields();", "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 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}", "private Map<String,Field> getAllFields(Class clazz) {\n return this.getAllFields(clazz, false);\n }", "public List<Annotation> getMembers();", "protected Collection<Field> getAnnotatedFields(Class<?> clazz, Class<? extends Annotation> annotationType) {\n\t\tMap<String, Field> fields = new TreeMap<String, Field>();\n\t\tfor(Field f: clazz.getFields()) {\n\t\t\tAnnotation ann = f.getAnnotation(annotationType);\n\t\t\tif(ann==null) continue;\n\t\t\tfields.put(getFieldDescriptor(f), f);\n\t\t}\n\t\tfor(Field f: clazz.getDeclaredFields()) {\n\t\t\tAnnotation ann = f.getAnnotation(annotationType);\n\t\t\tif(ann==null) continue;\n\t\t\tfields.put(getFieldDescriptor(f), f);\t\t\t\n\t\t}\n\t\treturn fields.values();\n\t}", "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}", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n allAnnotations.addAll(kind.getAnnotations());\n return allAnnotations;\n }", "public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }", "@PropertyGetter(role = ANNOTATION)\n\tList<CtAnnotation<? extends Annotation>> getAnnotations();", "public static List<Field> getInheritedPrivateFields(Class<?> type)\r\n {\r\n List<Field> result = new ArrayList<Field>();\r\n \r\n Class<?> i = type;\r\n while (i != null && i != Object.class) {\r\n for (Field field : i.getDeclaredFields()) {\r\n if (!field.isSynthetic()) {\r\n result.add(field);\r\n }\r\n }\r\n i = i.getSuperclass();\r\n }\r\n \r\n return result;\r\n }", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n if (typeParameters != null) {\n allAnnotations.addAll(typeParameters.getAnnotations());\n }\n if (returnTypeExpression instanceof AnnotatedType) {\n allAnnotations.addAll(((AnnotatedType) returnTypeExpression).getAnnotations());\n }\n allAnnotations.addAll(name.getAnnotations());\n return allAnnotations;\n }", "public abstract List<String> getAdditionalAccessions();", "java.lang.String getFields();", "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}", "@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}", "@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }", "public static void getFields (Class<?> clazz, List<Field> addTo)\n {\n // first get the fields of the superclass\n Class<?> pclazz = clazz.getSuperclass();\n if (pclazz != null && !pclazz.equals(Object.class)) {\n getFields(pclazz, addTo);\n }\n \n // then reflect on this class's declared fields\n Field[] fields;\n try {\n fields = clazz.getDeclaredFields();\n } catch (SecurityException se) {\n System.err.println(\"Unable to get declared fields of \" + clazz.getName() + \": \" + se);\n fields = new Field[0];\n }\n \n // override the default accessibility check for the fields\n try {\n AccessibleObject.setAccessible(fields, true);\n } catch (SecurityException se) {\n // ah well, only publics for us\n }\n \n for (Field field : fields) {\n int mods = field.getModifiers();\n if (Modifier.isStatic(mods) || Modifier.isTransient(mods)) {\n continue; // skip static and transient fields\n }\n addTo.add(field);\n }\n }", "List<FieldNode> getFields() {\n return this.classNode.fields;\n }", "@Override\n\tpublic Annotation[] getDeclaredAnnotations() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Field> getAll() {\n\t\treturn null;\n\t}", "List<Field> getFields();", "private <T> Map<String, Field> getFields(final Class<T> destinationClass) {\n final Map<String, Field> mappedFields = new HashMap<>();\n logger.trace(\"Retrieving all declared fields for class: {}\", destinationClass);\n final List<Field> declaredFields = getFields(new ArrayList<>(), destinationClass);\n\n for (Field field : declaredFields) {\n if (!field.isAnnotationPresent(Ignore.class)) {\n mapFieldName(mappedFields, field);\n }\n }\n\n return mappedFields;\n }", "ISourceField[] getFields();", "List<? extends T> getDeclaredProperties();", "com.google.protobuf.Struct getMetadataFields();", "public List<String> showFields() {\n Client client = new Client();\n Class<?> objFields = client.getClass();\n List<String> list = new ArrayList<>();\n for (Field field : objFields.getDeclaredFields()) {\n list.add(field.getName());\n }\n return list;\n }", "private List getMappingFieldsInternal() {\n if (fields == null) {\n fields = new ArrayList();\n }\n\n return fields;\n }", "@Override\n public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n return fields_;\n }", "public List<Fw> getAllFields(final Class<?> aClass) {\n\t\tList<Fw> result = new ArrayList<>();\n\t\tresult.addAll(this.getSpecialFields(aClass));\n\t\tList<Field> classFields = Arrays.asList(aClass.getDeclaredFields());\n\t\tfor (Field fld : this.getAllTheFields(aClass)) {\n\t\t\tboolean isSuperField = !classFields.contains(fld);\n\t\t\tresult.add(this.makeFw(fld, aClass, isSuperField));\n\t\t}\n\n\t\tthis.removeDoubleIdField(result);\n\t\treturn this.sortAllFields(result);\n\t}", "Fields fields();", "public Map<Field, String> getAuditableFields();", "@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "private static void getAllFields(Class<?> clazz, ArrayList<Field> all_fields, ArrayList<Class<?>> all_classes) {\n\t\tif (clazz == Object.class)\n\t\t\treturn;\n\t\tall_classes.add(clazz);\n\t\t//Field [] element_fields_ = clazz.getFields();\n\t\tField [] element_fields = clazz.getDeclaredFields(); //clazz.getFields();\n\t\tfor (Field f: element_fields) {\n\t\t\tall_fields.add(f);\n\t\t}\n\t\tgetAllFields(clazz.getSuperclass(), all_fields, all_classes);\n\t\t\n\t\treturn;\n\t}", "public List<Annotation> getAnnotations() {\n return this.annotations.obtainAll();\n }", "@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }", "public static Field[] getFieldsInClassHierarchy(Class<?> clazz) {\n Field[] fields = {};\n while (clazz != null) {\n fields = (Field[]) ArrayUtils.addAll(fields, clazz.getDeclaredFields());\n clazz = clazz.getSuperclass();\n }\n return fields;\n }", "public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }", "public List<Field<T>> getFields()\r\n/* 63: */ {\r\n/* 64:84 */ return this.fields;\r\n/* 65: */ }", "java.util.List<? extends com.sagas.meta.model.MetaFieldDataOrBuilder> \n getFieldsOrBuilderList();", "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 List<AliasedField> getFields() {\r\n return fields;\r\n }", "@Override\n\t/**\n\t * returns the visibility modifiers for the specific class\n\t * \n\t * @return visibility modifiers \n\t */\n\tpublic String getVisability() {\n\t\treturn visability;\n\t}", "public static void getSuperFields(Class<?> clazz, ArrayList<Field> all_fields) {\n\t\tif (clazz == Object.class)\n\t\t\treturn;\n\t\t\n\t\t//Field [] element_fields_ = clazz.getFields();\n\t\tField [] element_fields = clazz.getDeclaredFields(); //clazz.getFields();\n\t\tfor (Field f: element_fields) {\n\t\t\tall_fields.add(f);\n\t\t}\n\t\tgetSuperFields(clazz.getSuperclass(), all_fields);\n\t\t\n\t\treturn;\n\t}", "@Override public final DeclContext$Fields $DeclContext$Fields() { return DeclContext$Flds; }", "java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList();", "public MappingField[] getMappingFields() {\n List myFields = getMappingFieldsInternal();\n return (MappingField[]) myFields.toArray(\n new MappingField[myFields.size()]);\n }", "@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}", "public List<AnnotationMirror> getAnnotations() {\n\t\treturn new ArrayList<>(annotations);\n\t}", "public Map<String,String> getAllCustomFields()\n\t{\n\t\treturn getAllCustomFields( getSession().getSessionContext() );\n\t}", "public String getFields() {\n return fields;\n }", "public abstract Annotations getClassAnnotations();", "private void readMethodsAnnotations() {\n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n Annotation[] annotations = method.getDeclaredAnnotations();\n for (Annotation a : annotations) {\n Class<? extends Annotation> aType = a.annotationType();\n List<Entry<Annotation>> list = entries.get(aType);\n if (list == null) {\n list = new ArrayList();\n entries.put(aType, list);\n }\n list.add(new Entry<>(method, a));\n }\n }\n }", "@External(readonly = true)\n\tpublic List<String> get_metadata_fields(){\n\t\t\n\t\treturn this.METADATA_FIELDS;\n\t}", "public Vector getAttributeFields() {\n\treturn attributeFields;\n }", "public PDUsPage verifyAllFieldsReadOnly(){\n\t\tString[] Fields = { \"PDUs_ReadOnlyName_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyManufacturer_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyModelId_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlySerialNumber_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyLocation_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyIPAddress_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyInputPower_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyGoLiveDate_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyShortDescription_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyOperationalStatus_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlyOwnerGroup_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlySystemManager_Xpath\",\n\t\t\t\t\"PDUs_ReadOnlySystemManagerMan_Xpath\"};\n\n\t\tString[] FieldsDesc = {\"Name\",\n\t\t\t\t\"Manufacturer\",\n\t\t\t\t\"Model Id\",\n\t\t\t\t\"Serial Number\",\n\t\t\t\t\"Location\",\n\t\t\t\t\"IP Address\",\n\t\t\t\t\"Input Power\",\n\t\t\t\t\"Go Live Date\",\n\t\t\t\t\"Short Description\",\n\t\t\t\t\"Operational Status\",\n\t\t\t\t\"CI Owner Group\",\n\t\t\t\t\"System Manager\",\n\t\t\t\t\"Secondary System Manager\"\n\t\t};\n\n\t\tverifyDisabledFieldsByXpath(Fields, FieldsDesc);\n\n\t\treturn this;\n\n\t}", "public List<Declaration> getIntroducedMembers();", "public static void main(String[] args) {\n\t\tSubAccessEx sub = new SubAccessEx();\r\n\t\tsub.subPrintField();\r\n\t\t\r\n\t\t//System.out.println(sub.c);//protected member\r\n\t\tSystem.out.println(sub.d); // public\r\n\t\t\r\n\t\t\r\n\t\tAccessEx acc = new AccessEx();\r\n//\t\tSystem.out.println(acc.a); // private\r\n//\t\tSystem.out.println(acc.b); // package(»ý·«)\r\n//\t\tSystem.out.println(acc.c); // protected\r\n\t\tSystem.out.println(acc.d); // public\r\n\t}", "public XSObjectList getAnnotations() {\n\treturn (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;\n }", "public AnnotationJava[] getAnnotations() {\n\t\treturn annotations;\n\t}", "com.google.protobuf.StructOrBuilder getMetadataFieldsOrBuilder();", "public ElementList[] getAnnotations() {\r\n return union.value();\r\n }", "public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}", "Set<Class<? extends Annotation>> getScanMethodAnnotations();", "public static List<Field> getAllFieldsFromAncestor(Class<?> clazz) {\n List<Field> fields = new ArrayList<>();\n for(Class<?> now = clazz; null != now; now = now.getSuperclass()) {\n Field[] nowFields = now.getDeclaredFields();\n // add from last to head\n for(int i = nowFields.length - 1; i >= 0; i--) {\n fields.add(nowFields[i]);\n }\n }\n // remember to reverse the fields got\n Collections.reverse(fields);\n return fields;\n }", "String[] getSharedFields();", "@Override\n public void visit(FieldDeclaration n, Object arg) {\n \tArrayList<String> field = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n \t\tString declare = n.toString();\n \t\tdeclare = declare.replaceAll(\"(?s)(.*)private\", \"private\");\n \t\tdeclare = declare.replaceAll(\"(?s)=(.*)\", \"\");\n \t\tfield.add(declare.trim());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tfield.add(comment.trim()); \n\t \tfields.add(field);\n \t}\n \t}", "public int getAccessFlags() {\n return access_flags;\n }", "public List<Field> getAllTheFields(Class<?> aSourceClass) {\n\t\tList<Field> result = new ArrayList<Field>();\n\t\tthis.getAllFields(aSourceClass, result);\n\t\treturn result;\n\t}", "@Override public final Redeclarable$Fields $Redeclarable$Fields() { return Redeclarable$Flds; }", "public List<String> retornaFields() {\n\t\treturn data.retornaFields();\n\t}", "public Element[] getAnnotations() {\r\n return union.value();\r\n }", "public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}", "public Permission[] getPermissionsField() {\n\treturn super.getPermissions(null);\n }", "Set<Class<? extends Annotation>> getScanTypeAnnotations();", "public ElementMap[] getAnnotations() {\r\n return union.value();\r\n }", "public String getSearchFields(Class<?>[] cs){\r\n\t\tStringBuffer fields=new StringBuffer();\r\n\t\tSet<String> list=new HashSet<String>();\r\n\t\tfor (Class<?> c:cs){\r\n\t\t\tList<java.lang.reflect.Field> map = ReflectUtil.getFieldMap(c);\r\n\t\t\tfor (java.lang.reflect.Field fld: map) {\r\n\t\t\t\tString name=getFieldName(fld);\r\n\t\t\t\tif (name==null) continue;\r\n\t\t\t\tif ((fld.getModifiers()&128)!=0) continue; //transient\r\n\t\t\t\tif (!list.contains(name)) list.add(name);\r\n\t\t\t}\r\n\t\t\t//System.out.println(\"SEARCHFIELD c=\"+c.getName()+\" fields=\"+list);\r\n\t\t}\r\n\t\tfor (String s:list){\r\n\t\t\tif (fields.length()>0) fields.append(\",\");\r\n\t\t\tfields.append(s);\r\n\t\t}\r\n\t\t\r\n\t\treturn fields.toString();\r\n\t}", "ImmutableList<SchemaOrgType> getAccessibilityAPIList();", "public EAdList<EAdField<?>> getFields() {\r\n\t\treturn fields;\r\n\t}", "java.util.List<Field>\n getFieldsList();", "private String[] getDefinedFields(ObjectSet<?> pObjectSet) {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> fieldsList = new ArrayList<String>();\r\n\t\t\r\n\t\tif (pObjectSet != null) {\r\n\t\t\tif (pObjectSet.getDataMappings().size() > 0) {\r\n\t\t\t\tfor(DataMapping mapping : pObjectSet.getDataMappings()) {\r\n\t\t\t\t\tif (!mapping.virtual && !mapping.IsCollection) {\r\n\t\t\t\t\t\tif (mapping.DataBaseDataType != Entity.DATATYPE_ENTITY) {\r\n\t\t\t\t\t\t\tfieldsList.add(mapping.DataBaseFieldName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (fieldsList.size() > 0) {\r\n\t\t\treturnedValue = fieldsList.toArray(new String[fieldsList.size()]);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "public List<AnnotationVertex> getAllAnnotations() {\n final List<AnnotationVertex> annotations = new ArrayList<>();\n annotations.addAll(getAnnotations());\n getParentMethod().ifPresent(m -> annotations.addAll(m.getAnnotations()));\n getParentClass().ifPresent(c -> annotations.addAll(c.getAllAnnotations()));\n return annotations;\n }", "public List<Declaration> implicitMembers();", "protected java.util.Vector getFieldVector() throws Exception {\n java.util.Vector fieldVector = new java.util.Vector();\n Class c = getClass();\n while (c != Class.forName(\"java.lang.Object\")) {\n Field[] fields = c.getDeclaredFields();\n for (int i = fields.length - 1; i >= 0; i--) {\n fieldVector.add(0, fields[i]);\n }\n c = c.getSuperclass();\n }\n return fieldVector;\n }", "public Map<String, Object> getAnnotations() {\n return ImmutableMap.copyOf(annotations);\n }", "private static Set<NullnessAnnotation> findAnnotations(final DetailAST ast) {\n final Set<NullnessAnnotation> result = new HashSet<>();\n\n final DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);\n for (DetailAST child = modifiers.getFirstChild(); child != null; child =\n child.getNextSibling()) {\n if (child.getType() == TokenTypes.ANNOTATION) {\n addNextNullnessAnnotation(result, child);\n }\n }\n\n return result;\n }", "public void test_sf_937810() throws IllegalAccessException {\n Field[] specs = OntModelSpec.class.getDeclaredFields();\n \n for (int i = 0; i < specs.length; i++) {\n if (Modifier.isPublic( specs[i].getModifiers()) && \n Modifier.isStatic( specs[i].getModifiers()) &&\n specs[i].getType().equals( OntModelSpec.class )) {\n OntModelSpec s = (OntModelSpec) specs[i].get( null );\n assertNotNull( s.getDescription() );\n }\n }\n }", "public Annotations getAnnotations() {\n\t\treturn annotations;\n\t}", "public Map<String, String> getFields() {\n return fields;\n }", "com.google.protobuf.ByteString\n getFieldsBytes();" ]
[ "0.71073896", "0.7094157", "0.70419425", "0.6937597", "0.6588856", "0.65548503", "0.6553958", "0.64990133", "0.6146606", "0.61386245", "0.61070216", "0.6085259", "0.6067051", "0.6059554", "0.60223985", "0.59896743", "0.5984462", "0.59616905", "0.5958796", "0.59452516", "0.5930159", "0.5927661", "0.59149307", "0.5898881", "0.58692795", "0.58641154", "0.58293813", "0.5817074", "0.58149946", "0.5807059", "0.5795021", "0.5773867", "0.5752628", "0.573972", "0.57372874", "0.5733184", "0.5724206", "0.57128215", "0.5706889", "0.5706475", "0.5688112", "0.56818426", "0.5681317", "0.56652546", "0.5649659", "0.5628734", "0.56154084", "0.55922455", "0.55654454", "0.5549768", "0.5540337", "0.5535112", "0.55272925", "0.55087787", "0.54910386", "0.5477212", "0.5454311", "0.54433227", "0.5424325", "0.5422866", "0.54146624", "0.54092735", "0.5408676", "0.53898585", "0.53846556", "0.5383591", "0.53722066", "0.53702563", "0.5359514", "0.5355957", "0.53335166", "0.53322333", "0.5327321", "0.5325847", "0.5325816", "0.53187233", "0.53184915", "0.53181964", "0.5309776", "0.530961", "0.53072834", "0.5300127", "0.5287539", "0.5278837", "0.5272616", "0.5263382", "0.526236", "0.5262288", "0.5251804", "0.5251175", "0.5248579", "0.52454853", "0.52451706", "0.5239496", "0.5237432", "0.5228964", "0.522327", "0.52214515", "0.52191806", "0.519394", "0.5184804" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { printletter c = new printletter(); c.Letter(); }
{ "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
================================================================================================================== Inner class ================================================================================================================== =================================================================================================== NewConversation ===================================================================================================
public static interface NewConversationOrBuilder extends MessageLiteOrBuilder { public abstract ClientConversation getClientConversation(); public abstract String getSenderId(); public abstract Data.StubbyInfo getStubbyInfo(); public abstract boolean hasClientConversation(); public abstract boolean hasSenderId(); public abstract boolean hasStubbyInfo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Conversation newConversation(Uuid id, String title, Uuid owner, Time creationTime);", "public Conversation() {}", "private Conversation()\n {\n }", "void createConversation(@NonNull final ConversationCreate request, @Nullable Callback<ComapiResult<ConversationDetails>> callback);", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "private synchronized void createConversation(int id) throws IOException {\n ConversationGUI convo = new ConversationGUI(model, id, this);\n conversations.put(id, convo);\n convo.setVisible(true);\n }", "Message newMessage(Uuid id, Uuid author, Uuid conversation, String body, Time creationTime);", "public Conversation conversationDummy(String name) {\n //TODO: not working now\n\n Message message1 = new Message(\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \" +\n \"et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris \" +\n \"nisi ut aliquip ex ea commodo consequat.\",\n 0\n , System.currentTimeMillis(),\n true\n , true\n , true);\n\n Message message2 = new Message(\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \" +\n \"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud \" +\n \"exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\", 0,\n System.currentTimeMillis(), false, true, true);\n\n ObservableList<Message> messages = FXCollections.observableArrayList();\n messages.add(message1);\n messages.add(message2);\n\n Conversation conversation = new Conversation(99999999, userID, name, null, null, messages);\n\n return conversation;\n\n }", "private Conversation createNewConversation(Node conversationsNode, Node participantsNode, String conversationId, Date date, HistoricalMessageImpl message) {\r\n String jidTo = message.getTo();\r\n String jidFrom = message.getFrom();\r\n Boolean isGroupChat = message.getType().equals(Message.Type.groupchat.name());\r\n Participant participantTo = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidTo)));\r\n InterlocutorImpl interlocutorFrom = new InterlocutorImpl(jidFrom, conversationId, isGroupChat);\r\n if (!isGroupChat) {\r\n if (participantTo != null) {\r\n if (participantTo.getInterlocutorList() != null) {\r\n participantTo.addInterlocutor(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n Participant participantFrom = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidFrom)));\r\n InterlocutorImpl interlocutorTo = new InterlocutorImpl(jidTo, conversationId, isGroupChat);\r\n if (participantFrom != null) {\r\n if (participantFrom.getInterlocutorList() != null) {\r\n participantFrom.addInterlocutor(interlocutorTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom = new Participant(jidFrom, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantFrom);\r\n }\r\n } else {\r\n if (participantTo != null) {\r\n if (participantTo.getGroupChatList() != null) {\r\n participantTo.addGroupChat(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setGroupChatList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, new ArrayList<InterlocutorImpl>(), list);\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n }\r\n Conversation conversation = new Conversation(conversationId, date, date);\r\n conversation.addMessage(message);\r\n addConversation(conversationsNode, conversation);\r\n return conversation;\r\n }", "private String getNewConversationId( )\r\n {\r\n return UUID.randomUUID( ).toString( );\r\n }", "public ConversationTest() {\r\n\r\n }", "Conversation(String user) {\n\t\t\tuser = this.user;\n\t\t\tstate = \"main\";\n\t\t}", "@PostMapping(\"/api/v1/conversations\")\n PersistedConversation postConversation(\n @RequestBody final ConversationRequest conversation)\n {\n final List<PersistedParticipant> participantEntities = new ArrayList<>();\n for (final String participantName : conversation.participantNames()) {\n if (participantRepository.findByName(participantName) == null) {\n final PersistedParticipant persistedParticipant = new PersistedParticipant(UUID.randomUUID(), participantName);\n participantRepository.save(persistedParticipant);\n participantEntities.add(persistedParticipant);\n } else {\n participantEntities.add(participantRepository.findByName(participantName));\n }\n }\n final List<PersistedMessage> messageEntities = new ArrayList<>();\n final PersistedConversation persistedConversation =\n new PersistedConversation(\n UUID.randomUUID(),\n participantEntities,\n messageEntities);\n return conversationRepository.save(persistedConversation);\n }", "private Conversation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "@Override\n public void onStartConversationSuccessful(StartConversation startConversation) {\n\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n chatFragment = new ChatFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"id\", startConversation.getConversationId());\n bundle.putString(\"token\", startConversation.getToken());\n chatFragment.setArguments(bundle);\n ft.add(R.id.fl_chatlist, chatFragment);\n ft.commit();\n }", "public boolean createChat(String friendName, String conversationID, MessageListener conversationListener){\n\n\t\tboolean chatCreated = false;\n\n\t\tif(serverConnection.isConnected()){\n\n\t\t\tif(!chatInstanceMap.containsKey(friendName))\n\t\t\t{\n\t\t\t\tChat newConversation = serverConnection.getChatManager().createChat(friendName, conversationID, conversationListener);\n\n\t\t\t\tchatInstanceMap.put(friendName, newConversation);\n\n\t\t\t\tchatCreated = true;\n\t\t\t}\n\t\t}\t\n\n\t\treturn chatCreated;\n\t}", "public abstract void newChatMembersMessage(Message m);", "public Chat(){ }", "@Override\n\tpublic void chatCreated(Chat conversation, boolean localCreated) {\n\t\tif(!localCreated){\n\n\t\t\tchatInstanceMap.put(conversation.getThreadID(), conversation);\n\n\t\t}\n\t}", "private void fillConversationList()\n\t{\n\t\tbasicConversations.add(\"how are you?\");\n\t\tbasicConversations.add(\"how do you do?\");\n\t\tbasicConversations.add(\"how are you feeling?\");\n\t\tbasicConversations.add(\"what is your current status?\");\n\t\tbasicConversations.add(\"how are you feeling?\");\n\t\tbasicConversations.add(\"are you feeling well?\");\n\t\tbasicConversations.add(\"how's life?\");\n\t\tbasicConversations.add(\"how's it going?\");\n\t\tbasicConversations.add(\"how art thou?\");\n\t}", "public Chat() {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n String chat = chat_field.getText().toString();\n\n\n LandingActivity current_activity = (LandingActivity)getActivity();\n if(current_activity != null){\n new Chat(chat, current_user.getUsername(), getActivity());\n }\n //Construct the new Object\n\n }", "com.polytech.spik.protocol.SpikMessages.Conversation getConversation();", "private Conversation getConversation(Node convesationNode, Node participantsNode, String usernameTo, String usernameFrom, Boolean isRoom, Boolean withMessages) {\r\n try {\r\n Participant participant = getParticipant(participantsNode, CodingUtils.encodeToHex(usernameTo));\r\n String conversationId = null;\r\n if (participant != null) {\r\n InterlocutorImpl interlocutor;\r\n if (!isRoom)\r\n interlocutor = participant.getInterlocutor(usernameFrom);\r\n else\r\n interlocutor = participant.getGroupChat(usernameFrom);\r\n if (interlocutor != null) {\r\n conversationId = interlocutor.getConversationId();\r\n if (convesationNode.hasNode(conversationId)) {\r\n Node node = convesationNode.getNode(conversationId);\r\n Conversation conversation = new Conversation();\r\n if (withMessages) {\r\n conversation = jcrom.fromNode(Conversation.class, node);\r\n } else\r\n conversation = jcrom.fromNode(Conversation.class, node, \"-messageList\", -1);\r\n return conversation;\r\n }\r\n }\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "private void setupChat() {\n\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n mOutEditText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n mSendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Send a message using content of the edit text widget\n View view = getView();\n if (null != view) {\n TextView textView = (TextView) view.findViewById(R.id.edit_text_out);\n String message = textView.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(BluetoothChatFragment.EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設為不可發送 並清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n }\n });\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }", "com.polytech.spik.protocol.SpikMessages.ConversationOrBuilder getConversationOrBuilder();", "public void setConversation(Conversation conversation) {\n this.conversation = conversation;\n }", "@Test\n public void updateConversation() {\n Conversation original = new Conversation();\n\n Conversation modified = restController.createConversationForBlog(MAIN_BLOG_NAME, original);\n assertThat(modified).isNotNull();\n\n modified.setNumMessages(5);\n modified.setParticipant(\"new participant\");\n modified.setParticipantAvatarUrl(\"avatar URL\");\n modified.setParticipantId(\"pid123\");\n modified.setHideConversation(true);\n\n restController.updateConversationForBlog(MAIN_BLOG_NAME, modified.getId(), modified);\n\n Conversation finalFromServer = restController.getConversationForBlogByParticipant(MAIN_BLOG_NAME,\n \"new participant\");\n\n assertThat(finalFromServer).isNotNull();\n assertThat(finalFromServer).isEqualToComparingFieldByField(modified);\n }", "public Builder setConversation(com.polytech.spik.protocol.SpikMessages.Conversation value) {\n if (conversationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n type_ = value;\n onChanged();\n } else {\n conversationBuilder_.setMessage(value);\n }\n typeCase_ = 2;\n return this;\n }", "@Override\n\tpublic String getConversationId() {\n\t\treturn null;\n\t}", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "private void addConversation(Node conversationsNode, Conversation conversation) {\r\n try {\r\n jcrom.addNode(conversationsNode, conversation);\r\n conversationsNode.getSession().save();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.conversation);\n\n\t\t// Die Ansicht, in der der Austausch von Nachrichten zwischen Anna und\n\t\t// Beate dargestellt wird\n\t\tconversation = (TextView) findViewById(R.id.conversation_transcript);\n\n\t\t// Das Eingabefeld fuer eine neue Nachricht\n\t\tEditText newMessage = (EditText) findViewById(R.id.new_message);\n\t\tnewMessage.setImeOptions(EditorInfo.IME_ACTION_DONE);\n\n\t\t// Falls eine neue Nachricht eingegeben wird und mittels \"done\" beendet\n\t\t// wird, wird an die Activity Anna zurueck gegeben\n\t\tnewMessage.setOnEditorActionListener(new OnEditorActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic boolean onEditorAction(TextView view, int arg1, KeyEvent arg2) {\n\t\t\t\tLog.d(logger, \"got editor action \" + arg1 + \" on textview \"\n\t\t\t\t\t\t+ view + \". KeyEvent is: \" + arg2);\n\t\t\t\tif (arg1 == EditorInfo.IME_ACTION_DONE || KeyEvent.KEYCODE_ENTER == arg2.getKeyCode()) {\n\t\t\t\t\tLog.d(logger, \"done was pressed!\");\n\n\t\t\t\t\t// Zugriff auf den eingegebenen Text\n\t\t\t\t\tString message = view.getText().toString();\n\n\t\t\t\t\t// aktualisiere die conversation (nur kurz sichtbar, da sofort die Rueckgabe\n\t\t\t\t\t// an Anna erfolgt)\n\t\t\t\t\tconversation.append(\"\\nmyself> \" + message);\n\t\t\t\t\t\n\t\t\t\t\t// Rueckgabe an Anna\n\t\t\t\t\treturnToAnna(message);\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t});\n\n\t\t// lies das Message Argument aus dem Intent aus\n\t\tString msg = getIntent().getExtras().getString(MESSAGE_ARGUMENT_NAME);\n\t\tLog.i(logger, \"onCreate(): message passed as argument is: \" + msg);\n\n\t\t// aktualisiere die Conversation\n\t\tconversation.append(\"\\nanna> \" + msg);\n\n\t}", "public abstract void newChatPhotoMessage(Message m);", "protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }", "public MessageChannel createMessageChannel\n (SIPTransaction transaction) {\n synchronized(clientTransactions) {\n // New client transaction to return\n SIPTransaction\treturnChannel =\n createClientTransaction(transaction.getMessageChannel());\n clientTransactions.add(returnChannel);\n ((SIPClientTransaction)returnChannel).setViaPort\n (transaction.getViaPort());\n ((SIPClientTransaction)returnChannel).setViaHost\n (transaction.getViaHost());\n return returnChannel;\n }\n }", "private SquareLiveChatModel initLiveChatModel() {\n\t\tSquareLiveChatModel squareLiveChatModel = new SquareModel().new SquareLiveChatModel();\n\t\tsquareLiveChatModel.setArticleId(squareLiveModel.getArticleId());\n\t\tsquareLiveChatModel.setChatContent(null);\n\t\tsquareLiveChatModel.setUserId(dataManager.userModel.UserId);\n\t\tsquareLiveChatModel.setUserRole(userRole);\n\t\tsquareLiveChatModel.setParentId(0);\n\t\tsquareLiveChatModel.setUserAvatar(dataManager.userModel.Avatar);\n\t\tsquareLiveChatModel.setUserNickName(dataManager.userModel.NickName);\n\t\t\n\t\treturn squareLiveChatModel;\n\t}", "public com.polytech.spik.protocol.SpikMessages.Conversation.Builder getConversationBuilder() {\n return getConversationFieldBuilder().getBuilder();\n }", "public ChatActivity() {\n }", "@Override\n public MediationMessage createMessage(CamelMediationMessage message) {\n return null;\n }", "public PromoMessages() {\n }", "public MessageListFragment() {\n setConversationListItemClickListener(new EaseConversationListItemClickListener() {\n @Override\n public void onListItemClicked(EMConversation conversation) {\n startActivity(new Intent(getActivity(), ChatActivity.class).putExtra(EaseConstant.EXTRA_USER_ID, conversation.conversationId()));\n }\n });\n // Required empty public constructor\n }", "private ChatProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ChatResponse(Builder builder) {\n super(builder);\n }", "public ChatRequest()\r\n\t{\r\n\t}", "private void setupChat() {\n Log.d(TAG, \"setupChat()\");\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n\n // Initialize the send button with a listener that for click events\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(getActivity(), mhandler);\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n switchForFileSaved.setOnCheckedChangeListener(switchListener) ;\n }", "private Message createMessage(final JSONObject jsonMessageSet) {\n\n final JSONArray messages = (JSONArray) jsonMessageSet.get(\"message\");\n final JSONObject jsonMessage = getRandomJsonObject(messages);\n\n final Message message = new Message();\n message.setMessageId((Integer) jsonMessage.get(\"messageId\"));\n message.setText((String) jsonMessage.get(\"text\"));\n\n final Integer tipSetId = (Integer) jsonMessage.get(\"tipSetId\");\n if (tipSetId != null) {\n message.setTipSetId(tipSetId);\n }\n\n return message;\n }", "private ProtocolMessage(Builder builder) {\n super(builder);\n }", "public Builder clearConversation() {\n if (conversationBuilder_ == null) {\n if (typeCase_ == 2) {\n typeCase_ = 0;\n type_ = null;\n onChanged();\n }\n } else {\n if (typeCase_ == 2) {\n typeCase_ = 0;\n type_ = null;\n }\n conversationBuilder_.clear();\n }\n return this;\n }", "public MessageChannel createMessageChannel\n (MessageChannel rawChannel) {\n synchronized(clientTransactions) {\n // New client transaction to return\n SIPTransaction\treturnChannel =\n createClientTransaction(rawChannel);\n clientTransactions.add(returnChannel);\n ((SIPClientTransaction)returnChannel).setViaPort\n (rawChannel.getViaPort());\n ((SIPClientTransaction)returnChannel).setViaHost\n (rawChannel.getHost());\n return returnChannel;\n }\n }", "private com.google.protobuf.SingleFieldBuilder<\n com.polytech.spik.protocol.SpikMessages.Conversation, com.polytech.spik.protocol.SpikMessages.Conversation.Builder, com.polytech.spik.protocol.SpikMessages.ConversationOrBuilder> \n getConversationFieldBuilder() {\n if (conversationBuilder_ == null) {\n if (!(typeCase_ == 2)) {\n type_ = com.polytech.spik.protocol.SpikMessages.Conversation.getDefaultInstance();\n }\n conversationBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n com.polytech.spik.protocol.SpikMessages.Conversation, com.polytech.spik.protocol.SpikMessages.Conversation.Builder, com.polytech.spik.protocol.SpikMessages.ConversationOrBuilder>(\n (com.polytech.spik.protocol.SpikMessages.Conversation) type_,\n getParentForChildren(),\n isClean());\n type_ = null;\n }\n typeCase_ = 2;\n return conversationBuilder_;\n }", "private Message(Builder builder) {\n super(builder);\n }", "boolean hasConversation();", "public OAuthMessage() {\n\t\t_parameters = new ParameterList();\n\n\t\tif (DEBUG)\n\t\t\t_log.debug(\"Created empty OAuthMessage.\");\n\t}", "public MultiChannelMessageImpl() {\n }", "public String getConversationId(){\r\n\t\treturn conversationId;\r\n\t}", "public interface ConversationPresenter {\n void getMessages(String number);\n void setMessagesAsReaded(String number);\n void disableNotifications(boolean disable, String number);\n void sendToBlackList(int options, String number);\n void onDestroy();\n}", "public CallMessage() {\n\t}", "public ChatRoomCreationMsgBehaviour( String name, String creatorPrimaryKey, boolean isBotChatRoom ) {\n super( name, creatorPrimaryKey );\n this.isBotChatRoom = isBotChatRoom;\n }", "public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }", "private Message(){\n // default constructor\n }", "public abstract Message createMessage(String uid) throws MessagingException;", "private Message(String message, long visibleTime, long creationTime, long id){\n\t\tthis(message, visibleTime);\n\t\tthis.creationTime = creationTime;\n\t\tthis.id = id;\n\t}", "public Message() {}", "public Message() {}", "public Message(){}", "@Override\n public TransponderMessage newMessage() {\n super.newMessage();\n setModule(\"somevertical\");\n return this;\n }", "public ChatModel() {\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }", "private chat_message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public MessageTran() {\n\t}", "public abstract void groupChatCreatedMessage(Message m);", "private SingleChatPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@PostMapping(\"/new\")\n @ResponseStatus(HttpStatus.CREATED)\n public Boolean newChat(@RequestBody NewChatEvent event) {\n notificationService.notifyAboutNewChat(event.getChatId(), event.getDepartmentId());\n scheduleService.scheduleReassignment(event.getChatId());\n return Boolean.TRUE;\n }", "private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MessagesResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "public Message() {\n }", "public Message() {\n }", "private Message(MessageType handle, String srcName, String text) {\n msgType = handle;\n // Save the properly formatted identifier for the user sending the\n // message.\n msgSender = srcName;\n // Save the text of the message.\n msgText = text;\n }", "public Message createMessage()\n {\n return messageFactory.createMessage();\n }", "MessagesType createMessagesType();", "public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }", "private MessageType(String nameId) {\r\n\t\tthis.nameId = nameId;\r\n\t}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }", "public FeedbackMessages()\n\t{\n\t}", "public Conversation getConversation (String sig) {\n Logger.write(\"VERBOSE\", \"DB\", \"getConversation(...)\"); \n try {\n ResultSet convoSet = query(DBStrings.getConversation.replace(\"__SIG__\", sig));\n if(convoSet.next()) {\n String timestamp = convoSet.getString(\"time\");\n ResultSet messages = query(DBStrings.getConversationMessages.replace(\"__SIG__\", sig));\n String firstMsg;\n if (messages.next())\n firstMsg = messages.getString(\"msgText\");\n else\n firstMsg = \"<no messages yet>\";\n PublicKey[] keys = getPeopleInConvo(sig);\n String[] keystrings = new String[keys.length];\n String[] users = new String[keys.length];\n for (int i = 0; i < keys.length; i++) {\n keystrings[i] = Crypto.encodeKey(keys[i]);\n users[i] = getName(keys[i]);\n }\n return new Conversation(sig, timestamp, firstMsg, users, keystrings);\n } else {\n Logger.write(\"WARNING\", \"DB\", \"getConversation(...) empty conversation: \" + sig);\n }\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n return new Conversation();\n }", "public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }", "public void processMessage(Chat chat, Message message) {\n LOG.debug(\"processMessage chat.threadID: \" + chat.getThreadID()\n + \" message.from: \" + message.getFrom()\n + \" message.body: \" + message.getBody()\n + \" message.subject: \" + message.getSubject()\n + \" message: \" + message);\n Conversation convo;\n boolean newConvo = false;\n Conversation oldConvo = null;\n \n try {\n // To allow this to be called from multiple threads, we must lock the\n // conversations when we muck with them.\n LOG.debug(\"getting lock on conversations...\");\n synchronized (getConversations()) {\n LOG.debug(\"got lock on conversations\");\n\n // Get the conversation.\n convo = removeConversation(chat.getParticipant());\n if (convo == null) {\n LOG.debug(\"new conversation with participant \" + chat.getParticipant());\n convo = new Conversation(chat);\n newConvo = true;\n }\n\n // Add this conversation to the front of the list.\n getConversations().addFirst(convo);\n\n // Evict old conversations.\n LOG.debug(\"number of conversations: \" + getConversations().size());\n if (getConversations().size() > MAX_CONVERSATIONS) {\n oldConvo = getConversations().removeLast();\n }\n }\n\n // Process the message itself.\n convo.reactToIm(newConvo, message, XmppAppender.this);\n\n // Let the person know we're evicting them.\n if (oldConvo != null) {\n // Don't send this if we haven't heard from this person in a long time.\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.DATE, -MAX_DAYS_TO_NOTIFY_OF_EVICTION);\n if (oldConvo.getLastHeardFrom().after(cal.getTime())) {\n oldConvo.sendIm(\"I'm holding a conversation with \" + MAX_CONVERSATIONS +\n \" other people, so I'll talk to you later.\");\n }\n }\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }", "public TrackedMessage(int messageType) {\n\tsuper(messageType);\n }", "protected abstract Message createMessage(Object object, MessageProperties messageProperties);", "private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }", "public GlobalChat() {\r\n // Required empty public constructor\r\n }", "public ChatMessage(Cursor cursor) {\n // TODO\n this.id = Long.parseLong(MessageContract.getId(cursor));\n this.sender = MessageContract.getSender(cursor);\n this.messageText = MessageContract.getMessageText(cursor);\n this.timestamp = MessageContract.getTimestamp(cursor);\n this.longitude = MessageContract.getLongitude(cursor);\n this.latitude = MessageContract.getLatitude(cursor);\n }", "public void addConversation(UUID conversationId) {\n this.conversationVisibilities.put(conversationId, true);\n }", "private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public MessageResponse() {\r\n\t}", "public VideoMessage() {\n super(CommsService.class.getName(), VideoMessage.class.getName());\n }" ]
[ "0.78586197", "0.77322245", "0.73766243", "0.7206148", "0.67644906", "0.67436516", "0.67264956", "0.67092216", "0.67072845", "0.6573619", "0.63946813", "0.62670416", "0.62418777", "0.6122179", "0.60914844", "0.6082742", "0.6036396", "0.59518987", "0.5944448", "0.59202415", "0.5904069", "0.58672625", "0.5829596", "0.582904", "0.582195", "0.58006895", "0.57654613", "0.5757318", "0.5749969", "0.5739499", "0.5714135", "0.5704338", "0.5683192", "0.5660226", "0.5644992", "0.5624783", "0.562241", "0.56175643", "0.561658", "0.56162524", "0.560868", "0.56056774", "0.5603494", "0.56011707", "0.55865914", "0.55640715", "0.55583924", "0.55525196", "0.55455875", "0.55442226", "0.55400544", "0.55189276", "0.5514347", "0.55013174", "0.5498157", "0.54934335", "0.5490415", "0.5488306", "0.5479151", "0.5467327", "0.54653186", "0.54634535", "0.5460566", "0.5456255", "0.5447494", "0.5447494", "0.54431164", "0.5440859", "0.54401064", "0.54392153", "0.5435313", "0.54316217", "0.5430996", "0.5421905", "0.5419051", "0.54144", "0.54083586", "0.5405655", "0.54054767", "0.54054767", "0.53975743", "0.539454", "0.53868604", "0.5384545", "0.53776777", "0.53759813", "0.5374499", "0.5373712", "0.53732914", "0.5372788", "0.53698677", "0.5365181", "0.53647006", "0.53615266", "0.53508013", "0.53505844", "0.5349463", "0.5343291", "0.5342789", "0.5341793" ]
0.69558305
4
================================================================================================== BunchCommand ================================================================================================= ================================================================================================== BunchCommand ==================================================================================================
public static interface BunchCommandOrBuilder extends MessageLiteOrBuilder { public abstract ChatMessage getChatMessage(); public abstract ChatMessageRequest getChatMessageRequest(); public abstract ChatMessageResponse getChatMessageResponse(); public abstract ConversationJoinRequest getConversationJoinRequest(); public abstract ConversationJoinResponse getConversationJoinResponse(); public abstract ConversationListRequest getConversationListRequest(); public abstract ConversationListResponse getConversationListResponse(); public abstract ConversationPreferenceRequest getConversationPreferenceRequest(); public abstract ConversationPreferenceResponse getConversationPreferenceResponse(); public abstract ConversationRenameRequest getConversationRenameRequest(); public abstract ConversationRenameResponse getConversationRenameResponse(); public abstract NewConversationRequest getConversationRequest(); public abstract NewConversationResponse getConversationResponse(); public abstract ConversationSearchRequest getConversationSearchRequest(); public abstract ConversationSearchResponse getConversationSearchResponse(); public abstract DeviceRegistrationRequest getDeviceRegistrationRequest(); public abstract DeviceRegistrationResponse getDeviceRegistrationResponse(); public abstract Error getError(); public abstract EventSearchRequest getEventSearchRequest(); public abstract EventSearchResponse getEventSearchResponse(); public abstract EventStreamResponse getEventSteamResponse(); public abstract EventStreamRequest getEventStreamRequest(); public abstract GlobalConversationPreferencesRequest getGlobalConversationPreferencesRequest(); public abstract GlobalConversationPreferencesResponse getGlobalConversationPreferencesResponse(); public abstract GroupConversationRename getGroupConversationRename(); public abstract HangoutInviteFinishRequest getHangoutInviteFinishRequest(); public abstract HangoutInviteFinishResponse getHangoutInviteFinishResponse(); public abstract HangoutInviteKeepAliveRequest getHangoutInviteKeepAliveRequest(); public abstract HangoutInviteKeepAliveResponse getHangoutInviteKeepAliveResponse(); public abstract HangoutInviteReplyRequest getHangoutInviteReplyRequest(); public abstract HangoutInviteReplyResponse getHangoutInviteReplyResponse(); public abstract HangoutInviteRequest getHangoutInviteRequest(); public abstract HangoutInviteResponse getHangoutInviteResponse(); public abstract HangoutRingFinishRequest getHangoutRingFinishRequest(); public abstract HangoutRingFinishResponse getHangoutRingFinishResponse(); public abstract InvalidateLocalCache getInvalidateLocalCache(); public abstract InviteRequest getInviteRequest(); public abstract InviteResponse getInviteResponse(); public abstract LeaveConversationRequest getLeaveConversationRequest(); public abstract LeaveConversationResponse getLeaveConversationResponse(); public abstract MembershipChange getMembershipChange(); public abstract Migration getMigration(); public abstract PingRequest getPingRequest(); public abstract PingResponse getPingResponse(); public abstract Presence getPresence(); public abstract PresenceRequest getPresenceRequest(); public abstract PresenceResponse getPresenceResponse(); public abstract Receipt getReceipt(); public abstract ReceiptRequest getReceiptRequest(); public abstract ReceiptResponse getReceiptResponse(); public abstract ReplyToInviteRequest getReplyToInviteRequest(); public abstract ReplyToInviteResponse getReplyToInviteResponse(); public abstract String getRequestClientId(); public abstract SetAclsRequest getSetAclsRequest(); public abstract SetAclsResponse getSetAclsResponse(); public abstract SuggestionsRequest getSuggestionsRequest(); public abstract SuggestionsResponse getSuggestionsResponse(); public abstract TileEvent getTileEvent(); public abstract TileEventRequest getTileEventRequest(); public abstract TileEventResponse getTileEventResponse(); public abstract Typing getTyping(); public abstract TypingRequest getTypingRequest(); public abstract TypingResponse getTypingResponse(); public abstract UserCreationRequest getUserCreationRequest(); public abstract UserCreationResponse getUserCreationResponse(); public abstract UserInfoRequest getUserInfoRequest(); public abstract UserInfoResponse getUserInfoResponse(); public abstract boolean hasChatMessage(); public abstract boolean hasChatMessageRequest(); public abstract boolean hasChatMessageResponse(); public abstract boolean hasConversationJoinRequest(); public abstract boolean hasConversationJoinResponse(); public abstract boolean hasConversationListRequest(); public abstract boolean hasConversationListResponse(); public abstract boolean hasConversationPreferenceRequest(); public abstract boolean hasConversationPreferenceResponse(); public abstract boolean hasConversationRenameRequest(); public abstract boolean hasConversationRenameResponse(); public abstract boolean hasConversationRequest(); public abstract boolean hasConversationResponse(); public abstract boolean hasConversationSearchRequest(); public abstract boolean hasConversationSearchResponse(); public abstract boolean hasDeviceRegistrationRequest(); public abstract boolean hasDeviceRegistrationResponse(); public abstract boolean hasError(); public abstract boolean hasEventSearchRequest(); public abstract boolean hasEventSearchResponse(); public abstract boolean hasEventSteamResponse(); public abstract boolean hasEventStreamRequest(); public abstract boolean hasGlobalConversationPreferencesRequest(); public abstract boolean hasGlobalConversationPreferencesResponse(); public abstract boolean hasGroupConversationRename(); public abstract boolean hasHangoutInviteFinishRequest(); public abstract boolean hasHangoutInviteFinishResponse(); public abstract boolean hasHangoutInviteKeepAliveRequest(); public abstract boolean hasHangoutInviteKeepAliveResponse(); public abstract boolean hasHangoutInviteReplyRequest(); public abstract boolean hasHangoutInviteReplyResponse(); public abstract boolean hasHangoutInviteRequest(); public abstract boolean hasHangoutInviteResponse(); public abstract boolean hasHangoutRingFinishRequest(); public abstract boolean hasHangoutRingFinishResponse(); public abstract boolean hasInvalidateLocalCache(); public abstract boolean hasInviteRequest(); public abstract boolean hasInviteResponse(); public abstract boolean hasLeaveConversationRequest(); public abstract boolean hasLeaveConversationResponse(); public abstract boolean hasMembershipChange(); public abstract boolean hasMigration(); public abstract boolean hasPingRequest(); public abstract boolean hasPingResponse(); public abstract boolean hasPresence(); public abstract boolean hasPresenceRequest(); public abstract boolean hasPresenceResponse(); public abstract boolean hasReceipt(); public abstract boolean hasReceiptRequest(); public abstract boolean hasReceiptResponse(); public abstract boolean hasReplyToInviteRequest(); public abstract boolean hasReplyToInviteResponse(); public abstract boolean hasRequestClientId(); public abstract boolean hasSetAclsRequest(); public abstract boolean hasSetAclsResponse(); public abstract boolean hasSuggestionsRequest(); public abstract boolean hasSuggestionsResponse(); public abstract boolean hasTileEvent(); public abstract boolean hasTileEventRequest(); public abstract boolean hasTileEventResponse(); public abstract boolean hasTyping(); public abstract boolean hasTypingRequest(); public abstract boolean hasTypingResponse(); public abstract boolean hasUserCreationRequest(); public abstract boolean hasUserCreationResponse(); public abstract boolean hasUserInfoRequest(); public abstract boolean hasUserInfoResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CommandBrocker() {}", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }", "SiteWriterTemplate startBunch() throws Exception;", "void setup(CommandLine cmd);", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\n\tpublic void startHook() {\n\t\tMethod execmethod = RefInvoke.findMethodExact(\n \"java.lang.ProcessBuilder\", ClassLoader.getSystemClassLoader(),\n \"start\");\n\t\thookhelper.hookMethod(execmethod, new AbstractBehaviorHookCallBack() {\n\t\t\t@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}\n\t\t});\n\t}", "public void execute() throws MojoExecutionException, MojoFailureException {\n checkConfiguration();\n\n String mode;\n String[] bindings;\n String[] classpaths;\n\n if (\"pom\".equalsIgnoreCase(project.getPackaging()))\n {\n getLog().info(\"Not running JiBX binding compiler for pom packaging\");\n \treturn;\t\t// Don't bind jibx if pom packaging\n }\n \n if (isMultiModuleMode()) {\n if (isRestrictedMultiModuleMode()) {\n mode = \"restricted multi-module\";\n } else {\n mode = \"multi-module\";\n }\n bindings = getMultiModuleBindings();\n classpaths = getMultiModuleClasspaths();\n } else {\n mode = \"single-module\";\n bindings = getSingleModuleBindings();\n classpaths = getSingleModuleClasspaths();\n }\n\n if (interfaceClassNames.size() == 0) {\n getLog().info(\"Not running JiBX2WSDL (\" + mode + \" mode) - no class interface files\");\n } else {\n getLog().info(\"Running JiBX binding compiler (\" + mode + \" mode) on \" + interfaceClassNames.size()\n + \" interface file(s)\");\n \n try {\n java.util.List<String> args = new Vector<String>();\n\n for (int i = 0; i< classpaths.length; i++)\n {\n args.add(\"-p\");\n \targs.add(classpaths[i]);\n }\n \n args.add(\"-t\");\n args.add(outputDirectory);\n \n if (customizations.size() > 0) {\n args.add(\"-c\");\n for (String customization : customizations) {\n args.add(customization);\n }\n }\n\n for (Map.Entry<String,String> entry : options.entrySet()) {\n String option = \"--\" + entry.getKey() + \"=\" + entry.getValue();\n if ((entry.getKey().toString().length() == 1) && (Character.isLowerCase(entry.getKey().toString().charAt(0))))\n {\n \tgetLog().debug(\"Adding option : -\" + entry.getKey() + \" \" + entry.getValue());\n \targs.add(\"-\" + entry.getKey());\n \targs.add(entry.getValue());\n }\n else\n {\n \t getLog().debug(\"Adding option: \" + option);\n \t args.add(option);\n }\n }\n if (bindings.length > 0)\n {\n args.add(\"-u\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < bindings.length; i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(bindings[i]);\n \t}\n \targs.add(arg.toString());\n }\n \n if (this.sourceDirectories.size() > 0)\n if (this.sourceDirectories.get(0) != null)\n if (this.sourceDirectories.get(0).toString().length() > 0)\n {\n args.add(\"-s\");\n StringBuilder arg = new StringBuilder();\n \tfor (int i = 0 ; i < sourceDirectories.size(); i++)\n \t{\n \t\tif (arg.length() > 0)\n \t\t\targ.append(';');\n \t\targ.append(sourceDirectories.get(i).toString());\n \t}\n \targs.add(arg.toString()); \t\n }\n if (verbose)\n args.add(\"-v\");\n\n for (String interfaceName : interfaceClassNames)\n {\n \targs.add(interfaceName);\n }\n\n Jibx2Wsdl.main((String[]) args.toArray(new String[args.size()]));\n\t \n } catch (JiBXException e) {\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t\n\t }\n }", "public void initDefaultCommand() {\n \n }", "protected void executeVmCommand() {\n }", "@Override\n\tpublic void execute() throws InstantiationException,\n\t\t\tIllegalAccessException, ClassNotFoundException, IOException {\n\t\tBuilding building = (Building) Class.forName(\n\t\t\t\tConstant.TILE_PACKAGE + commandData.get(\"tileName\"))\n\t\t\t\t.newInstance();\n\t\tbuilding.setX((Integer) commandData.get(\"pointX\"));\n\t\tbuilding.setY((Integer) commandData.get(\"pointY\"));\n\t\tbuilding.setTileManager(tileManager);\n\t\tbuilding.setFocusManager(focusManager);\n\t\tbuilding.setUUID((UUID) commandData.get(\"focusID\"));\n\t\tbuilding.initBuildingImage((String) commandData.get(\"buildingName\"));\n\t\ttileManager.addTile((Tile) building);\n\t}", "@Command\n\tpublic void buscar() {\n\t}", "public void initDefaultCommand() \n {\n }", "@Override\n public void initDefaultCommand() {\n\n }", "public abstract String getLaunchCommand();", "public ModifyVirtualMachine(){\r\n\t\t super(COMMAND);\r\n\t}", "public void initDefaultCommand() {\n\t}", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand()\n {\n }", "@Override\n public void initDefaultCommand() \n {\n }", "private Command() {\n initFields();\n }", "public void initDefaultCommand() {\n \n }", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "protected void execute() {\n command.start();\n }", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t}", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "public void startCommandLine() {\r\n Object[] messageArguments = { System.getProperty(\"app.name.display\"), //$NON-NLS-1$\r\n System.getProperty(\"app.version\") }; //$NON-NLS-1$\r\n MessageFormat formatter = new MessageFormat(\"\"); //$NON-NLS-1$\r\n formatter.applyPattern(Messages.MainModel_13.toString());\r\n TransportLogger.getSysAuditLogger().info(\r\n formatter.format(messageArguments));\r\n }", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "public void initDefaultCommand()\n\t{\n\t}", "private void spawn(String[] command) throws BuildException {\r\n Execute exe = new Execute();\r\n setupExecutable(exe, command);\r\n try {\r\n exe.spawn();\r\n }\r\n catch (IOException e) {\r\n throw new BuildException(e, getLocation());\r\n }\r\n }", "@Override\n\tpublic void generateMigsPunchUrl() {\n\n\t}", "private void registerCommands() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new Climb());\n }", "protected void initDefaultCommand() {\n \t\t\n \t}", "Commands createCommands();", "@Override\n public void execute(IEnvironment env)\n {\n \n }", "public void execute() throws MissingDescriptionException, InvalidCommandException {\n }", "private CommandLine() {\n\t}", "@Override\r\n public void execute(Command command) {\n\r\n }", "public Punching() {\n initComponents();\n }", "@Override\n public void execute(String[] args) {\n\n }", "protected void builder(String commandLine) {\n // Pass through the command line options from the current builder\n List passThroughArgs = env.getBuilderArgs();\n for (Iterator iterator = passThroughArgs.iterator(); iterator.hasNext();) {\n commandLine = (String)iterator.next() + \" \" + commandLine;\n }\n\n StringTokenizer st = new StringTokenizer(commandLine);\n final String[] args = new String[st.countTokens()];\n for (int i = 0; i != args.length; ++i) {\n args[i] = st.nextToken();\n }\n// String command = \"java -jar build.jar \" + commandLine;\n new Build().mainProgrammatic(args);\n }", "public void command() {\n List<String> commands = new ArrayList<>();\n commands.add(\": start\");\n commands.add(\": exit\");\n commands.add(\": help\");\n commands.add(\": commands\");\n\n for (String command : commands) {\n System.out.println(command);\n }\n System.out.println();\n }", "public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}", "static void devArgs(String[] cmd, PrintWriter out, MainClass mainClass)\n {\n if(cmd[0].contains(\"-ce.\") && cmd.length == 1)\n {\n config = Configuration.loadConfig();\n if(cmd[0].equals(\"-ce.a\"))\n ClientProcedures.bastionSecGroupCreate(mainClass.securityGroupApi, config);\n else if(cmd[0].equals(\"-ce.b\"))\n ClientProcedures.bastionKeyPairCreate(mainClass.ssh, mainClass.sshFolder,\n config.getBastionKeyName(), mainClass.keyPairApi);\n else if(cmd[0].equals(\"-ce.c\"))\n ClientProcedures.bastionServerCreate(mainClass.serverApi,\n mainClass.imageApi, mainClass.flavorApi, config, mainClass.ssh);\n mainClass.initBastionReference();\n if(cmd[0].equals(\"-ce.d\"))\n ClientProcedures.bastionIpAllocate(config, mainClass.floatingIPApi, mainClass.bastion);\n else if(cmd[0].equals(\"-ce.e\"))\n ClientProcedures.bastionPackagesInstall(mainClass.ssh, mainClass.bastion, config, mainClass.serverApi);\n else if(cmd[0].equals(\"-ce.f\"))\n ClientProcedures.bastionAnsibleInstall(mainClass.ssh, config,\n Utils.getServerPublicIp(mainClass.bastion, config.getNetworkName()));\n else if(cmd[0].equals(\"-ce.g\"))\n ClientProcedures.bastionClusterKeyCreate(mainClass.ssh, config, mainClass.keyPairApi,\n mainClass.bastion, mainClass.tempFolder);\n else if(cmd[0].equals(\"-ce.h\"))\n ClientProcedures.bastionSshConfigCreate(mainClass.ssh, mainClass.bastion, config, mainClass.tempFolder);\n else if(cmd[0].equals(\"-ce.i\"))\n ClientProcedures.createSwDisk(mainClass.ssh, config, mainClass.volumeApi,\n mainClass.bastion, mainClass.volumeAttachmentApi);\n else if(cmd[0].equals(\"-ce.j\"))\n ClientProcedures.attachSwDisk(config, mainClass.bastion, mainClass.volumeApi,\n mainClass.volumeAttachmentApi);\n else if(cmd[0].equals(\"-ce.k\"))\n ClientProcedures.transferSwFiles2VDisk(mainClass.ssh, config, mainClass.bastion, false);\n else if(cmd[0].equals(\"-ce.l\"))\n ClientProcedures.detachSwDisk(config, mainClass.bastion, mainClass.volumeApi,\n mainClass.volumeAttachmentApi);\n }\n else if(cmd[0].contains(\"-cc.\") && cmd.length == 1)\n {\n config = Configuration.loadConfig();\n mainClass.initBastionReference();\n ClientProcedures.transferRequiredFiles2Bastion(mainClass.ssh, config, mainClass.bastion, mainClass.tempFolder);\n /*if(cmd[0].equals(\"-cc.a\"))\n ClientProcedures.clusterServerGroupCreate(config, mainClass.userName, mainClass.password);\n else*/ if(cmd[0].equals(\"-cc.b\"))\n ClientProcedures.prepareToolComponents(config, mainClass.tempFolder, mainClass.flavorApi, true);\n// else if(cmd[0].equals(\"-cc.c\"))\n// ClientProcedures.updateAmbariShellCommandFile(config);\n// else if(cmd[0].equals(\"-cc.d\"))\n// ClientProcedures.transferRequiredFiles2Bastion(mainClass.ssh, config, mainClass.bastion, mainClass.tempFolder);\n else if(cmd[0].equals(\"-cc.e\"))\n ClientProcedures.bastionClusterProvisionExecute(mainClass.ssh, config,\n mainClass.bastion, mainClass.osAuthOnBastionCommands);\n else if(cmd[0].equals(\"-cc.f\"))\n ClientProcedures.bastionClusterConfigurationExecute(mainClass.ssh, config,\n mainClass.bastion, mainClass.osAuthOnBastionCommands);\n else if(cmd[0].equals(\"-cc.g\"))\n ClientProcedures.openAdminAccess(config, mainClass.securityGroupApi);\n else if(cmd[0].equals(\"-cc.h\"))\n ClientProcedures.generateWebGuiLink(config.getClusterName(),\n Utils.getServerPublicIp(mainClass.getMasterReference(config.getClusterName()), config.getNetworkName()));\n else if(cmd[0].equals(\"-cc.i\"))\n {\n ClientProcedures.transferSwBashScripts(mainClass.ssh, config, mainClass.bastion,\n mainClass.bastion, true, mainClass.volumeApi, mainClass.volumeAttachmentApi);\n }\n else if(cmd[0].equals(\"-cc.j\"))\n {\n mainClass.runBastionRoutine(Commands.CREATE_CLUSTER.getCommand());\n }\n }\n else if(cmd[0].contains(\"-r.\") && cmd.length == 1)\n {\n mainClass.initBastionReference();\n if(cmd[0].equals(\"-r.a\"))\n ClientProceduresRemoval.deleteCluster(mainClass.ssh, /*serverGroupApi, */config,\n mainClass.bastion, mainClass.getMasterReference(config.getClusterName()),\n mainClass.osAuthOnBastionCommands, mainClass.volumeApi, mainClass.volumeAttachmentApi);\n else if(cmd[0].equals(\"-r.b\"))\n ClientProceduresRemoval.removeDisk4SW(mainClass.ssh, config, mainClass.volumeApi,\n mainClass.volumeAttachmentApi, mainClass.bastion);\n else if(cmd[0].equals(\"-r.c\"))\n ClientProceduresRemoval.removeBastion(config, mainClass.serverApi, mainClass.floatingIPApi,\n mainClass.bastion);\n else if(cmd[0].equals(\"-r.d\"))\n ClientProceduresRemoval.removeOsSetups(config, mainClass.securityGroupApi, mainClass.keyPairApi);\n }\n else\n {\n out.println(\"\\nInvalid command.\\n\");\n }\n }", "public AutoLowBarToGoalCmd() {\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=PARAMETERS\n // Add Commands here:\n // e.g. addSequential(new Command1());\n // addSequential(new Command2());\n // these will run in order.\n\n // To run multiple commands at the same time,\n // use addParallel()\n // e.g. addParallel(new Command1());\n // addSequential(new Command2());\n // Command1 and Command2 will run in parallel.\n\n // A command group will require all of the subsystems that each member\n // would require.\n // e.g. if Command1 requires chassis, and Command2 requires arm,\n // a CommandGroup containing them would require both the chassis and the\n // arm.\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n //addSequential(new LowerIntakeCmd());\n \taddSequential(new ShiftDownCmd());\n \taddParallel(new LowerIntakeCmd());\n addSequential(new DriveStraightCmd(.95,9000.));\n addSequential(new TurnToAngleCmd(56.));\n //addParallel(new BumpIntakeUpCmd());\n addSequential(new DriveStraightCmd(0.9, 4700.));\n \n addSequential(new AutoEjectBallCmd());\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=COMMAND_DECLARATIONS\n \n }", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}", "private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }", "Command createCommand();", "public void noSuchCommand() {\n }", "@Override\n\tprotected void initDefaultCommand() {\n\t\tsetDefaultCommand(new ReverseBatterShot());\n\t}", "@Override\n public void Execute() {\n\n }", "public CommandMAN() {\n super();\n }", "void launch();", "void launch();", "void launch();", "public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}", "public IManagedCommandLineGenerator getCommandLineGenerator();" ]
[ "0.5983905", "0.5794614", "0.56812394", "0.56486964", "0.56163263", "0.56163263", "0.56163263", "0.5568752", "0.55606496", "0.55443823", "0.5533999", "0.5502972", "0.5483422", "0.5476297", "0.5434281", "0.5428378", "0.5418505", "0.5413596", "0.54109573", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.5408819", "0.53992814", "0.5384151", "0.538219", "0.53740466", "0.5369861", "0.5369861", "0.5369586", "0.5350886", "0.5344235", "0.5344235", "0.5344235", "0.5344235", "0.5344235", "0.5344235", "0.5344235", "0.5339789", "0.5339789", "0.5339789", "0.53340274", "0.5330863", "0.5323331", "0.5311205", "0.5306377", "0.5305379", "0.5295583", "0.52768904", "0.52768904", "0.52768904", "0.52768904", "0.52768904", "0.52768904", "0.52714926", "0.5248487", "0.524329", "0.5242387", "0.5235014", "0.5219025", "0.5218932", "0.5209629", "0.51816547", "0.5156732", "0.51515543", "0.5150408", "0.5148102", "0.5138136", "0.51360756", "0.5134495", "0.5130599", "0.512562", "0.51193595", "0.5113545", "0.51122284", "0.50975287", "0.50975287", "0.50975287", "0.5096878", "0.5092161" ]
0.0
-1
Constructor of Origin point
public Origin(int north, int south, int east, int west){ this.north = north; this.south = south; this.east = east; this.west = west; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrigin(Point p) {\n origin = new Point(p);\n }", "protected Coord() {\n\t}", "public Point getOrigin() {\n return origin;\n }", "public Coordenada() {\n }", "@Override\n public Point getOrigin() {\n return origin;\n }", "Point() {\n this.x = 0;\n this.y = 0;\n }", "public Point(){\n this.x = 0;\n this.y = 0;\n }", "public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}", "@Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }", "public Location() {\n\t\t\n\t\txCoord=0;\n\t\tyCoord=0;\n\t\t\n\t}", "Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "public Point(Point obj)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = obj.x;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's x-coordinate\t\n\t\tthis.y = obj.y;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's y-coordinate\n\t}", "public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}", "@SuppressWarnings(\"unused\")\n public Coordinate() {}", "public Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}", "public void setOrigin(Point origin) {\n setOrigin(origin.x, origin.y);\n }", "public Point()\r\n\t{\r\n\t\tx = y = 0;\r\n\t}", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public MbCoordDpto() {\r\n \r\n }", "public MyPoint1 (double x, double y) {}", "Origin getOrigin();", "public Point2d() {\r\n\t // Call two-argument constructor and specify the origin.\r\n\t\t this(0, 0);\r\n\t\t System.out.println(\"Point2d default initiializing\");\r\n\t }", "public Position() {\n xCoord = 0;\n yCoord = 0;\n zCoord = 0;\n }", "public Vector3fc origin(Vector3f origin) {\n origin.x = cx;\n origin.y = cy;\n origin.z = cz;\n return origin;\n }", "public Vector3d getOrigin() { return mOrigin; }", "public Point(Point point) {\n super(point.getReferenceX(), point.getReferenceY());\n this.x = point.x;\n this.y = point.y;\n this.setHeight(point.getHeight());\n }", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "public Coordinate() {\n this.xCoordinate = -1;\n this.yCoordinate = -1;\n }", "public Point(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}", "public HorizontalCoords() {\n }", "public Point() {\n }", "public Point() {\n }", "public Position() {\n\n\t}", "public Point2D getOrigin() {\r\n return new Point2D.Double(originX, originY);\r\n }", "N getOrigin();", "default void setOrigin(Vector3 point) {\r\n setOrigin(point.getX(), point.getY(), point.getZ());\r\n }", "public Coordinate() { row = col = -1; }", "protected abstract void calcOrigin();", "public Location getOrigin() {\n return mOrigin;\n }", "abstract void setOrigin(double x, double y, double z);", "public Position origin(Position ep) throws InvalidPositionException;", "public Point(double x, double y){\n\t\tsuper();\n\t\tthis.x = x; \n\t\tthis.y = y;\n\t}", "public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }", "public Position(Position p_p)\n {\n this.x = p_p.x;\n this.y = p_p.y;\n }", "public Point(int x, int y){\n this.x = x;\n this.y = y;\n }", "public Point(Point other) {\n super(other);\n this.x = other.x;\n this.y = other.y;\n this.activity = other.activity;\n this.frame = other.frame;\n this.trajectoryid = other.trajectoryid;\n }", "public Origin(Origin source) {\n if (source.Origins != null) {\n this.Origins = new String[source.Origins.length];\n for (int i = 0; i < source.Origins.length; i++) {\n this.Origins[i] = new String(source.Origins[i]);\n }\n }\n if (source.BackupOrigins != null) {\n this.BackupOrigins = new String[source.BackupOrigins.length];\n for (int i = 0; i < source.BackupOrigins.length; i++) {\n this.BackupOrigins[i] = new String(source.BackupOrigins[i]);\n }\n }\n if (source.OriginPullProtocol != null) {\n this.OriginPullProtocol = new String(source.OriginPullProtocol);\n }\n if (source.CosPrivateAccess != null) {\n this.CosPrivateAccess = new String(source.CosPrivateAccess);\n }\n }", "@Override\n\tpublic LSystemBuilder setOrigin(double x, double y) {\n\t\tthis.origin = new Vector2D(x, y);\n\t\treturn this;\n\t}", "public Coordinates(final Coordinates coor) {\n\t\tthis(coor.getX(), coor.getY());\n\t}", "public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "public Point2D getOrigin() {\n Point2D resultOrigin;\n resultOrigin = new Point2D(this.origin.getX(), this.origin.getY());\n return resultOrigin;\n\n }", "public CoordinateSystem() {\r\n\t\torigin = new GuiPoint(0, 0);\r\n\t\tzoomFactor = 1f;\r\n\t}", "@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}", "Point()\n\t{\n\t\t//default point\n\t\t//this = properties of this object we are working with\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tcountOfPoints++;\n\t}", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "Punto(){\r\n x=0;\r\n y=0;\r\n }", "public Spatial(Location tr)\r\n {\r\n this(new Location.Location2D(0, 0), tr);\r\n }", "public Position(Position position) {\n this.x = position.x;\n this.y = position.y;\n this.xVelocity = position.xVelocity;\n this.yVelocity = position.yVelocity;\n this.xAcceleration = position.xAcceleration;\n this.yAcceleration = position.yAcceleration;\n }", "public Point(double x, double y){\n this.x = x;\n this.y = y;\n }", "godot.wire.Wire.Vector3 getOrigin();", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }", "public Location(int x, int y)\n {\n this.x = x;\n this.y = y;\n }", "public Vector3f getOrigin() {\r\n\t\treturn new Vector3f(mOrigin);\r\n\t}", "public Position(double x, double y, double z) {\n xCoord = x;\n yCoord = y;\n zCoord = z;\n }", "public PointImpl( CoordinateSystem crs ) {\n super( crs );\n position = new PositionImpl();\n empty = true;\n centroid = this;\n }", "Coordinate createCoordinate();", "public Point(double x, double y) {\n this.xPosition = x;\n this.yPosition = y;\n }", "godot.wire.Wire.Vector2 getOrigin();", "public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }", "public Coordinates(int x, int y)\r\n {\r\n xCoord = x;\r\n yCoord = y;\r\n }", "public Point(double x, double y) {\r\n\t\t//Constructors\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public Position(int p_X, int p_Y)\n {\n this.x = p_X;\n this.y = p_Y;\n }", "public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}", "public Position(double x, double y) {\n\t\txCoord = x;\n\t\tyCoord = y;\n\t}", "public Point(float x, float y)\n {\n this.x = x;\n this.y = y;\n }", "public void setOrigin(Vec4df origin) {\n this.origin = origin;\n }", "public Location()\n\t{\n\t\tline = -1;\n\t\tcolumn = -1;\n\t}", "public XYPointFloat()\r\n\t{\r\n\t\tthis(0, 0);\r\n\t}", "public Corner(double posX,double posY)\n {\n // inicializa variáveis de instância\n this.posX=posX;\n this.posY=posY;\n }", "public Entity() {\n this.position = new Point(0,0);\n realX=0;\n realY=0;\n }", "public Location(int x, int y)\r\n {\r\n\r\n //this basically makes a new location...it's a constructor\r\n //\"this\" refers to the instance of this class...meaning the instance\r\n //variables. This is saying that the instance variable \"x\" will be\r\n //updated to the value of x that is passed into as a parameter of\r\n //this function. This pretty much makes this a constructor method.\r\n this.x = x;\r\n this.y = y;\r\n\r\n }", "public Point(int x, int y)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public GeoPoint(double lat, double lon){\n this(lat, lon, -1d);\n }", "public Point(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Location(int x, int y)\n\t{\n\t\tmX = x;\n\t\tmY = y;\n\t}", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public Point(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public Coordinates() {\n\t\t\n\t\txPosition = 0;\t\t\t// Sets the x integer to zero\n\t\tyPosition = 0;\t\t\t// Sets the y integer to zero\n\t}", "Coordinate(int Xposition, int Yposition) {\n\t\tthis.X = Xposition;\n\t\tthis.Y = Yposition;\n\n\t}", "public Location(int x, int y) {\r\n\t\txCoord = x;\r\n\t\tyCoord = y;\r\n\t}", "public Point(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "@Override\n\tpublic double[] getOrigin()\n\t{\n\t\tdouble origin[] = new double[] {originX, originY};\n\t\treturn origin;\n\t}", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n SLOPE_ORDER = new SlopeOrder();\n }", "private Point(Point p) {\n\t\tthis.name = p.name;\n\t\tthis.position = p.position.copy();\n\t\tthis.collisionRadius = p.collisionRadius;\n\t}", "public MyPoint1(double x, int y) {\n this.x = x;\n this.y = y;\n }", "public Point(int x, int y){\n\t\tthis.x=x; this.y=y;\n\t}", "public PointImpl( double x, double y, double z, CoordinateSystem crs ) {\n super( crs );\n position = new PositionImpl( x, y, z );\n empty = false;\n centroid = this;\n }", "public Point(int x, int y) {\n this.x = x;\n this.y = y;\n }" ]
[ "0.72078353", "0.71034867", "0.7088675", "0.7052752", "0.70393574", "0.697466", "0.6961301", "0.69064325", "0.6906381", "0.6885856", "0.68711156", "0.6864933", "0.6846322", "0.6845847", "0.6807385", "0.6786426", "0.6780854", "0.67456055", "0.67433584", "0.6740899", "0.67384225", "0.67320615", "0.6730589", "0.67265236", "0.67186993", "0.67172647", "0.6713363", "0.6693176", "0.6680472", "0.6673382", "0.666669", "0.6665217", "0.6665217", "0.6633163", "0.6619612", "0.66144663", "0.6608728", "0.65849674", "0.65303445", "0.64999354", "0.64775294", "0.6472179", "0.6470179", "0.64665395", "0.64330703", "0.64295894", "0.6413668", "0.64130443", "0.64122576", "0.64018947", "0.6401683", "0.6399087", "0.6395698", "0.63944834", "0.63932794", "0.63913435", "0.63851005", "0.6365194", "0.63569975", "0.63477397", "0.63461757", "0.6341026", "0.63397527", "0.63375854", "0.6333957", "0.63337094", "0.63291967", "0.632018", "0.63151836", "0.63110095", "0.63014394", "0.6299148", "0.62938666", "0.62923324", "0.6290325", "0.62888736", "0.6284605", "0.6283348", "0.6281208", "0.62799215", "0.6275915", "0.6268202", "0.6262916", "0.6258217", "0.62538487", "0.62511426", "0.62485015", "0.6245848", "0.6240896", "0.6235711", "0.62322074", "0.6219459", "0.62184924", "0.6214285", "0.62111896", "0.62029505", "0.62023085", "0.6201667", "0.6188717", "0.61815524" ]
0.7310702
0
Getters for origin point
public int getNorth() { return north; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getOrigin() {\n return origin;\n }", "@Override\n public Point getOrigin() {\n return origin;\n }", "public Point2D getOrigin() {\r\n return new Point2D.Double(originX, originY);\r\n }", "@Override\n\tpublic double[] getOrigin()\n\t{\n\t\tdouble origin[] = new double[] {originX, originY};\n\t\treturn origin;\n\t}", "public Point2D getOrigin() {\n Point2D resultOrigin;\n resultOrigin = new Point2D(this.origin.getX(), this.origin.getY());\n return resultOrigin;\n\n }", "public Vector3d getOrigin() { return mOrigin; }", "public Location getOrigin() {\n return mOrigin;\n }", "N getOrigin();", "public int getOrigin() {\r\n\t\treturn origin;\r\n\t}", "protected abstract void calcOrigin();", "Origin getOrigin();", "public double getX() {\n return origin.getX();\n }", "public int getXOrigin() {\n return ic.getXOrigin();\n }", "double[] getOrigin();", "@Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }", "public Vector3f getOrigin() {\r\n\t\treturn new Vector3f(mOrigin);\r\n\t}", "public GeoPoint getStart(){\n return getOrigin();\n }", "godot.wire.Wire.Vector3 getOrigin();", "godot.wire.Wire.Vector2 getOrigin();", "public Point getOrigin() {\n checkWidget();\n if (content == null)\n return new Point(0, 0);\n Point location = content.getLocation();\n return new Point(-location.x, -location.y);\n }", "@Override\n public Location getOrigin() {\n return getOwner().getLocation();\n }", "public String getOrigin() {\n return mOrigin;\n }", "@java.lang.Override\n public godot.wire.Wire.Vector2 getOrigin() {\n return origin_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : origin_;\n }", "public String getOrigin()\n {\n return m_origin;\n }", "public Integer getOrigin() {\n\t\treturn new Integer(origin);\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector3 getOrigin() {\n return origin_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : origin_;\n }", "public GeoOrigin getGeoOrigin();", "public String getOrigin(){\n\t\treturn origin;\n\t}", "public Point getLocPoint(){\n return super.getLocation();\n }", "@java.lang.Override\n public godot.wire.Wire.Vector2OrBuilder getOriginOrBuilder() {\n return getOrigin();\n }", "public Location getOrigin() {\n/* 1094 */ Location origin = (getHandle()).origin;\n/* 1095 */ return (origin == null) ? null : origin.clone();\n/* */ }", "public String getOrigin() {\n return origin;\n }", "public String getOrigin() {\n return origin;\n }", "@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getOriginOrBuilder() {\n return getOrigin();\n }", "public InetSocketAddress getOrigin () {\n\t\treturn origin;\n\t}", "public int getYOrigin() {\n return ic.getYOrigin();\n }", "public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}", "public Point getLocation(){\r\n return super.getLocation();\r\n }", "public Point getLocation() { return loc; }", "public Node getOrigin()\r\n\t{\r\n\t\treturn origin;\r\n\t}", "public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}", "@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}", "public Point getLocation();", "@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}", "public Location getOrig() {\n return ticketsCalculator.getOrigin();\n }", "public double getY() {\n return origin.getY();\n }", "public Point getPosition();", "public PointF get_position() { return _position; }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public RMPoint getXY() { return new RMPoint(getX(), getY()); }", "@Override\r\n public double getOriginDistance()\r\n {\r\n double distance=Math.sqrt(\r\n Math.pow(origin.getYCoordinate(), 2)+Math.pow(origin.getYCoordinate(), 2));\r\n return distance;\r\n }", "public Point getLocation() {\n return pos;\n }", "public Point getPos(){\n return new Point(getUserFriendlyXPos(),getUserFriendlyYPos());\n }", "Point getPosition();", "Point getPosition();", "public RMPoint getFrameXY() { return isRSS()? getFrame().getOrigin() : getXY(); }", "public Coords getCoord() {\r\n\t\treturn coord;\r\n\t}", "Point getCenter();", "Point getCenter();", "public Location getOrigination()\r\n\t{ return this.origination; }", "public Point getTopLeft() {\n return location.topLeft();\n }", "public Point getPos() {\n return this.pos;\n }", "@Override\n public PointF getLocation() {\n return location;\n }", "public final double getX() { return location.getX(); }", "public int getX() {\n\treturn baseXCoord;\n}", "public void getOriginY(){\n\t\toriginY.setText(Double.toString(note.getOriginY()));\n\t}", "public Point getPosition(){\r\n return new Point(this.position);\r\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}", "public java.lang.String getPlaceOfOrigin () {\n\t\treturn placeOfOrigin;\n\t}", "public double getPoint() {\r\n return point;\r\n }", "public double getPoint() {\r\n return point;\r\n }", "public Point getPoint() {\n return point;\n }", "public GeoPoint position(){\n return position;\n }", "public Position origin(Position ep) throws InvalidPositionException;", "public Point getPoint(){\n\t\treturn _point;\n\t}", "public Point getPoint() {\n return this.mPoint;\n }", "public String getOrigin(){\r\n\t\treturn this.getChild(\"origin\").getAttribute(\"ref\").getValue();\r\n\t}", "public Vector2 Origin() {\r\n return new Vector2(Animation().FrameWidth() / 2.0f, Animation().FrameHeight());\r\n }", "public String getOrigin(){\r\n\t\treturn route.getOrigin();\r\n\t}", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public Point getPosition(){\n\t\treturn position;\n\t}", "public SbVec3f getPoint() {\n \t return worldPoint; \n }", "public Point getPosition() {\n return this.position;\n }", "public Point getPoint()\n\t{\n\t\treturn point;\n\t}", "@Nonnull\n Location getMapOrigin();", "public Point getOriginalPoint() {\r\n\t\treturn originalPoint;\r\n\t}", "IntPoint getLocation();", "public Point getElevatorPosition() {\n return this.elevator.getOrigin();\n }", "public IAirport getOrigin();", "public int getPoint(){\n return point;\n }", "public godot.wire.Wire.Vector2 getOrigin() {\n if (originBuilder_ == null) {\n return origin_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : origin_;\n } else {\n return originBuilder_.getMessage();\n }\n }", "public Point2D getPosition()\n {\n return mPosition;\n }", "public Point getLocalPosition() {\n return getLocalLowerLeft();\n }", "public godot.wire.Wire.Vector3 getOrigin() {\n if (originBuilder_ == null) {\n return origin_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : origin_;\n } else {\n return originBuilder_.getMessage();\n }\n }", "public int getX() { return loc.x; }", "public Integer getPoint() {\n return point;\n }", "public Point getPosition() {\n return position;\n }", "public float[] getLocation() {\n return llpoints;\n }", "public Point2D getLocation();" ]
[ "0.8839281", "0.8724494", "0.826249", "0.82059544", "0.81950206", "0.7951415", "0.79261637", "0.7788075", "0.7783152", "0.7765757", "0.7761624", "0.77072895", "0.76452434", "0.76408607", "0.762224", "0.75966835", "0.7584827", "0.7564411", "0.7556307", "0.750456", "0.74741", "0.73786515", "0.7365077", "0.7358434", "0.73543537", "0.72982585", "0.72786677", "0.7237003", "0.72209543", "0.72199655", "0.72128314", "0.7189784", "0.7189784", "0.7184818", "0.71764326", "0.71547484", "0.7063447", "0.705598", "0.70447105", "0.70414764", "0.7030072", "0.70230436", "0.7001556", "0.70012605", "0.6999699", "0.69952404", "0.6984391", "0.6977491", "0.69721174", "0.69539183", "0.69299054", "0.69277954", "0.69227433", "0.6906711", "0.6906318", "0.6906318", "0.6901276", "0.68935615", "0.6868893", "0.6868893", "0.68526006", "0.68462765", "0.6840231", "0.6830185", "0.6825552", "0.68217045", "0.6814813", "0.68108106", "0.6799757", "0.67816335", "0.67793065", "0.67793065", "0.677768", "0.67736965", "0.67578274", "0.6750444", "0.67429805", "0.67348826", "0.6734488", "0.67329645", "0.673284", "0.6731634", "0.67253244", "0.6716447", "0.66970164", "0.6687459", "0.66855514", "0.6677984", "0.66761863", "0.66733986", "0.6671956", "0.66702986", "0.66657674", "0.6659118", "0.6657151", "0.66446173", "0.6635663", "0.6623217", "0.66062915", "0.66040426", "0.65960854" ]
0.0
-1
Setters for origin point
public void setNorth(int north) { this.north = north; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrigin(Point origin) {\n setOrigin(origin.x, origin.y);\n }", "public void setOrigin(Point p) {\n origin = new Point(p);\n }", "abstract void setOrigin(double x, double y, double z);", "@Override\n public Point getOrigin() {\n return origin;\n }", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public Point getOrigin() {\n return origin;\n }", "default void setOrigin(Vector3 point) {\r\n setOrigin(point.getX(), point.getY(), point.getZ());\r\n }", "public void setOrigin(Point2D origin) {\r\n if (origin == null) {\r\n return;\r\n }\r\n\r\n Point2D old = getOrigin();\r\n originX = origin.getX();\r\n originY = origin.getY();\r\n firePropertyChange(\"origin\", old, getOrigin());\r\n repaint();\r\n }", "public void setOrigin(Vector3f origin) {\r\n\t\tmOrigin.set(origin);\r\n\t}", "protected abstract void calcOrigin();", "@Override\n\tpublic LSystemBuilder setOrigin(double x, double y) {\n\t\tthis.origin = new Vector2D(x, y);\n\t\treturn this;\n\t}", "public void setOrigin(Vec4df origin) {\n this.origin = origin;\n }", "public void setOrigin(int x, int y) {\r\n\t\torigin.setLocation(x, y);\r\n\t}", "public void setOrigin(float originX, float originY) {\n internalGroup.setOrigin(originX, originY);\n dataTrait.originX = originX;\n dataTrait.originY = originY;\n resetSprite();\n }", "public void setPathOrigin(int x, int y);", "public void setOrigin(){\n // draw X-axis\n graphics2D.draw(new Line2D.Double(leftMiddle, rightMiddle));\n\n // draw string \"+X\" and \"-X\"\n graphics2D.drawString(\"+X\", (int) rightMiddle.getX() - 10, (int) rightMiddle.getY() - 5);\n graphics2D.drawString(\"-X\", (int) leftMiddle.getX() + 10, (int) leftMiddle.getY() + 10);\n\n // draw Y-axis\n graphics2D.draw(new Line2D.Double(topMiddle, bottomMiddle));\n\n // draw string \"+Y\" and \"-Y\"\n graphics2D.drawString(\"+Y\", (int) topMiddle.getX() + 5, (int) topMiddle.getY() + 10);\n graphics2D.drawString(\"-Y\", (int) bottomMiddle.getX() - 15, (int) bottomMiddle.getY());\n\n }", "public void setOrigin(int source) {\r\n\t\tthis.origin = source;\r\n\t}", "public void setOrigin(int[] origin) throws Exception {\n\t\tif (origin[1]>width-1||origin[0]>height-1||origin[1]<1||origin[0]<1) {\n\t\t\tthrow new Exception(\"position wrong\");\n\t\t}\n\t\tthis.origin[0]=origin[0];\n\t\tthis.origin[1]=origin[1];\n\t}", "public Vector3d getOrigin() { return mOrigin; }", "public Vector3fc origin(Vector3f origin) {\n origin.x = cx;\n origin.y = cy;\n origin.z = cz;\n return origin;\n }", "public void setOrigin(String origin) {\n this.origin = origin;\n }", "public void setOrigin(String origin) {\n this.origin = origin;\n }", "public void setOrigin(String origin){\r\n\t\tPointingElement originChild = new PointingElement(\"origin\",\"\");\r\n\t\toriginChild.addAttribute(new PointingElement(\"ref\",origin));\r\n\t\tthis.addChild(originChild);\r\n\t}", "public Point2D getOrigin() {\r\n return new Point2D.Double(originX, originY);\r\n }", "public void setPosition(Point position);", "public Location getOrigin() {\n return mOrigin;\n }", "private void setOriginNode() {\n double sumX = 0;\n double sumY = 0;\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n sumX += x(p);\n sumY += y(p);\n }\n _nodeOrigin[0] = sumX / _elements.size();\n _nodeOrigin[1] = sumY / _elements.size();\n }", "@Override\n\tpublic double[] getOrigin()\n\t{\n\t\tdouble origin[] = new double[] {originX, originY};\n\t\treturn origin;\n\t}", "protected void setupRotationOrigin()\n\t{\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tupdateDefaultMomentMass();\n\t\tthis.currentMomentMass = this.defaultMomentMass;\n\t\t\n\t\t//changeRotationAxisTo(new Point2D.Double(0, 0));\n\t}", "void setPosition(Point point);", "public void setFromCoordinates(int fromX, int fromY);", "@Override\n public final void updateOrigin() {\n }", "@Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }", "public void setOrigin(int x, int y) {\n ic.setOrigin(x, y);\n notifyViewportListeners(x, y, panelWidth, panelHeight);\n }", "public void setLocation(float x, float y);", "Origin getOrigin();", "public int getOrigin() {\r\n\t\treturn origin;\r\n\t}", "public Point2D getOrigin() {\n Point2D resultOrigin;\n resultOrigin = new Point2D(this.origin.getX(), this.origin.getY());\n return resultOrigin;\n\n }", "N getOrigin();", "public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}", "public void set(Coord dest) {\n x = dest.x;\n y = dest.y;\n }", "public void setPosition(Point pos) {\n this.topLeft = pos.asVector();\n }", "public void setPosition(Point newPosition);", "public abstract void setPoint(Point p);", "@Override\n\tpublic void SetCoord(double x, double y) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public String getOrigin() {\n return mOrigin;\n }", "public void setStart( GeoPoint start ){\n this.setOrigin(start);\n }", "public void setLocation( Point p ) {\r\n this.x = p.x;\r\n this.y = p.y;\r\n }", "public String getOrigin(){\n\t\treturn origin;\n\t}", "public void setPoint(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public void setPosition(double x, double y)\n {\n mPosition = new Point2D.Double(x, y);\n }", "public void set(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}", "public void setOrigin (InetSocketAddress o) {\n\t\torigin = o;\n\t}", "public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }", "public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public void setPosition(double x, double y){\r\n this.x = (float)x;\r\n this.y = (float)y;\r\n changed();\r\n }", "void setPos(float x, float y);", "void setPosition(double xPos, double yPos);", "public void setPosition(float x, float y);", "public Position origin(Position ep) throws InvalidPositionException;", "@Override\n public void setPosition(float x, float y) {\n }", "@Override\n public void setLoc(Point p) {\n this.rect.setLocation(p);\n }", "public Point getOrigin() {\n checkWidget();\n if (content == null)\n return new Point(0, 0);\n Point location = content.getLocation();\n return new Point(-location.x, -location.y);\n }", "@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}", "public abstract void setPosition(Point2D position);", "@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }", "void setXandY(double x, double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "@Override\n public Location getOrigin() {\n return getOwner().getLocation();\n }", "public void setXY(double anX, double aY) { setX(anX); setY(aY); }", "void setLocation(int x, int y);", "public void setLoc(int x, int y) {\n locX = x;\n locY = y;\n }", "private void setStartLocation(final double originCoord, final int axis) {\r\n\r\n String space;\r\n int index = 0;\r\n\r\n if ( (axis < 0) || (axis > 2)) {\r\n Preferences.debug(\"Error: Axis must be 0, 1, or 2.\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n return;\r\n }\r\n\r\n // opposite axis: if axis is 2 we need to getDimElem(0). See previous examples\r\n // of String spacez = getDimElem(0).name. Minc stores the x dimension in\r\n // 2, the y dimension in 1, and the z dimension in 0.\r\n space = getDimElem(Math.abs(axis - 2)).name;\r\n\r\n for (int i = 0; i < varArray.length; i++) {\r\n\r\n if (varArray[i].name.equals(space)) {\r\n index = i;\r\n }\r\n }\r\n\r\n varArray[index].start = originCoord;\r\n }", "public void setCoord(Coords coord) {\r\n\t\tthis.coord = coord;\r\n\t}", "public void setLocation(Point2D p);", "public final void setStartLocations(final double[] origin) {\r\n\r\n if (origin.length != 3) {\r\n Preferences.debug(\"Start locations array must be of length 3.\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n return;\r\n }\r\n\r\n final float[] fOrigin = new float[origin.length];\r\n\r\n for (int i = 0; i < origin.length; i++) {\r\n setStartLocation(origin[i], i);\r\n fOrigin[i] = (float) origin[i];\r\n }\r\n\r\n super.setOrigin(fOrigin);\r\n }", "public Vector3f getOrigin() {\r\n\t\treturn new Vector3f(mOrigin);\r\n\t}", "public void moveToOrigin() {\n for(Waypoint waypoint : path)\n waypoint.setCoordinates(waypoint.getX() - path.get(0).getX(),\n waypoint.getY() - path.get(0).getY());\n }", "public String getOrigin() {\n return origin;\n }", "public String getOrigin() {\n return origin;\n }", "public void setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public void setViewAndOrigin(Rectangle2D bounds) {\r\n setView(bounds);\r\n setOrigin(new Point2D.Double(bounds.getCenterX(), bounds.getCenterY()));\r\n }", "public void getOriginY(){\n\t\toriginY.setText(Double.toString(note.getOriginY()));\n\t}", "public String getOrigin()\n {\n return m_origin;\n }", "public void setFrameXY(RMPoint aPoint) { setFrameXY(aPoint.x, aPoint.y); }", "@java.lang.Override\n public godot.wire.Wire.Vector2 getOrigin() {\n return origin_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : origin_;\n }", "public void setPoint(double point){\r\n this.point = point;\r\n }", "public void setXY(Point2D aPoint) { setXY(aPoint.getX(), aPoint.getY()); }", "@Override public void setPosition(double nx, double ny) {\n super.setPosition(nx, ny);\n ppx = px = nx;\n ppy = py = ny;\n }", "public void setPosicion(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public void panOriginTo(double x, double y) {\n \t\tfloat tx = (float) (x / mapDisplay.sc);\n \t\tfloat ty = (float) (y / mapDisplay.sc);\n \t\tsetPosition(tx, ty, tweening);\n \t}", "public void setPosition(Point point) {\n setPosition(point.x, point.y);\n }", "public void setOrigin(java.lang.String origin)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORIGIN$16, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORIGIN$16);\n }\n target.setStringValue(origin);\n }\n }", "@java.lang.Override\n public godot.wire.Wire.Vector3 getOrigin() {\n return origin_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : origin_;\n }", "public InetSocketAddress getOrigin () {\n\t\treturn origin;\n\t}", "public FieldPoint() {\n setX( DEFAULT_VALUE );\n setY( DEFAULT_VALUE );\n }", "Origins(String origin){\n\t\tthis.origin = origin;\n\t}", "public void setLocation(int someX, int someY) {\r\n\t\tx = someX;\r\n\t\ty = someY;\r\n\t}", "double[] getOrigin();", "public int getXOrigin() {\n return ic.getXOrigin();\n }", "public void setXY(int x, int y)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate \n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}", "public void setPosition(Point2D position)\n {\n mPosition = position;\n }" ]
[ "0.84062785", "0.8269789", "0.7946463", "0.78611916", "0.7859964", "0.784232", "0.7764145", "0.77529997", "0.7564555", "0.7561319", "0.75214547", "0.7469802", "0.74422467", "0.7391678", "0.73235965", "0.7279566", "0.7194102", "0.7187154", "0.7004988", "0.6965821", "0.6953444", "0.6953444", "0.69486105", "0.6947666", "0.69476074", "0.69309443", "0.69133735", "0.6911639", "0.6872647", "0.6855885", "0.6847822", "0.6824149", "0.67893875", "0.67415", "0.6724257", "0.6713982", "0.6710634", "0.6669565", "0.66346735", "0.6629976", "0.6617437", "0.6603762", "0.6600147", "0.6563574", "0.65505", "0.6507602", "0.6499195", "0.6494959", "0.6482229", "0.6478459", "0.64758533", "0.64719194", "0.6466588", "0.6461372", "0.6449361", "0.6440029", "0.64227283", "0.64200056", "0.6417842", "0.6414265", "0.64011514", "0.6398331", "0.6397515", "0.63974357", "0.6387673", "0.6387242", "0.63767284", "0.637193", "0.63680196", "0.6367183", "0.6357514", "0.6352657", "0.63458633", "0.6344178", "0.6334012", "0.6333856", "0.63308626", "0.6327907", "0.6327907", "0.63245857", "0.63240856", "0.63212913", "0.63145065", "0.63015366", "0.62883705", "0.6284465", "0.6274092", "0.6264131", "0.6262964", "0.6259769", "0.6249535", "0.6244447", "0.62354314", "0.6233086", "0.62307143", "0.6225393", "0.6223166", "0.6220747", "0.6210728", "0.6209475", "0.6205355" ]
0.0
-1
This method is responsible to get all the transactions list from backend data stream/API and provide the result to the controller layer
public List<HCLFieldTransaction> getAllTransactionListService() throws JsonProcessingException, MalformedURLException, IOException { logger.info("Logger Name: getAllTransactionListService() :: " + logger.getName()); ObjectMapper mapper = new ObjectMapper(); logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); List<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>(); /* Traversing Nested JSON node to publish the relevant data */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { HCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction(); hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); JsonNode details = transactionsNode.path("details"); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding all transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } } catch (Exception e) { logger.error("Exception : getAllTransactionListService() :: ", e); } logger.info( "Return value from service layer :: getAllTransactionListService() :: " + transactionList.toString()); return transactionList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/rest\")\n\t\tpublic @ResponseBody List<Transaction> transactionsListRest() {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\treturn (List<Transaction>) traRepo.findByUser(currentUser);\n\t\t}", "@PostMapping(\"/tlb-trade/getAll\")\n @Timed\n public ResponseEntity<ResponseResult> getAll() {\n log.debug(\"REST request to get a page of TlbTrades\");\n List<TlbTradeDTO> tlbTradeDTOList = tlbTradeService.findAll();\n ResponseResult json = new ResponseResult();\n json.setData(tlbTradeDTOList);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, HttpStatus.OK);\n }", "protected ArrayList<Transaction> refreshTransactions() {\r\n\t\ttry {\r\n\t\t\tHttpResponse response = serverAccess.getAllTransactionsResponse();\r\n\t\t\tif (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\r\n\t\t\t\tString transactionsJson = EntityUtils.toString(response.getEntity());\r\n\t\t\t\tGson gson = new GsonBuilder().create();\r\n\t\t\t\tTransaction[] transactionArray = gson.fromJson(transactionsJson, Transaction[].class);\r\n\t\t\t\tArrayList<Transaction> transactionList = new ArrayList<Transaction>(Arrays.asList(transactionArray));\r\n\t\t\t\ttxtError.setText(\"\");\r\n\t\t\t\treturn transactionList;\r\n\t\t\t} else {\r\n\t\t\t\ttxtError.setText(EntityUtils.toString(response.getEntity()) + \" (Fehler: \"\r\n\t\t\t\t\t\t+ response.getStatusLine().getStatusCode() + \")\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttxtError.setText(\"Server nicht verfügbar\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void transactionList(CallbackContext callbackContext) {\n TransactionDAO transactionDAO = new TransactionDAO(StoneSDK.this.cordova.getActivity());\n\n // cria uma lista com todas as transacoes\n List<TransactionObject> transactionObjects = transactionDAO.getAllTransactionsOrderByIdDesc();\n\n // exibe todas as transacoes (neste caso valor e status) para o usuario\n JSONArray arrayList = new JSONArray();\n\n for (TransactionObject list : transactionObjects) {\n JSONObject obj = new JSONObject();\n\n try{\n obj.put(\"idFromBase\", String.valueOf(list.getIdFromBase()));\n obj.put(\"amount\", list.getAmount());\n obj.put(\"requestId\", String.valueOf(list.getRequestId()));\n obj.put(\"emailSent\", String.valueOf(list.getEmailSent()));\n obj.put(\"timeToPassTransaction\", String.valueOf(list.getTimeToPassTransaction()));\n obj.put(\"initiatorTransactionKey\", String.valueOf(list.getInitiatorTransactionKey()));\n obj.put(\"recipientTransactionIdentification\", String.valueOf(list.getRecipientTransactionIdentification()));\n obj.put(\"cardHolderNumber\", String.valueOf(list.getCardHolderNumber()));\n obj.put(\"cardHolderName\", String.valueOf(list.getCardHolderName()).trim());\n obj.put(\"date\", String.valueOf(list.getDate()));\n obj.put(\"time\", String.valueOf(list.getTime()));\n obj.put(\"aid\", String.valueOf(list.getAid()));\n obj.put(\"arcq\", String.valueOf(list.getArcq()));\n obj.put(\"authorizationCode\", String.valueOf(list.getAuthorizationCode()));\n obj.put(\"iccRelatedData\", String.valueOf(list.getIccRelatedData()));\n obj.put(\"transactionReference\", String.valueOf(list.getTransactionReference()));\n obj.put(\"actionCode\", String.valueOf(list.getActionCode()));\n obj.put(\"commandActionCode\", String.valueOf(list.getCommandActionCode()));\n obj.put(\"pinpadUsed\", String.valueOf(list.getPinpadUsed()));\n obj.put(\"cne\", String.valueOf(list.getCne()));\n obj.put(\"cvm\", String.valueOf(list.getCvm()));\n obj.put(\"serviceCode\", String.valueOf(list.getServiceCode()));\n obj.put(\"entryMode\", String.valueOf(list.getEntryMode()));\n obj.put(\"cardBrand\", String.valueOf(list.getCardBrand()));\n obj.put(\"instalmentTransaction\", String.valueOf(list.getInstalmentTransaction()));\n obj.put(\"transactionStatus\", String.valueOf(list.getTransactionStatus()));\n obj.put(\"instalmentType\", String.valueOf(list.getInstalmentType()));\n obj.put(\"typeOfTransactionEnum\", String.valueOf(list.getTypeOfTransactionEnum()));\n obj.put(\"cancellationDate\", String.valueOf(list.getCancellationDate()));\n\n arrayList.put(obj);\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n }\n callbackContext.success(arrayList);\n }", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "public TransactionResp transaction_list() throws Exception {\n String s = main(\"transaction_list\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, TransactionResp.class);\n }", "public Collection<Transaction> getAllTransactions();", "public Transaction[] getTransactionsList() throws Exception;", "@Override\n\tpublic List<Transaction> getAllTransactions() { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Transaction\");\n\t\tList<Transaction> expenses = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn expenses; \n\t}", "public List<TransactionInfo> list() {\n LOG.debug(\"loading all transaction info\");\n try {\n return getEditor().list();\n } catch (IOException e) {\n throw new CommandExecutionException(\"error occurred while loading transactions\", e);\n }\n }", "@Override\n\tpublic List<BankTransaction> getAllTransactions() throws BusinessException {\n\t\tBankTransaction bankTransaction = null;\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tConnection connection;\n\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactionss\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tbankTransaction = new BankTransaction();\n\t\t\t\tbankTransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\tbankTransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\tbankTransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\tbankTransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\tbankTransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\tbankTransactionList.add(bankTransaction);\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"There is not data to retrieve\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some Error ocurred retrieving data for transactions\");\n\t\t}\n\t\t\n\t\treturn bankTransactionList;\n\t}", "public List<Transaction> getAllTransactions(){\n Cursor cursor = fetchAllRecords();\n List<Transaction> transactions = new ArrayList<Transaction>();\n if (cursor != null){\n while(cursor.moveToNext()){\n transactions.add(buildTransactionInstance(cursor));\n }\n cursor.close();\n }\n return transactions;\n }", "@Transactional(readOnly = true)\n public List<OrderTransactionDTO> findAll() {\n log.debug(\"Request to get all OrderTransactions\");\n return orderTransactionRepository.findAll().stream()\n .map(orderTransactionMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "java.util.List<com.google.protobuf.ByteString> getTransactionsList();", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "public List<Transaction> getAllTransaction() throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(\n @PathParam(\"CurrencyPair\") String CurrencyPair,\n @QueryParam(\"Count\") int Count,\n @QueryParam(\"TransactionId\") long TransactionId\n ) throws IOException, GatecoinException;", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();", "private Collection<StorableTransaction> getTransactionList(Object body) {\r\n Collection<StorableTransaction> txs = new ArrayList<>();\r\n JsonObject data = (JsonObject) body;\r\n data.getJsonArray(ID_COLLECTION).forEach(json -> {\r\n StorableTransaction tx = Serializer.unpack((JsonObject) json, StorableTransaction.class);\r\n tx.setTimestamp(timestampFrom(data.getLong(ID_TIME)));\r\n txs.add(tx);\r\n });\r\n return txs;\r\n }", "@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n String output = \"This entry point will return all transactions related to the account: \" + accountId;\n return Response.status(200).entity(output).build();\n \n }", "public static Transactions getTransactions() {\n return Transactions;\n }", "@GetMapping(\"/all\")\n public ResponseEntity<?> findAllData() {\n logger.info(\"Start controller call get All Data \");\n ServiceResult serviceResult = new ServiceResult();\n serviceResult.setMessage(\"Get All Data Success\");\n try {\n List<AdCampaign> lstAdCampaigns = adCampaignService.findAll();\n serviceResult.setData(lstAdCampaigns);\n serviceResult.setStatus(ServiceResult.Status.SUCCESS);\n }catch (Exception ex){\n logger.error(\"Error get All Data\");\n serviceResult.setMessage(\"Error\");\n serviceResult.setStatus(ServiceResult.Status.FAILED);\n }\n\n logger.info(\"End controller call get All Data \");\n return new ResponseEntity<ServiceResult>(serviceResult,new HttpHeaders(), HttpStatus.OK);\n }", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "public List<Transaction> readAllTransaction() throws TransactionNotFoundException {\n\t\treturn transactionDAO.listAccountTransactionTable();\n\t}", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.TransactionDetails> getTransactions(\n lnrpc.Rpc.GetTransactionsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request);\n }", "public static Response controllerGetTransactions(\n Account account,\n Token authorization\n ) {\n if (userOwnsAccount(account.accountId, authorization.userId) == null) {\n return new Response(\n 401,\n Router.AUTHENTICATION_ERROR,\n Response.ResponseType.TEXT\n );\n }\n try {\n ArrayList<Transaction> transactions = TransactionDatabase.retrieveTransactions(\n account.accountId\n );\n return new Response(200, transactions, Response.ResponseType.JSON);\n } catch (SQLException e) {\n return new Response(500, SQL_ERROR, Response.ResponseType.TEXT);\n }\n }", "List<Trade> getAllTrades();", "@java.lang.Override\n public java.util.List<com.google.protobuf.ByteString>\n getTransactionsList() {\n return transactions_;\n }", "public static Transaction[] transactionList(){\n int countFullPosition = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n countFullPosition++;\n }\n }\n if(countFullPosition == 0)\n return new Transaction[] {};\n // throw new InternalServerException(\"TransactionList is empty\");\n Transaction[] trList = new Transaction[countFullPosition];\n int index = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n trList[index] = tr;\n index++;\n }\n }\n return trList;\n }", "Map retrievePreparedTransactions();", "@JsonProperty(\"transaction\")\n public List<Transaction> getTransactionList() {\n return this.transactionList;\n }", "public void getTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.TransactionDetails> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request, responseObserver);\n }", "public void getTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.TransactionDetails> responseObserver) {\n asyncUnimplementedUnaryCall(getGetTransactionsMethod(), responseObserver);\n }", "public Iterator getTransactions() {\n return (transactions.listIterator());\n }", "com.google.protobuf.ByteString getTransactions(int index);", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return instance.getTransactions(index);\n }", "@java.lang.Override\n public java.util.List<com.google.protobuf.ByteString>\n getTransactionsList() {\n return java.util.Collections.unmodifiableList(\n instance.getTransactionsList());\n }", "@RequestMapping(value = \"/estados\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Estado> getAll() {\n log.debug(\"REST request to get all Estados\");\n return estadoRepository.findAll();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return transactions_.get(index);\n }", "@Override\r\n\t@Transactional(\"transactionManager\")\r\n\tpublic Map getAllTransactionsForConsumer(Consumer consumer,String status,int start,int size,String fromDateParm,String toDateParm,String onDateParm,int transactionId,double startAmount,double endAmount,String merchantOrderId,String organizationName,String sort,String order)\r\n\t{\r\n\r\n\t\tMap<String,Object> Response = new HashMap<String,Object>();\r\n\t\tMap<String,Object> parm = new HashMap<String,Object>();\r\n\t\tMerchant merchant =null;\r\n\t\tDate fromDate=null;\r\n\t\tDate toDate=null;\r\n\t\tDate onDate=null;\r\n\t\t\r\n\t\tif(transactionId!=-1)\r\n\t\t\tparm.put(\"transactionId\", transactionId);\t\r\n\t\telse if(!merchantOrderId.equals(\"\"))\r\n\t\t{\r\n\t\t\tparm.put(\"merchantOrderId\", merchantOrderId);\r\n\t\t\tstart=0;\r\n\t\t\tsize=1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\tif(!status.equals(\"\")) // Check only valid success states\r\n\t\t\t\tparm.put(\"status\", status);\r\n\t\t\tif(!sort.equals(\"\"))\r\n\t\t\t\tparm.put(\"sort\", sort);\r\n\t\t\tif(!order.equals(\"\"))\r\n\t\t\t\tparm.put(\"order\", order);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tif(!fromDateParm.equals(\"\"))\r\n\t\t\t\t\tfromDate = df.parse(fromDateParm);\r\n\r\n\t\t\t\tif(!toDateParm.equals(\"\"))\r\n\t\t\t\t\ttoDate = df.parse(toDateParm);\r\n\r\n\t\t\t\tif(!onDateParm.equals(\"\"))\r\n\t\t\t\t\tonDate = df.parse(onDateParm);\r\n\r\n\t\t\t}catch(IllegalArgumentException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}catch(ParseException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}\r\n\r\n\t\t\tif(onDate!=null)\r\n\t\t\t{\r\n\t\t\t\tparm.put(\"onDate\", onDate);\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tif(fromDate!=null)\r\n\t\t\t\t\tparm.put(\"fromDate\", fromDate);\r\n\t\t\t\tif(toDate!=null)\r\n\t\t\t\t\tparm.put(\"toDate\", toDate);\r\n\t\t\t}\r\n\r\n\t\t\tif(startAmount != -1)\r\n\t\t\t\tparm.put(\"startAmount\", startAmount);\r\n\t\t\tif(endAmount != -1)\r\n\t\t\t\tparm.put(\"endAmount\", endAmount);\r\n\t\t\tif(!organizationName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tmerchant = userDao.getMerchantByOrganizationName(organizationName);\r\n\t\t\t\tif(merchant==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\t\t\treturn temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tResultSetSize resultSetSize = new ResultSetSize();\r\n\t\tMap<String,Object> array[]=null;\r\n\t\tArrayList<Transactions> transactions=this.orderDao.getTransactions(merchant,consumer, parm,start,size,resultSetSize);\r\n\r\n\t\tif(transactions.size()==0)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\tarray = new Map[transactions.size()];\r\n\t\tint i;\r\n\t\tfor(i=0;i<transactions.size();i++)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\tTransactions trans= transactions.get(i);\r\n\t\t\ttemp.put(\"transaction_id\", trans.getTransaction_id());\r\n\t\t\ttemp.put(\"merchant_order_id\", trans.getMerchant_order_id());\r\n\t\t\ttemp.put(\"status\", trans.getStatus());\r\n\t\t\ttemp.put(\"amount\", trans.getTransaction_amount());\r\n\t\t\ttemp.put(\"date\",trans.getMerchant_activity_time().toString());\r\n\t\t\tarray[i]=temp;\r\n\t\t}\r\n\r\n\t\tif(resultSetSize.getRowCount()!=0){\r\n\t\t\tResponse.put(\"resultSetSize\", resultSetSize);\r\n\t\t}\r\n\t\t\r\n\t\tResponse.put(\"Transactions\", array);\r\n\t\t\r\n\t\treturn Response;\r\n\t}", "public static void getUserTransactions(String id) {\n APICalls invocations = getRetrofitEngine().create(APICalls.class);\n Call<UserTransactionsDAO> call = invocations.getUserTransactions();\n call.enqueue(new retrofit2.Callback<UserTransactionsDAO>() {\n @Override\n public void onResponse(Call<UserTransactionsDAO> call, Response<UserTransactionsDAO> response) {\n BankCraftApplication.getInstance().getEventBus().post(new GetUserTransactionsResponseEvent(response.body()));\n }\n\n @Override\n public void onFailure(Call<UserTransactionsDAO> call, Throwable t) {\n BankCraftApplication.getInstance().getEventBus().post(new GetUserTransactionsResponseEvent(t.getMessage()));\n }\n });\n }", "@Override\n\tpublic ResponseEntity<?> list() {\n\t\treturn ResponseEntity.ok(service.deposit.list(0));\n\t}", "@WithMockUser(username = \"employee\", roles = {\"EMPLOYEE\", \"CUSTOMERS\"})\n @Test\n void getTransactionsShouldReturnAJsonArray() throws Exception {\n when(transactionService.getAllTransactions(0, 100)).thenReturn(List.of(transaction));\n this.mvc.perform(\n get(\"/transactions\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(\n status().isOk());\n }", "public lnrpc.Rpc.TransactionDetails getTransactions(lnrpc.Rpc.GetTransactionsRequest request) {\n return blockingUnaryCall(\n getChannel(), getGetTransactionsMethod(), getCallOptions(), request);\n }", "@GetMapping(\"/\")\n public ResponseEntity<List<BillProjection>> getBillAll() {\n List<BillProjection> bills = billController.getBillAll();\n if (bills.size() > 0) {\n return ResponseEntity.ok().body(bills);\n } else {\n return ResponseEntity.noContent().build();\n }\n }", "public List<List<Integer>> getTransactions() {\n return transactions;\n }", "@GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(@PathParam(\"CurrencyPair\") String CurrencyPair) throws IOException, GatecoinException;", "@Override\r\n\tpublic List<Transaction> getTransactions() {\n\t\treturn null;\r\n\t}", "@GetMapping(\"/payment\")\n\tpublic ResponseEntity<List<Payment>> viewAllPayments() {\n\t\tlogger.info(\"View all Payments\");\n\t\treturn ResponseEntity.ok().body(payService.viewAllPayments());\n\t}", "@RequestMapping(value = {\"/\", \"/transactions\"})\n\tpublic String listAllTransactions(Model model) {\n\t\t\n\t\t// fetch one user and transactions for that user\n\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t.getAuthentication().getPrincipal();\n\t\tString username = user.getUsername();\n\t\tUser currentUser = userRepo.findByUsername(username);\n\t\tmodel.addAttribute(\"transactions\", traRepo.findByUser(currentUser));\n\t\t\n\t\tList<Transaction> traList = traRepo.findByUser(currentUser);\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < traList.size(); i++) {\n\t\t\tif(traList.get(i).getType().getName() == \"income\") {\n\t\t\t\tsum += traList.get(i).getAmount();\n\t\t\t}\n\t\t\tif(traList.get(i).getType().getName() == \"expense\") {\n\t\t\t\tsum -= traList.get(i).getAmount();\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tmodel.addAttribute(\"sum\", sum);\n\t\t\n\t\treturn \"transactions\";\n\t}", "@GetMapping(\"/payment-infos\")\n @Timed\n public List<PaymentInfoDTO> getAllPaymentInfos() {\n log.debug(\"REST request to get all PaymentInfos\");\n return paymentInfoService.findAll();\n }", "List<TransactionType> listClientTransactionTypes();", "@GetMapping(\"/getAllRecords\")\n public ResponseEntity< List<Record> > getAllRecords(){\n return ResponseEntity.ok().body(this.recordService.getAllRecords());\n }", "public ArrayList<Transaction> GetUserTransactions(int UserID);", "Object[] getPendingTransactions(int count);", "private void getTransactionListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "@GetMapping(\"/payments\")\n public List<Payment> getAllPayments() {\n log.debug(\"REST request to get all Payments\");\n return paymentRepository.findAll();\n }", "public List findAll() {\n return findAll(TransactionItem.class);\n }", "public @ResponseBody List<Contract> getAllContract();", "public static Response controllerGetFutureTransactions(\n Account account,\n Token authorization\n ) {\n if (userOwnsAccount(account.accountId, authorization.userId) == null) {\n return new Response(\n 401,\n Router.AUTHENTICATION_ERROR,\n Response.ResponseType.TEXT\n );\n }\n try {\n ArrayList<FutureTransaction> transactions = TransactionDatabase.retrieveFutureTransactions(\n account.accountId\n );\n return new Response(200, transactions, Response.ResponseType.JSON);\n } catch (SQLException e) {\n return new Response(500, SQL_ERROR, Response.ResponseType.TEXT);\n }\n }", "@RequestMapping(method = RequestMethod.POST, value = \"/viewAllCustomer\", consumes = \"application/json\")\n\tpublic ResponseEntity<List<CustomerDaoBean>> viewuser(){\n\t\tList<CustomerDaoBean> beans = payService.viewdetails();\n\t\treturn ResponseEntity.accepted().body(beans);\n\t}", "public java.util.List<LdPublisher> delegateGetListAllTx() {\r\n return getMyDao().getListAll();\r\n }", "@Override\n\tpublic List<Transaction> getTransactions() {\n\t\treturn null;\n\t}", "private static List<Transaction> toTransactions(AppBlock appBlock) {\n List<AppBlock.TransactionObject> transactionResults = appBlock.getBlock().getBody().getTransactions();\n List<Transaction> transactions = new ArrayList<Transaction>(transactionResults.size());\n for (AppBlock.TransactionObject transactionResult: transactionResults) {\n transactions.add((Transaction) transactionResult.get());\n }\n return transactions;\n }", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "public Map<LocalDate, Transactions> getTransactionsList(){\n return listOfTransactions;\n }", "private void printAllTransactions(){\n Set<Transaction> transactions = ctrl.getAllTransactions();\n transactions.stream().forEach(System.out::println);\n }", "ArrayList<String> getTransactions(String IBAN, Klant klant) throws SessionExpiredException, IllegalArgumentException, RemoteException;", "@Transactional(readOnly = true)\n public List<ActivityEstimationDTO> findAll() {\n log.debug(\"Request to get all ActivityEstimations\");\n return activityEstimationRepository.findAll().stream()\n .map(activityEstimationMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }", "public List<Buy> getAll() throws PersistException;", "List<TransactionVO> addPendingTransactions(List<SignedTransaction> transactions);", "@Transactional\n\tpublic Set<TransactionTable> findAllTransactions() {\n\t\t List<TransactionTable> list = new ArrayList<TransactionTable>();\n\t TypedQuery<TransactionTable> query = entityManager.createNamedQuery(\"TransactionTable.findAll\", TransactionTable.class);\n\t list = query.getResultList();\n\t Set<TransactionTable> TransactionSet = new HashSet<TransactionTable>(list);\n\t return TransactionSet;\n\t\n\t}", "@Override\r\n public void getSellRecords() {\r\n mApiService.getSellRecords(\"1080X1920\",\"armeabi-v7a\",\"7.0\",\r\n \"862007036501106\",\"meizu\", \"2262cc25d91b2d2fb1bb17508a3051df\",\r\n \"3.0\",\"879\",\"a4:44:d1:41:f3:14\",\r\n \"45\",\"3.9.6.0\",\"m3 note\",\r\n \"app_tg\")\r\n .subscribeOn(Schedulers.io())\r\n .observeOn(AndroidSchedulers.mainThread())\r\n .subscribe(new Subscriber<SellRecordsEntity>() {\r\n @Override\r\n public void onCompleted() {\r\n Logger.d(\"getSellRecords onCompleted------------->\");\r\n mView.onUpdateLoadingPage(LoadingPage.ResultState.STATE_SUCCESS);\r\n }\r\n @Override\r\n public void onError(Throwable e) {\r\n Logger.d(\"getSellRecords onError------------->\");\r\n mView.onUpdateLoadingPage(LoadingPage.ResultState.STATE_ERROR);\r\n e.printStackTrace();\r\n }\r\n @Override\r\n public void onNext(SellRecordsEntity sellRecordsEntity) {\r\n Logger.d(\"getSellRecords onNext------------->\");\r\n mView.onDisplaySellRecords(sellRecordsEntity);\r\n }\r\n });\r\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "public List<Transaction> getTransactions() throws SQLException {\n\t\tList<Transaction> result = new ArrayList<>();\n\t\tStatement statement = conn.createStatement();\n\t\ttry (ResultSet resultSet = statement.executeQuery(\"select Date, Amount, Category, Type from transaction\")) {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tresult.add(new Transaction(resultSet.getDate(1), resultSet.getDouble(2), resultSet.getString(3), resultSet.getString(4)));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Test\n public void validSessionTransactionsGetTest() {\n validSessionValidTransactionPostTest();\n\n int size = given()\n .header(\"X-session-ID\", sessionId)\n .get(\"api/v1/transactions\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .statusCode(200)\n .extract()\n .jsonPath()\n .getList(\"$\")\n .size();\n\n assertThat(size, lessThanOrEqualTo(20));\n }", "@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }", "public ArrayList<Transaction> getTransactions() throws SQLException {\n return transactions.getAll();\n }", "@Override\n public List list() throws TransactionException {\n return hibernateQuery.list();\n }", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "@Test\n void getTransactionList() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n String fromAccountingDate = \"2019-01-01\";\n String toAccountingDate = \"2019-12-01\";\n\n Response response = greetingWebClient.getTransactionList(idAccount, fromAccountingDate, toAccountingDate);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "public List<Transaction> getAllReserveTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.put(\"totalInvoices\", invoices.size());\n response.put(\"invoices\", invoices);\n// Send to client\n return response;\n }", "@Override\r\n\tpublic List<CustVO> getAll() {\n\t\tList<CustVO> list = new ArrayList<CustVO>();\r\n\t\tCustVO custVO = null;\r\n\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\r\n\t\t\trs = pstmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustVO = new CustVO();\r\n\t\t\t\tcustVO.setCust_ID(rs.getString(\"CUST_ID\"));\r\n\t\t\t\tcustVO.setCust_acc(rs.getString(\"CUST_ACC\"));\r\n\t\t\t\tcustVO.setCust_pwd(rs.getString(\"CUST_PWD\"));\r\n\t\t\t\tcustVO.setCust_name(rs.getString(\"CUST_NAME\"));\r\n\t\t\t\tcustVO.setCust_sex(rs.getString(\"CUST_SEX\"));\r\n\t\t\t\tcustVO.setCust_tel(rs.getString(\"CUST_TEL\"));\r\n\t\t\t\tcustVO.setCust_addr(rs.getString(\"CUST_ADDR\"));\r\n\t\t\t\tcustVO.setCust_pid(rs.getString(\"CUST_PID\"));\r\n\t\t\t\tcustVO.setCust_mail(rs.getString(\"CUST_MAIL\"));\r\n\t\t\t\tcustVO.setCust_brd(rs.getDate(\"CUST_BRD\"));\r\n\t\t\t\tcustVO.setCust_reg(rs.getDate(\"CUST_REG\"));\r\n\t\t\t\tcustVO.setCust_pic(rs.getBytes(\"CUST_PIC\"));\r\n\t\t\t\tcustVO.setCust_status(rs.getString(\"CUST_STATUS\"));\r\n\t\t\t\tcustVO.setCust_niname(rs.getString(\"CUST_NINAME\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured. \" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size() > transaction_id) {\n\t\t\treturn transactions.get((int) transaction_id);\n\t\t} else {\n\t\t\tthrow new TransactionNotFoundException(transaction_id);\n\t\t}\n\t}", "@GetMapping(\"/integrations\")\n public List<IntegrationDTO> getAllIntegrations() {\n log.debug(\"REST request to get all Integrations\");\n return integrationService.findAll();\n }", "@GetMapping(path = \"\")\n public ResponseEntity<?> getContractors(){\n logger.debug(\"Request to get all Contractors\");\n List<ContractorDTO> contractors = contractorService.getContractors().stream().map(this::convertToDTO).collect(Collectors.toList());\n if(contractors == null || contractors.size() < 1) throw new ResourceNotFoundException(\"Unable to find any Contractors\");\n return new ResponseEntity(contractors, HttpStatus.ACCEPTED);\n }", "@RequestMapping(value=\"/purchase/all\",method=RequestMethod.GET)\n\t\t public @ResponseBody ResponseEntity<List<Purchases>> getAllPurchases(){\n\t\t\t List<Purchases> purchase=(List<Purchases>) purchaseDAO.findAll();\n\t\t\t Books books=null;\n\t\t\t User user=null;\n\t\t\t for(Purchases purch : purchase) {\n\t\t\t\t books=booksDAO.findOne(purch.getIsbn());\n\t\t\t\t purch.setBook(books);\n\t\t\t\t user=userDAO.findOne(purch.getUserId());\n\t\t\t\t purch.setUser(user);\n\t\t\t }\n\t\t\t return new ResponseEntity<List<Purchases>>(purchase, HttpStatus.OK);\n\t\t }", "@GET\n @Path(\"all\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResult() {\n JSONArray array = new JSONArray();\n JSONObject result = new JSONObject();\n\n List<User> users = userDb.listAllUsers();\n for (User user : users) {\n JSONObject ob = db.getCommitResultByStudent(user.getId());\n array.put(ob);\n }\n result.put(\"result\", array); \n\n return Response.ok().entity(result.toString()).build();\n }", "@GetMapping(\"/allCustomers\")\n public List<Customer> getAllCusData() {\n return customerData.showList();\n }", "List<String> getTransactionInfos() {\n\t\tList<String> result = new ArrayList<String>();\n\t\tfor (Transaction transaction : transactionLog.getTransactions()) {\n\t\t\tresult.add(transaction.toString());\n\t\t}\n\t\treturn result;\n\t}", "@RequestMapping(value=\"/generateanalysis\",method=RequestMethod.GET)\r\n\tpublic List<PaymentDetailsBean> transactionAnalysis(Date start, Date end){\r\n \r\n\t\treturn service.transactionAnalysis(start, end);\r\n\t}", "@GetMapping( value = \"/wallets\",produces = MediaType.APPLICATION_JSON_VALUE)\n public List<Wallet> getWallet() throws ExecutionException, InterruptedException {\n CompletableFuture<List<Wallet>> wallet = walletBankService.getWallet();\n CompletableFuture.allOf(wallet).join();\n List<Wallet> wallets = wallet.get();\n return wallets;\n }", "public ArrayList<Purchase> getTransactionList()\r\n\t{\r\n\t\t\r\n\t\treturn transactionList;\r\n\t\t\r\n\t}", "@RequestMapping(value = \"/admin/trans\", method = RequestMethod.GET)\n public String adminTransactionsPage(Model model) {\n model.addAttribute(\"transactions\", transactionService.findAllTransactions());\n return \"admin/admin-trans\";\n }", "@GetMapping\n public ResponseEntity<Set<Wallet>> listWallets() {\n return ResponseEntity\n .ok()\n .body(walletService.getAllWallets());\n }" ]
[ "0.72661763", "0.6981378", "0.6976167", "0.6945337", "0.6943688", "0.6889564", "0.68217736", "0.67872393", "0.662096", "0.65848255", "0.6555383", "0.6537089", "0.6511523", "0.6496055", "0.6488385", "0.64223766", "0.63317794", "0.63209325", "0.63013786", "0.6295239", "0.624705", "0.62293655", "0.6224368", "0.61599296", "0.6155402", "0.6149118", "0.6143285", "0.6142177", "0.6118181", "0.6077318", "0.60669625", "0.604677", "0.60452956", "0.6035948", "0.6020935", "0.6017766", "0.6015682", "0.59881383", "0.59568834", "0.5945073", "0.594183", "0.5911961", "0.5905191", "0.58978474", "0.5897609", "0.5891768", "0.58872557", "0.5885512", "0.58787763", "0.58782625", "0.58697456", "0.5859471", "0.5853441", "0.58496964", "0.58492583", "0.58475614", "0.58411837", "0.58357596", "0.5830723", "0.5827738", "0.5812721", "0.58112615", "0.5799043", "0.5792504", "0.5785035", "0.57815737", "0.57553923", "0.57389414", "0.5731592", "0.5728374", "0.57270503", "0.57255644", "0.57098037", "0.5708415", "0.5692565", "0.56901056", "0.56884235", "0.568062", "0.56732124", "0.5671097", "0.56669134", "0.5664358", "0.5662641", "0.5649892", "0.5646204", "0.56349456", "0.5616821", "0.5608667", "0.56077677", "0.5604716", "0.56006265", "0.55856377", "0.55789673", "0.5577062", "0.5576398", "0.557483", "0.5569658", "0.5563203", "0.556285", "0.5558839" ]
0.64772683
15
This method is responsible to get all the transactions list by transactionType from backend data stream/API and provide the result to the controller layer
public List<HCLFieldTransaction> getTransactionbyType(String transactionType) throws JsonProcessingException, IOException { logger.info("Logger Name: getTransactionbyType() :: " + logger.getName()); logger.debug("Transaction Type : getTransactionbyType() :: " + transactionType); ObjectMapper mapper = new ObjectMapper(); logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); List<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>(); /* Traversing Nested JSON node to publish the relevant data */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { HCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction(); JsonNode details = transactionsNode.path("details"); hclFieldTransaction.setTransactionType(details.path("type").asText()); /* When transactionType is null or empty */ if (transactionType == null && details.path("type").isNull() == true) { hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding specific type of transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } /* When transactionType is not null or empty */ else if (transactionType != null) { if (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) { logger.debug("Transaction Type :: " + transactionType); hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding specific type of transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } } } } catch (Exception e) { logger.error("Exception : getTransactionbyType() :: ", e); } logger.info("Return value from service layer:: getTransactionbyType() :: " + transactionList.toString()); return transactionList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<HCLFieldTransaction> getAllTransactionListService()\r\n\t\t\tthrows JsonProcessingException, MalformedURLException, IOException {\r\n\t\tlogger.info(\"Logger Name: getAllTransactionListService() :: \" + logger.getName());\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t/* Adding all transaction list into one ArrayList */\r\n\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getAllTransactionListService() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\r\n\t\t\t\t\"Return value from service layer :: getAllTransactionListService() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\t}", "List<TransactionType> listClientTransactionTypes();", "@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}", "@GetMapping(\"/rest\")\n\t\tpublic @ResponseBody List<Transaction> transactionsListRest() {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\treturn (List<Transaction>) traRepo.findByUser(currentUser);\n\t\t}", "@PostMapping(\"/tlb-trade/getAll\")\n @Timed\n public ResponseEntity<ResponseResult> getAll() {\n log.debug(\"REST request to get a page of TlbTrades\");\n List<TlbTradeDTO> tlbTradeDTOList = tlbTradeService.findAll();\n ResponseResult json = new ResponseResult();\n json.setData(tlbTradeDTOList);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, HttpStatus.OK);\n }", "private void transactionList(CallbackContext callbackContext) {\n TransactionDAO transactionDAO = new TransactionDAO(StoneSDK.this.cordova.getActivity());\n\n // cria uma lista com todas as transacoes\n List<TransactionObject> transactionObjects = transactionDAO.getAllTransactionsOrderByIdDesc();\n\n // exibe todas as transacoes (neste caso valor e status) para o usuario\n JSONArray arrayList = new JSONArray();\n\n for (TransactionObject list : transactionObjects) {\n JSONObject obj = new JSONObject();\n\n try{\n obj.put(\"idFromBase\", String.valueOf(list.getIdFromBase()));\n obj.put(\"amount\", list.getAmount());\n obj.put(\"requestId\", String.valueOf(list.getRequestId()));\n obj.put(\"emailSent\", String.valueOf(list.getEmailSent()));\n obj.put(\"timeToPassTransaction\", String.valueOf(list.getTimeToPassTransaction()));\n obj.put(\"initiatorTransactionKey\", String.valueOf(list.getInitiatorTransactionKey()));\n obj.put(\"recipientTransactionIdentification\", String.valueOf(list.getRecipientTransactionIdentification()));\n obj.put(\"cardHolderNumber\", String.valueOf(list.getCardHolderNumber()));\n obj.put(\"cardHolderName\", String.valueOf(list.getCardHolderName()).trim());\n obj.put(\"date\", String.valueOf(list.getDate()));\n obj.put(\"time\", String.valueOf(list.getTime()));\n obj.put(\"aid\", String.valueOf(list.getAid()));\n obj.put(\"arcq\", String.valueOf(list.getArcq()));\n obj.put(\"authorizationCode\", String.valueOf(list.getAuthorizationCode()));\n obj.put(\"iccRelatedData\", String.valueOf(list.getIccRelatedData()));\n obj.put(\"transactionReference\", String.valueOf(list.getTransactionReference()));\n obj.put(\"actionCode\", String.valueOf(list.getActionCode()));\n obj.put(\"commandActionCode\", String.valueOf(list.getCommandActionCode()));\n obj.put(\"pinpadUsed\", String.valueOf(list.getPinpadUsed()));\n obj.put(\"cne\", String.valueOf(list.getCne()));\n obj.put(\"cvm\", String.valueOf(list.getCvm()));\n obj.put(\"serviceCode\", String.valueOf(list.getServiceCode()));\n obj.put(\"entryMode\", String.valueOf(list.getEntryMode()));\n obj.put(\"cardBrand\", String.valueOf(list.getCardBrand()));\n obj.put(\"instalmentTransaction\", String.valueOf(list.getInstalmentTransaction()));\n obj.put(\"transactionStatus\", String.valueOf(list.getTransactionStatus()));\n obj.put(\"instalmentType\", String.valueOf(list.getInstalmentType()));\n obj.put(\"typeOfTransactionEnum\", String.valueOf(list.getTypeOfTransactionEnum()));\n obj.put(\"cancellationDate\", String.valueOf(list.getCancellationDate()));\n\n arrayList.put(obj);\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n }\n callbackContext.success(arrayList);\n }", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "public static List<Transaction> getTransactionsFilteredByDate(String startDate, String endDate,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\t// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t// Date start = (Date) sdf.parse(startDate);\r\n\t\t// Date end = (Date) sdf.parse(endDate);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE DATE(purchase_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(purchase_date) <= DATE('\" + endDate + \"') ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE DATE(sales_date) >= DATE('\" + startDate\r\n\t\t\t\t\t+ \"') AND DATE(sales_date) <= DATE('\" + endDate + \"') ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}", "@Override\n\tpublic List<BankTransaction> getAllTransactions() throws BusinessException {\n\t\tBankTransaction bankTransaction = null;\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tConnection connection;\n\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactionss\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tbankTransaction = new BankTransaction();\n\t\t\t\tbankTransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\tbankTransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\tbankTransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\tbankTransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\tbankTransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\tbankTransactionList.add(bankTransaction);\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"There is not data to retrieve\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some Error ocurred retrieving data for transactions\");\n\t\t}\n\t\t\n\t\treturn bankTransactionList;\n\t}", "public Collection<Transaction> getAllTransactions();", "public Transaction[] getTransactionsList() throws Exception;", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "public TransactionResp transaction_list() throws Exception {\n String s = main(\"transaction_list\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, TransactionResp.class);\n }", "@Transactional(readOnly = true)\n public List<OrderTransactionDTO> findAll() {\n log.debug(\"Request to get all OrderTransactions\");\n return orderTransactionRepository.findAll().stream()\n .map(orderTransactionMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@Test\n public void getTransactionsByType() throws Exception {\n String expectedFile = \"src/test/resources/expected-transactions.json\";\n List<Transaction> expectedTransactions = Arrays.asList(new ObjectMapper()\n .readValue(JsonUtils.readFileAsString(expectedFile), Transaction[].class));\n List<Transaction> actualTransactions = openBankTransactionsService.getTransactionsByType(TEST_TRANSACTION_TYPE);\n assertEquals(expectedTransactions, actualTransactions);\n }", "protected ArrayList<Transaction> refreshTransactions() {\r\n\t\ttry {\r\n\t\t\tHttpResponse response = serverAccess.getAllTransactionsResponse();\r\n\t\t\tif (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\r\n\t\t\t\tString transactionsJson = EntityUtils.toString(response.getEntity());\r\n\t\t\t\tGson gson = new GsonBuilder().create();\r\n\t\t\t\tTransaction[] transactionArray = gson.fromJson(transactionsJson, Transaction[].class);\r\n\t\t\t\tArrayList<Transaction> transactionList = new ArrayList<Transaction>(Arrays.asList(transactionArray));\r\n\t\t\t\ttxtError.setText(\"\");\r\n\t\t\t\treturn transactionList;\r\n\t\t\t} else {\r\n\t\t\t\ttxtError.setText(EntityUtils.toString(response.getEntity()) + \" (Fehler: \"\r\n\t\t\t\t\t\t+ response.getStatusLine().getStatusCode() + \")\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttxtError.setText(\"Server nicht verfügbar\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static List<Transaction> getTransactionsFilteredByClientName(String clientName,\r\n\t\t\tTransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tint clientId = getClientId(clientName, transactionType);\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase WHERE purchase_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales WHERE sales_client_id = \" + clientId\r\n\t\t\t\t\t+ \" ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}", "public static List<Transaction> openTransactionDatabase(TransactionType transactionType) {\r\n\t\tList<Transaction> transactions = new ArrayList<>();\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tfinal String OPEN_TRANSACTIONS_FROM_DB;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM purchase ORDER BY purchase_id DESC\";\r\n\t\telse\r\n\t\t\tOPEN_TRANSACTIONS_FROM_DB = \"SELECT * FROM sales ORDER BY sales_id DESC\";\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(OPEN_TRANSACTIONS_FROM_DB);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint transactionNumber = rs.getInt(1);\r\n\t\t\t\tString transactionDate = rs.getString(2);\r\n\t\t\t\tString nameOfClient = getClient(rs.getInt(3), transactionType).getName();\r\n\t\t\t\tdouble cashGiven = rs.getDouble(4);\r\n\t\t\t\tObservableList<Product> productList = getProductTransaction(rs.getInt(1), transactionType);\r\n\r\n\t\t\t\ttransactions.add(new Transaction(transactionNumber, transactionDate, nameOfClient, cashGiven, cashGiven,\r\n\t\t\t\t\t\tproductList.size(), productList));\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn transactions;\r\n\t}", "private Collection<StorableTransaction> getTransactionList(Object body) {\r\n Collection<StorableTransaction> txs = new ArrayList<>();\r\n JsonObject data = (JsonObject) body;\r\n data.getJsonArray(ID_COLLECTION).forEach(json -> {\r\n StorableTransaction tx = Serializer.unpack((JsonObject) json, StorableTransaction.class);\r\n tx.setTimestamp(timestampFrom(data.getLong(ID_TIME)));\r\n txs.add(tx);\r\n });\r\n return txs;\r\n }", "public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "public List<Transaction> getAllTransactions(){\n Cursor cursor = fetchAllRecords();\n List<Transaction> transactions = new ArrayList<Transaction>();\n if (cursor != null){\n while(cursor.moveToNext()){\n transactions.add(buildTransactionInstance(cursor));\n }\n cursor.close();\n }\n return transactions;\n }", "public List<TransactionType> listESETransactionTypes();", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(\n @PathParam(\"CurrencyPair\") String CurrencyPair,\n @QueryParam(\"Count\") int Count,\n @QueryParam(\"TransactionId\") long TransactionId\n ) throws IOException, GatecoinException;", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.TransactionDetails> getTransactions(\n lnrpc.Rpc.GetTransactionsRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request);\n }", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "java.util.List<com.google.protobuf.ByteString> getTransactionsList();", "public List<Transaction> getAllTransaction() throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }", "public List<TransactionInfo> list() {\n LOG.debug(\"loading all transaction info\");\n try {\n return getEditor().list();\n } catch (IOException e) {\n throw new CommandExecutionException(\"error occurred while loading transactions\", e);\n }\n }", "List<TransactionType> listAgentTransactionTypes();", "@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n String output = \"This entry point will return all transactions related to the account: \" + accountId;\n return Response.status(200).entity(output).build();\n \n }", "@GetMapping(params = \"type\")\n\tpublic Page<Transaction> getTransactionsByTypeAndPageable(\n\t\t@RequestParam String type, \n\t\tPageable pageable) \n\t{\n\t\tPage<Transaction> pageOfTransactions = null;\n\t\t\n\t\ttry {\n\t\t\tpageOfTransactions = transactionService.getTransactionsByTypeAndPageable(type, pageable);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn pageOfTransactions;\n\t}", "@Override\r\n\t@Transactional(\"transactionManager\")\r\n\tpublic Map getAllTransactionsForConsumer(Consumer consumer,String status,int start,int size,String fromDateParm,String toDateParm,String onDateParm,int transactionId,double startAmount,double endAmount,String merchantOrderId,String organizationName,String sort,String order)\r\n\t{\r\n\r\n\t\tMap<String,Object> Response = new HashMap<String,Object>();\r\n\t\tMap<String,Object> parm = new HashMap<String,Object>();\r\n\t\tMerchant merchant =null;\r\n\t\tDate fromDate=null;\r\n\t\tDate toDate=null;\r\n\t\tDate onDate=null;\r\n\t\t\r\n\t\tif(transactionId!=-1)\r\n\t\t\tparm.put(\"transactionId\", transactionId);\t\r\n\t\telse if(!merchantOrderId.equals(\"\"))\r\n\t\t{\r\n\t\t\tparm.put(\"merchantOrderId\", merchantOrderId);\r\n\t\t\tstart=0;\r\n\t\t\tsize=1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\tif(!status.equals(\"\")) // Check only valid success states\r\n\t\t\t\tparm.put(\"status\", status);\r\n\t\t\tif(!sort.equals(\"\"))\r\n\t\t\t\tparm.put(\"sort\", sort);\r\n\t\t\tif(!order.equals(\"\"))\r\n\t\t\t\tparm.put(\"order\", order);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tif(!fromDateParm.equals(\"\"))\r\n\t\t\t\t\tfromDate = df.parse(fromDateParm);\r\n\r\n\t\t\t\tif(!toDateParm.equals(\"\"))\r\n\t\t\t\t\ttoDate = df.parse(toDateParm);\r\n\r\n\t\t\t\tif(!onDateParm.equals(\"\"))\r\n\t\t\t\t\tonDate = df.parse(onDateParm);\r\n\r\n\t\t\t}catch(IllegalArgumentException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}catch(ParseException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}\r\n\r\n\t\t\tif(onDate!=null)\r\n\t\t\t{\r\n\t\t\t\tparm.put(\"onDate\", onDate);\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tif(fromDate!=null)\r\n\t\t\t\t\tparm.put(\"fromDate\", fromDate);\r\n\t\t\t\tif(toDate!=null)\r\n\t\t\t\t\tparm.put(\"toDate\", toDate);\r\n\t\t\t}\r\n\r\n\t\t\tif(startAmount != -1)\r\n\t\t\t\tparm.put(\"startAmount\", startAmount);\r\n\t\t\tif(endAmount != -1)\r\n\t\t\t\tparm.put(\"endAmount\", endAmount);\r\n\t\t\tif(!organizationName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tmerchant = userDao.getMerchantByOrganizationName(organizationName);\r\n\t\t\t\tif(merchant==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\t\t\treturn temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tResultSetSize resultSetSize = new ResultSetSize();\r\n\t\tMap<String,Object> array[]=null;\r\n\t\tArrayList<Transactions> transactions=this.orderDao.getTransactions(merchant,consumer, parm,start,size,resultSetSize);\r\n\r\n\t\tif(transactions.size()==0)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\tarray = new Map[transactions.size()];\r\n\t\tint i;\r\n\t\tfor(i=0;i<transactions.size();i++)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\tTransactions trans= transactions.get(i);\r\n\t\t\ttemp.put(\"transaction_id\", trans.getTransaction_id());\r\n\t\t\ttemp.put(\"merchant_order_id\", trans.getMerchant_order_id());\r\n\t\t\ttemp.put(\"status\", trans.getStatus());\r\n\t\t\ttemp.put(\"amount\", trans.getTransaction_amount());\r\n\t\t\ttemp.put(\"date\",trans.getMerchant_activity_time().toString());\r\n\t\t\tarray[i]=temp;\r\n\t\t}\r\n\r\n\t\tif(resultSetSize.getRowCount()!=0){\r\n\t\t\tResponse.put(\"resultSetSize\", resultSetSize);\r\n\t\t}\r\n\t\t\r\n\t\tResponse.put(\"Transactions\", array);\r\n\t\t\r\n\t\treturn Response;\r\n\t}", "@Override\n\tpublic List<Transaction> getAllTransactions() { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Transaction\");\n\t\tList<Transaction> expenses = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn expenses; \n\t}", "public List<Transaction> readAllTransaction() throws TransactionNotFoundException {\n\t\treturn transactionDAO.listAccountTransactionTable();\n\t}", "@RequestMapping(value = \"/contracts/types\", method = RequestMethod.GET)\n public JsonListWrapper<String> listAllTypes() {\n Collection<String> items = ((ContractService) service).findAllInsuranceTypes();\n return JsonListWrapper.withTotal(items);\n }", "public lnrpc.Rpc.TransactionDetails getTransactions(lnrpc.Rpc.GetTransactionsRequest request) {\n return blockingUnaryCall(\n getChannel(), getGetTransactionsMethod(), getCallOptions(), request);\n }", "public void getTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.TransactionDetails> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request, responseObserver);\n }", "List<Trade> getAllTrades();", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "public List<ItemTypeDTO> getAll();", "com.google.protobuf.ByteString getTransactions(int index);", "public List<Transactiontype> getAllTxnTypes()\r\n throws Exception {\r\n\r\n List<Transactiontype> txnTypeList = null;\r\n Session session = null;\r\n try {\r\n session = HibernateInit.sessionFactory.openSession();\r\n String sql = \"from Transactiontype as s order by Upper(s.description) asc\";\r\n Query query = session.createQuery(sql);\r\n txnTypeList = query.list();\r\n\r\n } catch (Exception e) {\r\n throw e;\r\n } finally {\r\n try {\r\n session.flush();\r\n session.close();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n }\r\n return txnTypeList;\r\n }", "public void getTransactions(lnrpc.Rpc.GetTransactionsRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.TransactionDetails> responseObserver) {\n asyncUnimplementedUnaryCall(getGetTransactionsMethod(), responseObserver);\n }", "public static Transactions getTransactions() {\n return Transactions;\n }", "public List findAll() {\n return findAll(TransactionItem.class);\n }", "@RequestMapping(value = \"/transactionservice/transaction/{transaction_id}\", method=RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic Transaction getTransaction(@PathVariable long transaction_id) {\n\t\tif(transactions.size() > transaction_id) {\n\t\t\treturn transactions.get((int) transaction_id);\n\t\t} else {\n\t\t\tthrow new TransactionNotFoundException(transaction_id);\n\t\t}\n\t}", "@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();", "Map retrievePreparedTransactions();", "public void queryBytransType(String transType) {\n\t\tTRANSACTION_TYPE = transType;\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return instance.getTransactions(index);\n }", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(@PathParam(\"CurrencyPair\") String CurrencyPair) throws IOException, GatecoinException;", "public static Transaction[] transactionList(){\n int countFullPosition = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n countFullPosition++;\n }\n }\n if(countFullPosition == 0)\n return new Transaction[] {};\n // throw new InternalServerException(\"TransactionList is empty\");\n Transaction[] trList = new Transaction[countFullPosition];\n int index = 0;\n for (Transaction tr:transactions) {\n if(tr != null){\n trList[index] = tr;\n index++;\n }\n }\n return trList;\n }", "public List<Transaction> readByTransactionId(int transactionId) throws TransactionNotFoundException {\n\t\treturn transactionDAO.selectByTransactionId(transactionId);\n\t}", "public ArrayList<Transaction> GetUserTransactions(int UserID);", "@GetMapping(\"/rent\")\n public ResultEntity<List<ItemDTO>> getAllRent()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Rent\");\n }", "@Synchronized\r\n public ArrayList<TransferModel> getTransferModelsList(boolean isIncoming) {\r\n boolean showFinished = AppStorage.getInstance(BaseApplication.getInstance()).getValue(AppStorage.SP_SHOW_FINISHED, false);\r\n ArrayList<TransferModel> arrayList = new ArrayList<>();\r\n String selectQuery = \"\";\r\n if (showFinished) {\r\n// if (isIncoming) {\r\n selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.isIncoming + \"='\" + (isIncoming ? 0 : 1) + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// } else {\r\n// selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.isIncoming + \"='\" + 1 + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// }\r\n } else {\r\n selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + (isIncoming ? (\"' AND \" + TableTransferModel.isIncoming + \"='\" + 0 + \"'\") : \"'\") + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// if (isIncoming) {\r\n// selectQuery =\r\n// \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + (isIncoming ? (\"' AND\" + TableTransferModel.isIncoming + \"='\" + 0 + \"'\") : \"'\") + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// } else {\r\n// selectQuery =\r\n// \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + \"' AND\" + TableTransferModel.isIncoming + \"='\" + 1 + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// }\r\n }\r\n databaseHandler.getReadableDatabase();\r\n Cursor cursor = databaseHandler.selectData(selectQuery, true);\r\n if (cursor != null && cursor.moveToFirst()) {\r\n do {\r\n TransferModel salesReportsModel = new TransferModel();\r\n salesReportsModel.name = cursor.getString(cursor.getColumnIndex(TableTransferModel.name));\r\n salesReportsModel.timeStamp = cursor.getString(cursor.getColumnIndex(TableTransferModel.timeStamp));\r\n salesReportsModel.folderLocation = cursor.getString(cursor.getColumnIndex(TableTransferModel.folderPath));\r\n salesReportsModel.status = cursor.getInt(cursor.getColumnIndex(TableTransferModel.status));\r\n salesReportsModel.progress = cursor.getInt(cursor.getColumnIndex(TableTransferModel.progress));\r\n salesReportsModel.rawData = cursor.getString(cursor.getColumnIndex(TableTransferModel.rawData));\r\n salesReportsModel.id = cursor.getLong(cursor.getColumnIndex(TableTransferModel.id));\r\n salesReportsModel.size = Long.parseLong(cursor.getString(cursor.getColumnIndex(TableTransferModel.size)));\r\n salesReportsModel.isIncoming = cursor.getInt(cursor.getColumnIndex(TableTransferModel.isIncoming)) == 0;\r\n arrayList.add(salesReportsModel);\r\n } while (cursor.moveToNext());\r\n }\r\n if (!cursor.isClosed()) {\r\n cursor.close();\r\n }\r\n return arrayList;\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getTransactions(int index) {\n return transactions_.get(index);\n }", "@GetMapping(\"/buy-types\")\n @Timed\n public ResponseEntity<List<BuyTypeDTO>> getAllBuyTypes(@RequestParam(required = false) String query, @ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of BuyTypes\");\n Page<BuyTypeDTO> page = buyTypeService.findAll(query,pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/buy-types\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "@GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );", "public static Response controllerGetTransactions(\n Account account,\n Token authorization\n ) {\n if (userOwnsAccount(account.accountId, authorization.userId) == null) {\n return new Response(\n 401,\n Router.AUTHENTICATION_ERROR,\n Response.ResponseType.TEXT\n );\n }\n try {\n ArrayList<Transaction> transactions = TransactionDatabase.retrieveTransactions(\n account.accountId\n );\n return new Response(200, transactions, Response.ResponseType.JSON);\n } catch (SQLException e) {\n return new Response(500, SQL_ERROR, Response.ResponseType.TEXT);\n }\n }", "@RequestMapping(value = {\"/\", \"/transactions\"})\n\tpublic String listAllTransactions(Model model) {\n\t\t\n\t\t// fetch one user and transactions for that user\n\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t.getAuthentication().getPrincipal();\n\t\tString username = user.getUsername();\n\t\tUser currentUser = userRepo.findByUsername(username);\n\t\tmodel.addAttribute(\"transactions\", traRepo.findByUser(currentUser));\n\t\t\n\t\tList<Transaction> traList = traRepo.findByUser(currentUser);\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < traList.size(); i++) {\n\t\t\tif(traList.get(i).getType().getName() == \"income\") {\n\t\t\t\tsum += traList.get(i).getAmount();\n\t\t\t}\n\t\t\tif(traList.get(i).getType().getName() == \"expense\") {\n\t\t\t\tsum -= traList.get(i).getAmount();\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tmodel.addAttribute(\"sum\", sum);\n\t\t\n\t\treturn \"transactions\";\n\t}", "Collection<Transaction> findAllByTransactiontype(int type, Sort sort);", "@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }", "List<TransactionRec> loadRecordsByAccount(BankAccount account);", "@GetMapping(\"/all\")\n public ResponseEntity<?> findAllData() {\n logger.info(\"Start controller call get All Data \");\n ServiceResult serviceResult = new ServiceResult();\n serviceResult.setMessage(\"Get All Data Success\");\n try {\n List<AdCampaign> lstAdCampaigns = adCampaignService.findAll();\n serviceResult.setData(lstAdCampaigns);\n serviceResult.setStatus(ServiceResult.Status.SUCCESS);\n }catch (Exception ex){\n logger.error(\"Error get All Data\");\n serviceResult.setMessage(\"Error\");\n serviceResult.setStatus(ServiceResult.Status.FAILED);\n }\n\n logger.info(\"End controller call get All Data \");\n return new ResponseEntity<ServiceResult>(serviceResult,new HttpHeaders(), HttpStatus.OK);\n }", "public List<TransactionType> listClientTransactionTypesByProduct(String product);", "public List<RequestorTransactionDto> findAllRequest() throws ServiceException {\r\n\t\tList<RequestorTransaction> list = requestorTransactionRepo.findAll();\r\n\t\tList<RequestorTransactionDto> listDto = new ArrayList<>();\r\n\t\tfor (RequestorTransaction requestorTransaction : list) {\r\n\t\t\tRequestorTransactionDto dto = new RequestorTransactionDto();\r\n\t\t\tdto.setCategoryId(requestorTransaction.getCategoryId());\r\n\t\t\tdto.setFundNeeded(requestorTransaction.getFundNeeded());\r\n\t\t\tdto.setCreatedDate(requestorTransaction.getCreatedDate());\r\n\t\t\tdto.setModifiedDate(requestorTransaction.getModifiedDate());\r\n\t\t\tdto.setActive(true);\r\n\t\t\tdto.setRequestedBy(requestorTransaction.getRequestedBy());\r\n\t\t\tdto.setId(requestorTransaction.getId());\r\n\t\t\tlistDto.add(dto);\r\n\r\n\t\t\tif (listDto.isEmpty()) {\r\n\t\t\t\tthrow new ServiceException(MessageConstant.FUND_REQUEST);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn listDto;\r\n\t}", "@Override\n\tpublic List<String> getAllTransactionType() {\n\t\treturn null;\n\t}", "List<TransportEntity> getAllEntityOfQuery();", "@JsonProperty(\"transaction\")\n public List<Transaction> getTransactionList() {\n return this.transactionList;\n }", "public List<Transaction> getTransactions() throws SQLException {\n\t\tList<Transaction> result = new ArrayList<>();\n\t\tStatement statement = conn.createStatement();\n\t\ttry (ResultSet resultSet = statement.executeQuery(\"select Date, Amount, Category, Type from transaction\")) {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tresult.add(new Transaction(resultSet.getDate(1), resultSet.getDouble(2), resultSet.getString(3), resultSet.getString(4)));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private static List<Transaction> toTransactions(AppBlock appBlock) {\n List<AppBlock.TransactionObject> transactionResults = appBlock.getBlock().getBody().getTransactions();\n List<Transaction> transactions = new ArrayList<Transaction>(transactionResults.size());\n for (AppBlock.TransactionObject transactionResult: transactionResults) {\n transactions.add((Transaction) transactionResult.get());\n }\n return transactions;\n }", "@Transactional\n\tpublic Set<TransactionTable> findAllTransactions() {\n\t\t List<TransactionTable> list = new ArrayList<TransactionTable>();\n\t TypedQuery<TransactionTable> query = entityManager.createNamedQuery(\"TransactionTable.findAll\", TransactionTable.class);\n\t list = query.getResultList();\n\t Set<TransactionTable> TransactionSet = new HashSet<TransactionTable>(list);\n\t return TransactionSet;\n\t\n\t}", "private void getTransactionListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "public static ObservableList<Product> getProductTransaction(int transactionId, TransactionType transactionType) {\r\n\t\tdbConnect();\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tObservableList<Product> products = FXCollections.observableArrayList();\r\n\t\tfinal String GET_PRODUCTS_OF_ID;\r\n\t\tif (transactionType == TransactionType.PURCHASE) {\r\n\t\t\tGET_PRODUCTS_OF_ID = \"SELECT * FROM product_transaction WHERE purchase_id = \" + transactionId;\r\n\t\t} else {\r\n\t\t\tGET_PRODUCTS_OF_ID = \"SELECT * FROM product_transaction WHERE sales_id = \" + transactionId;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(GET_PRODUCTS_OF_ID);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tProduct product = getProductViaId(rs.getInt(2));\r\n\t\t\t\tproduct.setSubQuantity(rs.getDouble(\"quantity\"));\r\n\t\t\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\t\t\tproduct.setSubTotal(rs.getDouble(\"quantity\") * product.getPriceForPurchase());\r\n\t\t\t\telse\r\n\t\t\t\t\tproduct.setSubTotal(rs.getDouble(\"quantity\") * product.getPriceForSales());\r\n\t\t\t\tproducts.add(product);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn products;\r\n\t}", "public Iterator getTransactions() {\n return (transactions.listIterator());\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "ResponseEntity<List<Type>> findTaskTypes();", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "public static void getUserTransactions(String id) {\n APICalls invocations = getRetrofitEngine().create(APICalls.class);\n Call<UserTransactionsDAO> call = invocations.getUserTransactions();\n call.enqueue(new retrofit2.Callback<UserTransactionsDAO>() {\n @Override\n public void onResponse(Call<UserTransactionsDAO> call, Response<UserTransactionsDAO> response) {\n BankCraftApplication.getInstance().getEventBus().post(new GetUserTransactionsResponseEvent(response.body()));\n }\n\n @Override\n public void onFailure(Call<UserTransactionsDAO> call, Throwable t) {\n BankCraftApplication.getInstance().getEventBus().post(new GetUserTransactionsResponseEvent(t.getMessage()));\n }\n });\n }", "@WithMockUser(username = \"employee\", roles = {\"EMPLOYEE\", \"CUSTOMERS\"})\n @Test\n void getTransactionsShouldReturnAJsonArray() throws Exception {\n when(transactionService.getAllTransactions(0, 100)).thenReturn(List.of(transaction));\n this.mvc.perform(\n get(\"/transactions\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(\n status().isOk());\n }", "@Override\n @Transactional(readOnly = true)\n public List<SintomaDTO> findAll() {\n log.debug(\"Request to get all Sintomas\");\n return sintomaRepository.findAll().stream()\n .map(sintomaMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "Object[] getPendingTransactions(int count);", "List<BusinessTransaction> query(String tenantId, BusinessTransactionCriteria criteria);", "public TransactionModel(Date startDate, Date endDate, CategoryRecord category,\n int sortMode) {\n\n //\n // Create the report transaction list\n //\n listData = new ArrayList<>(TransactionRecord.transactions.size());\n\n //\n // Build the report data using transactions within the specified date range\n // and sorted as specified by the sort mode. All categories will be included\n // if no category selection is supplied.\n //\n // Splits will be expanded into a separate transaction for each split\n //\n // Transactions without a category will not be included when sorting by\n // category\n //\n for (TransactionRecord t : TransactionRecord.transactions) {\n String name;\n int index = 0;\n boolean addTransaction = true;\n\n //\n // Process transactions within the specified date range\n // and for the specified category (if any)\n //\n Date date = t.getDate();\n if (date.compareTo(startDate) < 0 || date.compareTo(endDate) > 0)\n continue;\n \n List<TransactionSplit> splits = t.getSplits();\n if (splits == null && category != null && t.getCategory() != category)\n continue;\n\n //\n // Process the transaction\n //\n if (splits != null) {\n AccountRecord account = t.getAccount();\n name = t.getName();\n\n //\n // We will suppress the date field for all but the first expanded\n // transaction unless we are sorting by category, in which\n // case we need to always display the date since the expanded\n // transactions will not remain contiguous after being sorted\n //\n boolean expandedTransaction = false;\n\n //\n // Locate the insertion point for the new transactions\n //\n if (sortMode == SORT_BY_NAME) {\n for (TransactionRecord x : listData) {\n SecurityRecord s = x.getSecurity();\n if (s != null) {\n if (name.compareTo(s.getName()) < 0)\n break;\n } else {\n if (name.compareTo(x.getName()) < 0)\n break;\n }\n\n index++;\n }\n } else if (sortMode == SORT_BY_ACCOUNT) {\n for (TransactionRecord x : listData) {\n if (account.getName().compareTo(x.getAccount().getName()) < 0)\n break;\n\n index++;\n }\n } else if (sortMode == SORT_BY_DATE) {\n index = listData.size();\n }\n\n //\n // Create a temporary transaction for each split. We will skip a\n // split if we are sorting by category and the split doesn't have\n // a category or if the split category doesn't match the report\n // category (if any).\n //\n for (TransactionSplit split : splits) {\n CategoryRecord c = split.getCategory();\n if (sortMode == SORT_BY_CATEGORY && c == null)\n continue;\n \n if (category != null && c != category)\n continue;\n\n TransactionRecord x = new TransactionRecord(date, account);\n x.setName(name);\n x.setMemo(split.getDescription());\n x.setCategory(c);\n x.setTransferAccount(split.getAccount());\n x.setAmount(split.getAmount());\n x.setExpandedTransaction(expandedTransaction);\n\n if (sortMode != SORT_BY_CATEGORY)\n expandedTransaction = true;\n\n if (sortMode == SORT_BY_CATEGORY) {\n index = 0;\n addTransaction = true;\n for (TransactionRecord xx : listData) {\n if (c.getName().compareTo(xx.getCategory().getName()) < 0) {\n listData.add(index, x);\n addTransaction = false;\n break;\n }\n\n index++;\n }\n\n if (addTransaction)\n listData.add(x);\n } else {\n listData.add(index, x);\n index++;\n }\n }\n\n addTransaction = false;\n\n } else if (sortMode == SORT_BY_NAME) {\n\n //\n // Sort based on the transaction name\n //\n SecurityRecord s = t.getSecurity();\n if (s != null)\n name = s.getName();\n else\n name = t.getName();\n\n for (TransactionRecord x : listData) {\n s = x.getSecurity();\n if (s != null) {\n if (name.compareTo(s.getName()) < 0) {\n listData.add(index, t);\n addTransaction = false;\n break;\n }\n } else {\n if (name.compareTo(x.getName()) < 0) {\n listData.add(index, t);\n addTransaction = false;\n break;\n }\n }\n\n index++;\n }\n\n } else if (sortMode == SORT_BY_ACCOUNT) {\n\n //\n // Sort based on the transaction account\n //\n name = t.getAccount().getName();\n for (TransactionRecord x : listData) {\n if (name.compareTo(x.getAccount().getName()) < 0) {\n listData.add(index, t);\n addTransaction = false;\n break;\n }\n\n index++;\n }\n\n } else if (sortMode == SORT_BY_CATEGORY) {\n\n //\n // Sort based on the transaction category\n //\n CategoryRecord c = t.getCategory();\n if (c == null) {\n addTransaction = false;\n } else {\n name = c.getName();\n for (TransactionRecord x : listData) {\n if (name.compareTo(x.getCategory().getName()) < 0) {\n listData.add(index, t);\n addTransaction = false;\n break;\n }\n\n index++;\n }\n }\n }\n\n //\n // Add the transaction at the end of the list if we haven't inserted\n // it yet\n if (addTransaction)\n listData.add(t);\n }\n }", "@GetMapping(\"/payment-infos\")\n @Timed\n public List<PaymentInfoDTO> getAllPaymentInfos() {\n log.debug(\"REST request to get all PaymentInfos\");\n return paymentInfoService.findAll();\n }", "Page<TITransferDetails> findAll(Pageable pageable);", "@Transactional(readOnly = true)\n public List<ActivityEstimationDTO> findAll() {\n log.debug(\"Request to get all ActivityEstimations\");\n return activityEstimationRepository.findAll().stream()\n .map(activityEstimationMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@GetMapping(\"/rest/{id}\")\n\t\tpublic @ResponseBody Optional<Transaction> findTranscationRest(@PathVariable(\"id\") Long transactionId) {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(username);\n\t\t\tList<Transaction> transactions = traRepo.findByUser(currentUser);\n\t\t\tfor(int i = 0; i < transactions.size(); i++) {\n\t\t\t\tif(transactions.get(i).getId() == transactionId) {\n\t\t\t\t\ttransactionId = transactions.get(i).getId();\n\t\t\t\t\treturn traRepo.findById(transactionId);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\treturn Optional.empty();\n\t\t}", "@Override\n\tpublic List<BankTransaction> getAllTransactionsById(int account_id) throws BusinessException {\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tBankTransaction transaction = null;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactions where account_id=?\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\tpreparedStatement.setInt(1, account_id);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\ttransaction = new BankTransaction();\n\t\t\t\ttransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\ttransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\ttransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\ttransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\ttransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\t\n\t\t\t\tbankTransactionList.add(transaction);\n\n\t\t\t\t\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"No data for accounts\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new BusinessException(\"Some exception retrieving tha data has occurred in transactions\");\n\t\t}\n\t\treturn bankTransactionList;\n\t}", "public Map<LocalDate, Transactions> getTransactionsList(){\n return listOfTransactions;\n }", "@GetMapping(path = \"\")\n public ResponseEntity<?> getContractors(){\n logger.debug(\"Request to get all Contractors\");\n List<ContractorDTO> contractors = contractorService.getContractors().stream().map(this::convertToDTO).collect(Collectors.toList());\n if(contractors == null || contractors.size() < 1) throw new ResourceNotFoundException(\"Unable to find any Contractors\");\n return new ResponseEntity(contractors, HttpStatus.ACCEPTED);\n }", "@Transactional(readOnly = true)\n public List<Currency> findAll() {\n log.debug(\"Request to get all Currencies\");\n return currencyRepository.findAll();\n }", "ResponseEntity<List<GenericRates>> getGenericRates();", "@GetMapping(\"/buy-types/sell-contract-product\")\n @Timed\n public ResponseEntity<List<BuyTypeDTO>> getAllBuyTypesForSellContractProduct(@RequestParam(required = false, name = \"customerId\") Long customerId) {\n log.debug(\"REST request to get a page of BuyTypes\");\n List<BuyTypeDTO> list = buyTypeService.findAllForSellContractProduct(customerId);\n return new ResponseEntity<>(list, HttpStatus.OK);\n }", "ArrayList<String> getTransactions(String IBAN, Klant klant) throws SessionExpiredException, IllegalArgumentException, RemoteException;", "@java.lang.Override\n public java.util.List<com.google.protobuf.ByteString>\n getTransactionsList() {\n return transactions_;\n }", "@RequestMapping(value = \"/estados\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Estado> getAll() {\n log.debug(\"REST request to get all Estados\");\n return estadoRepository.findAll();\n }", "@GetMapping(\"/payments\")\n public List<Payment> getAllPayments() {\n log.debug(\"REST request to get all Payments\");\n return paymentRepository.findAll();\n }", "public List<TransferEventResponse> getTransferEvents(KlayTransactionReceipt.TransactionReceipt transactionReceipt) {\n List<SmartContract.EventValuesWithLog> valueList = extractEventParametersWithLog(TRANSFER_EVENT, transactionReceipt);\n ArrayList<TransferEventResponse> responses = new ArrayList<TransferEventResponse>(valueList.size());\n for (SmartContract.EventValuesWithLog eventValues : valueList) {\n TransferEventResponse typedResponse = new TransferEventResponse();\n typedResponse.log = eventValues.getLog();\n typedResponse.from = (String) eventValues.getIndexedValues().get(0).getValue();\n typedResponse.to = (String) eventValues.getIndexedValues().get(1).getValue();\n typedResponse.value = (BigInteger) eventValues.getNonIndexedValues().get(0).getValue();\n responses.add(typedResponse);\n }\n return responses;\n }" ]
[ "0.67073286", "0.66176033", "0.6542548", "0.6410861", "0.6388323", "0.636887", "0.63390815", "0.6303972", "0.6288421", "0.6262967", "0.6241935", "0.6240533", "0.62192833", "0.61758226", "0.61365575", "0.6124728", "0.6107017", "0.60562027", "0.60506725", "0.59482104", "0.593619", "0.59244335", "0.5919506", "0.5889959", "0.58878696", "0.58812594", "0.5866433", "0.5861991", "0.5861335", "0.5807928", "0.57911646", "0.57902396", "0.57867426", "0.57441676", "0.57390416", "0.5728924", "0.571093", "0.5702201", "0.5688834", "0.5665262", "0.56628066", "0.56605446", "0.5654776", "0.5650735", "0.56431246", "0.5625391", "0.5600824", "0.5599612", "0.5598297", "0.5596397", "0.55744046", "0.5565229", "0.55647594", "0.5564614", "0.5562639", "0.5561466", "0.5551413", "0.55446386", "0.5534093", "0.5530957", "0.5525579", "0.55216867", "0.5512384", "0.55057627", "0.5483861", "0.54823744", "0.5474127", "0.54704094", "0.54679304", "0.545991", "0.5446239", "0.5438468", "0.5430154", "0.5424916", "0.5406246", "0.5403809", "0.5403631", "0.54022354", "0.54021233", "0.5376259", "0.53740394", "0.536443", "0.53531384", "0.5342728", "0.5335633", "0.53327554", "0.53311616", "0.53277946", "0.53255856", "0.5322946", "0.5318354", "0.5310006", "0.53035355", "0.5294484", "0.52818364", "0.5275826", "0.5274404", "0.52686566", "0.52624184", "0.5262349" ]
0.6879939
0
This method is responsible to get all the total amount by transactionType from backend data stream/API and provide the result to the controller layer
public Double getTotalAmountbyTransactionType(String transactionType) throws JsonProcessingException, IOException { logger.info("Logger Name: getTotalAmountbyTransactionType() :: " + logger.getName()); logger.debug("Transaction Type : getTotalAmountbyTransactionType() :: " + transactionType); ObjectMapper mapper = new ObjectMapper(); Double totalAmount = 0.00; logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); /* Traversing Nested JSON node to get/add the total amount */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { JsonNode details = transactionsNode.path("details"); /* When transactionType is null or empty */ if (transactionType == null && details.path("type").isNull() == true) { JsonNode value = details.path("value"); Double tempAmount = value.path("amount").asDouble(); totalAmount = totalAmount + tempAmount; } /* When transactionType is not null or empty */ else if (transactionType != null) { if ((details.path("type").asText()).equalsIgnoreCase(transactionType.trim())) { JsonNode value = details.path("value"); Double tempAmount = value.path("amount").asDouble(); totalAmount = totalAmount + tempAmount; } } } } catch (Exception e) { logger.error("Exception : getTotalAmountbyTransactionType() :: ", e); } logger.info("Response from Service layer :: Total Amount: getTotalAmountbyTransactionType() :: " + totalAmount); return totalAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/total-sum\")\n\tpublic Double getTotalTransactionsSumByType(@RequestParam String type) {\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumByType(type);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}", "public List<HCLFieldTransaction> getTransactionbyType(String transactionType)\r\n\t\t\tthrows JsonProcessingException, IOException {\r\n\r\n\t\tlogger.info(\"Logger Name: getTransactionbyType() :: \" + logger.getName());\r\n\t\tlogger.debug(\"Transaction Type : getTransactionbyType() :: \" + transactionType);\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\r\n\t\t\t\t/* When transactionType is null or empty */\r\n\t\t\t\tif (transactionType == null && details.path(\"type\").isNull() == true) {\r\n\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* When transactionType is not null or empty */\r\n\t\t\t\telse if (transactionType != null) {\r\n\r\n\t\t\t\t\tif (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) {\r\n\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Type :: \" + transactionType);\r\n\t\t\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t\t\t/* Adding specific type of transaction list into one ArrayList */\r\n\t\t\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getTransactionbyType() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\"Return value from service layer:: getTransactionbyType() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\r\n\t}", "List<Number> getTransactionAmounts(final StatisticalDTO dto);", "public List<HCLFieldTransaction> getAllTransactionListService()\r\n\t\t\tthrows JsonProcessingException, MalformedURLException, IOException {\r\n\t\tlogger.info(\"Logger Name: getAllTransactionListService() :: \" + logger.getName());\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Bank API URL :: getTotalAmountbyTransactionType() :: \"\r\n\t\t\t\t+ TransactionConstant.THIRD_PARTY_REST_API);\r\n\t\tJsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API));\r\n\r\n\t\tList<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>();\r\n\r\n\t\t/* Traversing Nested JSON node to publish the relevant data */\r\n\t\ttry {\r\n\t\t\tJsonNode transactionsNodes = root.path(\"transactions\");\r\n\r\n\t\t\tfor (JsonNode transactionsNode : transactionsNodes) {\r\n\r\n\t\t\t\tHCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction();\r\n\t\t\t\thclFieldTransaction.setId(transactionsNode.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode thisAccount_Node = transactionsNode.path(\"this_account\");\r\n\t\t\t\thclFieldTransaction.setAccountId(thisAccount_Node.path(\"id\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_Node = transactionsNode.path(\"other_account\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path(\"number\").asText());\r\n\r\n\t\t\t\tJsonNode otherAccount_holder_Node = otherAccount_Node.path(\"holder\");\r\n\t\t\t\thclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path(\"name\").asText());\r\n\t\t\t\tJsonNode metadata = otherAccount_Node.path(\"metadata\");\r\n\t\t\t\thclFieldTransaction.setCounterPartyLogoPath(metadata.path(\"open_corporates_URL\").asText());\r\n\r\n\t\t\t\tJsonNode details = transactionsNode.path(\"details\");\r\n\t\t\t\thclFieldTransaction.setTransactionType(details.path(\"type\").asText());\r\n\t\t\t\thclFieldTransaction.setDescription(details.path(\"description\").asText());\r\n\r\n\t\t\t\tJsonNode value = details.path(\"value\");\r\n\t\t\t\thclFieldTransaction.setInstructedAmount(value.path(\"amount\").asDouble());\r\n\r\n\t\t\t\thclFieldTransaction.setInstructedCurrency(value.path(\"currency\").asText());\r\n\r\n\t\t\t\thclFieldTransaction.setTransactionAmount(value.path(\"amount\").asDouble());\r\n\t\t\t\thclFieldTransaction.setTransactionCurrency(value.path(\"currency\").asText());\r\n\t\t\t\tlogger.debug(\"Transaction Field Row Value:: \" + hclFieldTransaction.toString());\r\n\r\n\t\t\t\t/* Adding all transaction list into one ArrayList */\r\n\t\t\t\ttransactionList.add(hclFieldTransaction);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception : getAllTransactionListService() :: \", e);\r\n\t\t}\r\n\t\tlogger.info(\r\n\t\t\t\t\"Return value from service layer :: getAllTransactionListService() :: \" + transactionList.toString());\r\n\t\treturn transactionList;\r\n\t}", "BigDecimal getSumOfTransactions(StatisticalDTO dto) throws DaoException;", "BigDecimal getSumOfTransactionsRest(TransferQuery query);", "List<TypeSumDto> somaValoresPorTipo(TransactionType transactionType, Integer mes);", "public TransactionResponse processAllTransaction() throws ParseException {\n TransactionResponse response = new TransactionResponse();\n\n //User0\n response.setTransaction(new Transaction(\"user0\",\"0001\", \"type0\",\"user0_Billing\",\"user0_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-00\")));\n\n //User1\n response.setTransaction(new Transaction(\"user1\", \"0101\",\"type0\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user1\", \"0102\", \"type1\",\"user1_Billing\", \"user1_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-00\")));\n\n //User2\n response.setTransaction(new Transaction(\"user2\", \"0201\", \"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-01-00\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0202\", \"type2\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n response.setTransaction(new Transaction(\"user2\", \"0203\",\"type1\",\"user2_Billing\", \"user2_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n //User3\n response.setTransaction(new Transaction(\"user3\", \"0301\",\"type0\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-02-02\")));\n\n response.setTransaction(new Transaction(\"user3\", \"0302\",\"type1\",\"user3_Billing\", \"user3_Sub\",\n new SimpleDateFormat(\"yyyy-mm-dd-hh\").parse(\"2020-01-03-01\")));\n\n return response;\n }", "public int getTotalAmount();", "@Override\n public VipCardReport getTotal(ReportSearchFilter filter) throws CoreServiceException{\n ServiceHelper.checkSearchFilter(filter, true);\n try {\n return mapper.getTotal(filter);\n } catch (Exception ex) {\n throw new CorePersistenceException(\"Error occurred while accessing the persistence.\", ex);\n }\n }", "public JSONObject getInvoiceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n /**\n * Get Invoice total sum\n */\n String companyId=reqParams.optString(\"companyid\");\n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = accEntityGstDao.getInvoiceDataWithDetailsInSql(reqParams);\n reqParams.remove(\"isb2cs\"); // remove to avoid CN index while fetching data\n double taxableAmountInv = 0d;\n double totalAmountInv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n String term = data[1]!=null?data[1].toString():\"\";\n double termamount = data[0]!=null?(Double) data[0]:0;\n count = data[4]!=null?((BigInteger) data[4]).intValue():0;\n totalAmountInv = data[3]!=null?(Double) data[3]:0;\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n IGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n CGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if(StringUtil.isNullOrEmpty(term)){\n taxableAmountInv += data[2]!=null?(Double) data[2]:0;\n }\n }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv, companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n } else {\n jSONObject = accGSTReportService.getSalesInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "TotalInvoiceAmountType getTotalInvoiceAmount();", "@GetMapping(\"/total-sum-between-dates\")\n\tpublic Double getTotalTransactionsSumBetweenDatesByType(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate) \n\t{\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumBetweenDatesByType(type, startDate, endDate);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}", "public int getAmount()\n {\n return this.transactionValue;\n }", "@GetMapping(value = \"/memTotal\")\n public ResponseEntity<Long> memTotal(){\n try {\n String s = CommandExecutor.execute(Commands.mem);\n s = findLine(s, \"MemTotal\");\n s = filterForNumbers(s);\n Long memTotal = Long.parseLong(s)/1_000_000;\n return ResponseEntity.ok(memTotal);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ResponseEntity.status(500).build();\n }", "frame.socket.common.proto.Login.ActAmount getActAmount(int index);", "public long getAmount();", "public long getAmount();", "public long countAllDepositTransactions() throws MiddlewareQueryException;", "java.util.List<cosmos.base.v1beta1.Coin> \n getTotalDepositList();", "long getAmount();", "@Override\n\tpublic List<ProfitResult> profitStatistic(Request staticRequest) {\n\t\tList<ProfitResult> result = new ArrayList<>();\n\t\tMap<String, int[]> buySellMap = new TreeMap<String, int[]>();\n\t\tIterator<Map.Entry<String, Map<LocalDate, List <Transaction>>>> iterator = this.result.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, Map<LocalDate, List <Transaction>>> entry = iterator.next();\n\t\t\tIterator<Map.Entry<LocalDate, List <Transaction>>> iterator2 = entry.getValue().entrySet().iterator();\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry<LocalDate, List <Transaction>> entry2 = iterator2.next();\n\t\t\t\tfor (Transaction Tra : entry2.getValue()) {\n\t\t\t\t\tint buySellAmount [] = new int [] {0,0};\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.BUY)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1];\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[0] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*1.005d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( Tra.getMode().equals(TransactionMode.SELL)) {\n\t\t\t\t\t\tif (buySellMap.containsKey(Tra.getCurrencyCode())) {\n\t\t\t\t\t\t\tbuySellAmount[0] = buySellMap.get(Tra.getCurrencyCode())[0];\n\t\t\t\t\t\t\tbuySellAmount[1] = buySellMap.get(Tra.getCurrencyCode())[1] + (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbuySellAmount[1] = (int)(Tra.getAmount()*this.currencyMap.get(entry2.getKey()).get(Tra.getCurrencyCode())*0.995d);\n\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbuySellMap.put(Tra.getCurrencyCode(), buySellAmount);\n\n\t\t\t\t\t}\n\t\t\t\tIterator<Map.Entry<String, int []>> iterator3 = buySellMap.entrySet().iterator();\n\t\t\t\twhile (iterator3.hasNext()) {\n\t\t\t\t\tMap.Entry<String, int []> entry3 = iterator3.next();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tresult.add(new ProfitResult(entry3.getValue()[0], entry3.getValue()[1], entry2.getKey(), entry.getKey(), entry3.getKey()));\n\t\t\t\t}\n\t\t\t\tbuySellMap.clear();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\n\t}", "@Override\n public Iterable<AccountAmount> extractNonFeeTransfers(AccountID payerAccountId, TransactionBody body,\n TransactionRecord transactionRecord) {\n LinkedList<AccountAmount> result = new LinkedList<>();\n if (body.hasCryptoTransfer()) {\n for (var accountAmount : body.getCryptoTransfer().getTransfers().getAccountAmountsList()) {\n result.add(accountAmount);\n }\n } else if (body.hasCryptoCreateAccount()) {\n var amount = body.getCryptoCreateAccount().getInitialBalance();\n result.add(AccountAmount.newBuilder().setAccountID(payerAccountId).setAmount(0 - amount).build());\n if (ResponseCodeEnum.SUCCESS == transactionRecord.getReceipt().getStatus()) {\n var newAccountId = transactionRecord.getReceipt().getAccountID();\n result.add(AccountAmount.newBuilder().setAccountID(newAccountId).setAmount(amount).build());\n }\n } else if (body.hasContractCreateInstance()) {\n var amount = body.getContractCreateInstance().getInitialBalance();\n result.add(AccountAmount.newBuilder().setAccountID(payerAccountId).setAmount(0 - amount).build());\n if (ResponseCodeEnum.SUCCESS == transactionRecord.getReceipt().getStatus()) {\n var contractAccountId = contractIdToAccountId(transactionRecord.getReceipt().getContractID());\n result.add(AccountAmount.newBuilder().setAccountID(contractAccountId).setAmount(amount).build());\n }\n } else if (body.hasContractCall()) {\n var amount = body.getContractCall().getAmount();\n var contractAccountId = contractIdToAccountId(body.getContractCall().getContractID());\n result.add(AccountAmount.newBuilder().setAccountID(contractAccountId).setAmount(amount).build());\n result.add(AccountAmount.newBuilder().setAccountID(payerAccountId).setAmount(0 - amount).build());\n }\n return result;\n }", "float getAmount();", "@Override\r\n\tpublic List<InformationDTO> findSum() {\n\t\treturn sqlSessionTemplate.selectList(typeNameSpace + \".findSum\");\r\n\t}", "private double getIncomeAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 1)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }", "int getAmount();", "int getDataAmount() {\n return dataAmount;\n }", "@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}", "long getAmountPage();", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "@Override\n\tpublic List<PendingTransaction> getAllTransactionsByType(String transactionType) {\n\t\treturn null;\n\t}", "public double Get_Total(Context context){\n return ((double) (TrafficStats.getTotalRxBytes()+TrafficStats.getTotalTxBytes())/1048576);\n }", "@PostMapping(\"/tlb-trade/getAll\")\n @Timed\n public ResponseEntity<ResponseResult> getAll() {\n log.debug(\"REST request to get a page of TlbTrades\");\n List<TlbTradeDTO> tlbTradeDTOList = tlbTradeService.findAll();\n ResponseResult json = new ResponseResult();\n json.setData(tlbTradeDTOList);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, HttpStatus.OK);\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "@RequestMapping(value = {\"/\", \"/transactions\"})\n\tpublic String listAllTransactions(Model model) {\n\t\t\n\t\t// fetch one user and transactions for that user\n\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t.getAuthentication().getPrincipal();\n\t\tString username = user.getUsername();\n\t\tUser currentUser = userRepo.findByUsername(username);\n\t\tmodel.addAttribute(\"transactions\", traRepo.findByUser(currentUser));\n\t\t\n\t\tList<Transaction> traList = traRepo.findByUser(currentUser);\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < traList.size(); i++) {\n\t\t\tif(traList.get(i).getType().getName() == \"income\") {\n\t\t\t\tsum += traList.get(i).getAmount();\n\t\t\t}\n\t\t\tif(traList.get(i).getType().getName() == \"expense\") {\n\t\t\t\tsum -= traList.get(i).getAmount();\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tmodel.addAttribute(\"sum\", sum);\n\t\t\n\t\treturn \"transactions\";\n\t}", "cosmos.base.v1beta1.Coin getTotalDeposit(int index);", "public JSONObject getGoodsReceiptForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n reqParams.put(\"entitycolnum\", reqParams.optString(\"goodsreceiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"goodsreceiptentityValue\"));\n JSONObject jSONObject = new JSONObject();\n List<Object> invoiceData = gstr2Dao.getInvoiceDataWithDetailsInSql(reqParams);\n String companyId = reqParams.optString(\"companyid\");\n double taxableAmountInv = 0d;\n double totalAmountInv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n int count=0;\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : invoiceData) {\n Object[] data = (Object[]) object;\n String term = data[1] != null ? data[1].toString() : \"\";\n double termamount = data[0] != null ? (Double) data[0] : 0;\n totalAmountInv = data[3] != null ? (Double) data[3] : 0;\n count = data[4] != null ? ((BigInteger) data[4]).intValue() : 0;\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputIGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputCGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputSGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputUTGST\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"InputCESS\").toString()) || term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if (StringUtil.isNullOrEmpty(term)) {\n taxableAmountInv += data[2] != null ? (Double) data[2] : 0;\n }\n }\n jSONObject.put(\"count\", count);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountInv, companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount, companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount, companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount, companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount, companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount + CGSTAmount + SGSTAmount + CESSAmount, companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountInv + IGSTAmount + CGSTAmount + SGSTAmount + CESSAmount, companyId));\n } else {\n jSONObject = accGSTReportService.getPurchaseInvoiceJSONArrayForGSTR3B(invoiceData, reqParams, companyId);\n }\n return jSONObject;\n }", "public Amount getAmountTotal() {\n return this.amountTotal;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() { return this.amount; }", "@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}", "public double getAmount() { return amount; }", "@Override\n public String getTotalSavings() {\n\n setLogString(\"Get total Savings Amount\", true, CustomLogLevel.HIGH);\n final String savingsValue = getElement(getDriver(), By.className(SAVINGS_DOLLARS),\n TINY_TIMEOUT).getText();\n setLogString(\"Total Savings :\" + savingsValue, true, CustomLogLevel.LOW);\n return savingsValue;\n }", "public List<Transaction> getAllDepositTransactions(int start, int numOfRows) throws MiddlewareQueryException;", "Long getAmount(Integer id) throws Exception;", "public Amount getAmount() {\n return amount;\n }", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public long getAmount() {\r\n return amount;\r\n }", "public long countAllWithdrawalTransactions() throws MiddlewareQueryException;", "public long getAmount() {\n return amount;\n }", "@RequestMapping(value = \"/contracts/types\", method = RequestMethod.GET)\n public JsonListWrapper<String> listAllTypes() {\n Collection<String> items = ((ContractService) service).findAllInsuranceTypes();\n return JsonListWrapper.withTotal(items);\n }", "public io.lightcone.data.types.AmountOrBuilder getAmountOrBuilder() {\n return getAmount();\n }", "java.util.List<frame.socket.common.proto.Login.ActAmount> \n getActAmountList();", "public Cursor getAmountDetails(long accountId) {\n\t\t\tString sql = \"SELECT KEY_ID, KEY_DATE, KEY_VALUE, \"\n\t\t\t\t\t+ \" (CASE WHEN KEY_VALUE < 0 THEN ? ELSE ? END) as KEY_TYPE\"\n\t\t\t\t\t+ \" FROM \"\n\t\t\t\t\t+ T_Transaction.TABLE_NAME\n\t\t\t\t\t+ \" WHERE KEY_ACCOUNT_ID=KEY_ACOUNT_ID_VALUE\"\n\t\t\t\t\t+ \" UNION ALL \"\n\t\t\t\t\t+ \" SELECT t2.KEY_ID, t2.KEY_DATE, t2.KEY_VALUE, \"\n\t\t\t\t\t+ \" (CASE WHEN t2.KEY_VALUE < 0 THEN ? ELSE ? END) as KEY_TYPE\"\n\t\t\t\t\t+ \" FROM \"\n\t\t\t\t\t+ T_Details.TABLE_NAME\n\t\t\t\t\t+ \" t2 JOIN \"\n\t\t\t\t\t+ T_Transaction.TABLE_NAME\n\t\t\t\t\t+ \" t1 ON t2.KEY_TRANSACTION_ID = t1.KEY_ID AND t1.KEY_ACCOUNT_ID = KEY_ACOUNT_ID_VALUE\"\n\t\t\t\t\t+ \" UNION ALL\"\n\t\t\t\t\t+ \" SELECT KEY_ID, KEY_DATE, KEY_VALUE, KEY_TYPE FROM \"\n\t\t\t\t\t+ T_Amount.TABLE_NAME\n\t\t\t\t\t+ \" WHERE KEY_ACCOUNT_ID=KEY_ACOUNT_ID_VALUE ORDER BY \"\n\t\t\t\t\t+ KEY_DATE;\n\n\t\t\tsql = sql\n\t\t\t\t\t.replace(\"KEY_DATE\", KEY_DATE)\n\t\t\t\t\t.replace(\"KEY_ID\", KEY_ID)\n\t\t\t\t\t.replace(\"KEY_TYPE\", KEY_TYPE)\n\t\t\t\t\t.replace(\"KEY_ACCOUNT_ID\", T_Transaction.KEY_ACCOUNT_ID)\n\t\t\t\t\t.replace(\"KEY_ACOUNT_ID_VALUE\", String.valueOf(accountId))\n\t\t\t\t\t.replace(\"KEY_TRANSACTION_ID\", T_Details.KEY_TRANSACTION_ID)\n\t\t\t\t\t.replace(\"KEY_VALUE\", KEY_VALUE);\n\n\t\t\tLogUtil.d(\"Getting amount details\\n\" + sql);\n\t\t\treturn db.rawQuery(\n\t\t\t\t\tsql,\n\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\tString.valueOf(AmountType.TO_SHARES.ordinal()),\n\t\t\t\t\t\t\tString.valueOf(AmountType.FROM_SHARES.ordinal()),\n\t\t\t\t\t\t\tString.valueOf(AmountType.TO_SHARES.ordinal()),\n\t\t\t\t\t\t\tString.valueOf(AmountType.FROM_SHARES.ordinal()) });\n\t\t}", "@GetMapping(\"/rent\")\n public ResultEntity<List<ItemDTO>> getAllRent()\n {\n\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Rent\");\n }", "public double getAmount() {\n return amount;\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "@Override\n\tpublic List<BankTransaction> getAllTransactions() throws BusinessException {\n\t\tBankTransaction bankTransaction = null;\n\t\tList<BankTransaction> bankTransactionList = new ArrayList<>();\n\t\tConnection connection;\n\n\t\ttry {\n\t\t\tconnection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select transaction_id, account_id, transaction_type, amount, transaction_date from dutybank.transactionss\";\n\t\t\t\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tbankTransaction = new BankTransaction();\n\t\t\t\tbankTransaction.setTransactionid(resultSet.getInt(\"transaction_id\"));\n\t\t\t\tbankTransaction.setAccountid(resultSet.getInt(\"account_id\"));\n\t\t\t\tbankTransaction.setTransactiontype(resultSet.getString(\"transaction_type\"));\n\t\t\t\tbankTransaction.setTransactionamount(resultSet.getDouble(\"amount\"));\n\t\t\t\tbankTransaction.setTransactiondate(resultSet.getDate(\"transaction_date\"));\n\n\t\t\t\tbankTransactionList.add(bankTransaction);\n\t\t\t} \n\t\t\t\n\t\t\tif (bankTransactionList.size() == 0) {\n\t\t\t\tthrow new BusinessException(\"There is not data to retrieve\");\n\t\t\t}\n\t\t\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Some Error ocurred retrieving data for transactions\");\n\t\t}\n\t\t\n\t\treturn bankTransactionList;\n\t}", "public List viewTotalInscritosBD();", "public int getTotal() {\r\n\r\n\t\treturn getAmount() + getPrice();\r\n\r\n\t}", "@Override\n\tpublic BigDecimal getSumActualInComeAmount(Map<String, Object> params)\n\t\t\tthrows ServiceException {\n\t\treturn cashTransactionDtlMapper.getSumActualInComeAmount(params);\n\t}", "public long getTotalAmountUploaded();", "private double getExpenditureAmount(long startTimestamp, long endTimestamp) {\n Points p = getTransactions(startTimestamp, endTimestamp);\n if (p.x == -1 && p.y == -1)\n return 0;\n double total = 0;\n for (int i = p.x; i <= p.y; i++) {\n if (transactionList.get(i).transactionType == 0)\n total += transactionList.get(i).transactionAmount;\n }\n return total;\n }", "@GetMapping(\"/sale\")\n public ResultEntity<List<ItemDTO>> getAllSale()\n {\n return itemService.getItemsBySubCategory(ConstantUtil.TYPE_SALE_RENT,\"Sale\");\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount_;\n }", "public long getTotal() { return total; }", "public long getTotal() { return total; }", "@Override\r\n\t@Transactional\r\n\tpublic Integer TotalEventuales(int tipo, int estado) {\n\t\treturn dao.TotalEventuales(tipo, estado);\r\n\t}", "public long getAmountRequested();", "@Test\n public void getTransactionsByType() throws Exception {\n String expectedFile = \"src/test/resources/expected-transactions.json\";\n List<Transaction> expectedTransactions = Arrays.asList(new ObjectMapper()\n .readValue(JsonUtils.readFileAsString(expectedFile), Transaction[].class));\n List<Transaction> actualTransactions = openBankTransactionsService.getTransactionsByType(TEST_TRANSACTION_TYPE);\n assertEquals(expectedTransactions, actualTransactions);\n }", "@Override\n public JSONObject dataBody() {\n\n JSONObject transactionAmount = new JSONObject();\n transactionAmount.put(\"value\", this.transactionAmount);\n transactionAmount.put(\"currency\", this.currency);\n\n JSONObject userInfo = new JSONObject();\n userInfo.put(\"custId\", this.customerId);\n\n JSONObject body = new JSONObject();\n body.put(\"requestType\", \"NATIVE_SUBSCRIPTION\");\n body.put(\"mid\", this.getMerchantId());\n body.put(\"websiteName\", \"WEBSTAGING\");\n body.put(\"orderId\", this.getOrderId());\n body.put(\"subscriptionPaymentMode\", this.subscriptionPaymentMode);\n body.put(\"subscriptionAmountType\", this.subscriptionAmountType);\n body.put(\"subscriptionMaxAmount\", this.subscriptionMaxAmount);\n body.put(\"subscriptionFrequency\", this.subscriptionFrequency);\n body.put(\"subscriptionFrequencyUnit\", this.subscriptionFrequencyUnit);\n body.put(\"subscriptionStartDate\", this.subscriptionStartDate);\n body.put(\"subscriptionExpiryDate\", this.subscriptionExpiryDate);\n body.put(\"subscriptionGraceDays\", this.subscriptionGraceDays);\n body.put(\"subscriptionEnableRetry\", this.subscriptionEnableRetry);\n body.put(\"subscriptionRetryCount\", this.subscriptionRetryCount);\n body.put(\"paytmSsoToken\", \"\");\n body.put(\"callbackUrl\", this.subscriptionCallbackURL);\n body.put(\"userInfo\", userInfo);\n body.put(\"txnAmount\", transactionAmount);\n\n return body;\n }", "public double getTotalPayments(){return this.total;}", "public int getTotal() {\n return total;\n }", "@Override\r\n\t@Transactional(\"transactionManager\")\r\n\tpublic Map getAllTransactionsForConsumer(Consumer consumer,String status,int start,int size,String fromDateParm,String toDateParm,String onDateParm,int transactionId,double startAmount,double endAmount,String merchantOrderId,String organizationName,String sort,String order)\r\n\t{\r\n\r\n\t\tMap<String,Object> Response = new HashMap<String,Object>();\r\n\t\tMap<String,Object> parm = new HashMap<String,Object>();\r\n\t\tMerchant merchant =null;\r\n\t\tDate fromDate=null;\r\n\t\tDate toDate=null;\r\n\t\tDate onDate=null;\r\n\t\t\r\n\t\tif(transactionId!=-1)\r\n\t\t\tparm.put(\"transactionId\", transactionId);\t\r\n\t\telse if(!merchantOrderId.equals(\"\"))\r\n\t\t{\r\n\t\t\tparm.put(\"merchantOrderId\", merchantOrderId);\r\n\t\t\tstart=0;\r\n\t\t\tsize=1;\r\n\t\t}else\r\n\t\t{\r\n\t\t\tif(!status.equals(\"\")) // Check only valid success states\r\n\t\t\t\tparm.put(\"status\", status);\r\n\t\t\tif(!sort.equals(\"\"))\r\n\t\t\t\tparm.put(\"sort\", sort);\r\n\t\t\tif(!order.equals(\"\"))\r\n\t\t\t\tparm.put(\"order\", order);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tif(!fromDateParm.equals(\"\"))\r\n\t\t\t\t\tfromDate = df.parse(fromDateParm);\r\n\r\n\t\t\t\tif(!toDateParm.equals(\"\"))\r\n\t\t\t\t\ttoDate = df.parse(toDateParm);\r\n\r\n\t\t\t\tif(!onDateParm.equals(\"\"))\r\n\t\t\t\t\tonDate = df.parse(onDateParm);\r\n\r\n\t\t\t}catch(IllegalArgumentException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}catch(ParseException ex)\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomValidationException(ErrorConstants.INVALID_DATE, ErrorConstants.STR_INVALID_DATE); \r\n\t\t\t}\r\n\r\n\t\t\tif(onDate!=null)\r\n\t\t\t{\r\n\t\t\t\tparm.put(\"onDate\", onDate);\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tif(fromDate!=null)\r\n\t\t\t\t\tparm.put(\"fromDate\", fromDate);\r\n\t\t\t\tif(toDate!=null)\r\n\t\t\t\t\tparm.put(\"toDate\", toDate);\r\n\t\t\t}\r\n\r\n\t\t\tif(startAmount != -1)\r\n\t\t\t\tparm.put(\"startAmount\", startAmount);\r\n\t\t\tif(endAmount != -1)\r\n\t\t\t\tparm.put(\"endAmount\", endAmount);\r\n\t\t\tif(!organizationName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tmerchant = userDao.getMerchantByOrganizationName(organizationName);\r\n\t\t\t\tif(merchant==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\t\t\treturn temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tResultSetSize resultSetSize = new ResultSetSize();\r\n\t\tMap<String,Object> array[]=null;\r\n\t\tArrayList<Transactions> transactions=this.orderDao.getTransactions(merchant,consumer, parm,start,size,resultSetSize);\r\n\r\n\t\tif(transactions.size()==0)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\ttemp.put(\"Message\", \"No results found ! \");\r\n\t\t\ttemp.put(\"Transactions\", null);\r\n\t\t\treturn temp;\r\n\t\t}\r\n\t\tarray = new Map[transactions.size()];\r\n\t\tint i;\r\n\t\tfor(i=0;i<transactions.size();i++)\r\n\t\t{\r\n\t\t\tMap<String,Object> temp = new HashMap<String,Object>();\r\n\t\t\tTransactions trans= transactions.get(i);\r\n\t\t\ttemp.put(\"transaction_id\", trans.getTransaction_id());\r\n\t\t\ttemp.put(\"merchant_order_id\", trans.getMerchant_order_id());\r\n\t\t\ttemp.put(\"status\", trans.getStatus());\r\n\t\t\ttemp.put(\"amount\", trans.getTransaction_amount());\r\n\t\t\ttemp.put(\"date\",trans.getMerchant_activity_time().toString());\r\n\t\t\tarray[i]=temp;\r\n\t\t}\r\n\r\n\t\tif(resultSetSize.getRowCount()!=0){\r\n\t\t\tResponse.put(\"resultSetSize\", resultSetSize);\r\n\t\t}\r\n\t\t\r\n\t\tResponse.put(\"Transactions\", array);\r\n\t\t\r\n\t\treturn Response;\r\n\t}", "int getAmountEntriesListTariffActiveStatus(String tariffType) throws ServiceException;", "@Override\n\tpublic ResultSet transactionBody(String type, int id, int value, int householdNum) {\n\t\t\n\t\tSystem.out.println(\"Transaction Body 1\");\n\t\t\n\t\treturn queryTable(type);\n\t\t\n\t}", "public Double getAmount() {\r\n return amount;\r\n }", "public void loadTransactions() {\n try {\n new GetRecents().execute().get();//first we get the transactions from the database\n for (final TransactionModel model : Alltransactions) {\n final View cardView = getLayoutInflater().inflate(R.layout.transaction_card, null, false);\n ImageView transaction_logo = cardView.findViewById(R.id.transaction_type_img);\n if (model.getType() == TransactionModel.typeTransaction.SEND) {//if send then add the logo of send\n transaction_logo.setImageResource(R.drawable.send);\n transaction_logo.setColorFilter(getResources().getColor(R.color.green));\n } else transaction_logo.setImageResource(R.drawable.receive);\n\n TextView crypto_amount = cardView.findViewById(R.id.transaction_amount_value);\n model.setAmount_crypto(model.getAmount_crypto().setScale(10, BigDecimal.ROUND_DOWN));//change the scale of the crypto amount\n DecimalFormat df = new DecimalFormat();\n df.setMaximumFractionDigits(10);\n df.setMinimumFractionDigits(5);\n df.setGroupingUsed(false);\n\n String result = df.format(model.getAmount_crypto());//format the amount\n crypto_amount.setText(result);\n TextView crypto_Type = cardView.findViewById(R.id.transaction_type);\n crypto_Type.setText(model.getType_symbol());//put the symbol\n TextView usd_amount = cardView.findViewById(R.id.transaction_amount_usd);\n NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(new Locale(\"en\", \"US\"));\n usd_amount.setText(\"US\" + defaultFormat.format(model.getAmount_us()));\n TextView dateTransac = cardView.findViewById(R.id.transaction_date);\n Date date = model.getDate();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String strDate = dateFormat.format(date);//format the date to the chosen format\n String[] dateTime = strDate.split(\" \");\n dateTransac.setText(dateTime[0]);//put the date\n TextView timeTransac = cardView.findViewById(R.id.transaction_time);\n timeTransac.setText(dateTime[1]);//put the time\n\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n TransactionBottomSheet bottomSheet = new TransactionBottomSheet(model.getWallet_addr_sender(), model.getWallet_addr_receiver());\n bottomSheet.show(getFragmentManager(), \"transactionSheet\");\n }\n });\n transactionsView.addView(cardView);//add the card\n }\n\n } catch (Exception e) {\n Log.v(\"ExceptionLoad\", Arrays.toString(e.getStackTrace()));\n }\n }", "public JSONObject getDNAgainstSalesForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountCN = 0d;\n double totalAmountCN = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n\n /**\n * Get CN amount\n */\n reqParams.put(\"entitycolnum\", reqParams.optString(\"dnentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"dnentityValue\"));\n List<Object> cnData = accEntityGstDao.getDNAgainstCustomer(reqParams);\n if (!reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n for (Object object : cnData) {\n Object[] data = (Object[]) object;\n String term = data[1] != null ? data[1].toString() : \"\";\n double termamount = data[0] != null ? (Double) data[0] : 0;\n\n totalAmountCN = (Double) data[3];\n if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n taxableAmountCN += data[2] != null ? (Double) data[2] : 0;\n IGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n taxableAmountCN += data[2] != null ? (Double) data[2] : 0;\n CGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n } else if (StringUtil.isNullOrEmpty(term)) {\n taxableAmountCN += data[2] != null ? (Double) data[2] : 0;\n }\n }\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountCN,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\",authHandler.formattedAmount(taxableAmountCN+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n } else {\n reqParams.put(\"isDebitNoteTransaction\", true);\n jSONObject = accGSTReportService.getCreditNoteJSONArrayForGSTR3B(cnData, reqParams, companyId);\n reqParams.remove(\"isDebitNoteTransaction\");\n }\n return jSONObject;\n }", "public CoreComponentTypes.apis.ebay.BasicAmountType getAmount() {\r\n return amount;\r\n }", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }", "public double sumTransactions() {\n\t\treturn checkIfTransactionsExist(true);\n\t}" ]
[ "0.69473946", "0.6901147", "0.66045135", "0.65780306", "0.63766515", "0.6321741", "0.6302418", "0.6104977", "0.60255545", "0.59378004", "0.59207755", "0.5913066", "0.5886114", "0.58640283", "0.57965946", "0.5738757", "0.56557137", "0.5626151", "0.5626151", "0.5623971", "0.56201464", "0.56026065", "0.56010544", "0.556729", "0.55434835", "0.5508684", "0.54972476", "0.54925007", "0.5475896", "0.5475313", "0.5473273", "0.54634315", "0.54570943", "0.5454449", "0.54308754", "0.54267305", "0.54267305", "0.54267305", "0.54267305", "0.54243356", "0.54243356", "0.54243356", "0.5419722", "0.5413546", "0.54106003", "0.5409795", "0.53896916", "0.53896916", "0.53896916", "0.537431", "0.5362578", "0.53440773", "0.53419816", "0.53325504", "0.5321659", "0.5312871", "0.5310669", "0.5308734", "0.5282651", "0.52771914", "0.52760226", "0.5271946", "0.5263455", "0.52525914", "0.52495855", "0.52476394", "0.52388144", "0.5228893", "0.5218345", "0.52123934", "0.52089745", "0.52070403", "0.52056956", "0.5203634", "0.519379", "0.51914865", "0.51914865", "0.51914865", "0.51914865", "0.51914865", "0.51914865", "0.51914865", "0.51863045", "0.5184956", "0.5184956", "0.5182336", "0.5179618", "0.51770884", "0.5176294", "0.5169004", "0.5162367", "0.51582426", "0.51547605", "0.515373", "0.5142757", "0.51418173", "0.513346", "0.51265264", "0.51259094", "0.51254916" ]
0.71177024
0
REST call to get the current weather conditions of a particular location. If no location provided a random set of coordinates are generated and their weather conditions are returned.
@GetMapping("/weather/current") public Location getCurrentWeather(@RequestParam(value = "city", required = false) final String city, @RequestParam(value = "country", required = false) final String country, @RequestParam(value = "lon", required = false) final String lon, @RequestParam(value = "lat", required = false) final String lat) { final StringBuilder locationBuilder = new StringBuilder(); validator.getCurrentWeatherValidator(city, country, lon, lat); if (city != null) { locationBuilder.append("city=").append(city); if(country != null) { locationBuilder.append("&country=").append(country); } } else if (lat != null) { final double latitude = Double.parseDouble(lat); final double longitude = Double.parseDouble(lon); final Coordinates latLong = new Coordinates(longitude, latitude); locationBuilder.append(latLong.getUriComponent()); } else { Coordinates randomCoordinates = getRandomCoordinates(); locationBuilder.append(randomCoordinates.getUriComponent()); } final String location = locationBuilder.toString(); return weatherService.getCurrentConditions(location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);", "public static WeatherRequest generateWeatherRequestForCurrentLocation() {\n WeatherRequest req = new WeatherRequest();\n req.setTypeCurrentLocation();\n return req;\n }", "public abstract WeatherData getCurrentWeather(LocationCoordinate _location) throws Exception;", "public abstract WeatherData[] getDailyWeatherForecast(LocationCoordinate _location) throws Exception;", "public void getWeather(String city, String units);", "GeneralWeatherReport queryWeatherReport(String cityId);", "Map<UUID, Optional<Location>> getAllCurrentLocations();", "@Override\n public void requestWeatherSuccess(Weather weather, Location requestLocation) {\n try {\n if (request != null) {\n List<WeatherInfo.DayForecast> forecastList = new ArrayList<>();\n for (int i = 0; i < weather.dailyList.size(); i++) {\n forecastList.add(\n new WeatherInfo.DayForecast.Builder(\n WeatherConditionConvertHelper.getConditionCode(\n weather.dailyList.get(i).weatherKinds[0],\n true))\n .setHigh(weather.dailyList.get(i).temps[0])\n .setLow(weather.dailyList.get(i).temps[1])\n .build());\n }\n WeatherInfo.Builder builder = new WeatherInfo.Builder(\n weather.base.city,\n weather.realTime.temp,\n WeatherContract.WeatherColumns.TempUnit.CELSIUS)\n .setWeatherCondition(\n WeatherConditionConvertHelper.getConditionCode(\n weather.realTime.weatherKind,\n TimeManager.getInstance(this)\n .getDayTime(this, weather, false)\n .isDayTime()))\n .setTodaysHigh(weather.dailyList.get(0).temps[0])\n .setTodaysLow(weather.dailyList.get(0).temps[1])\n .setTimestamp(weather.base.timeStamp)\n .setHumidity(\n Double.parseDouble(\n weather.index.humidities[1]\n .split(\" : \")[1]\n .split(\"%\")[0]))\n .setWind(\n Double.parseDouble(weather.realTime.windSpeed.split(\"km/h\")[0]),\n weather.realTime.windDegree,\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH)\n .setForecast(forecastList);\n\n request.complete(new ServiceRequestResult.Builder(builder.build()).build());\n }\n } catch (Exception ignore) {\n requestWeatherFailed(requestLocation);\n }\n }", "LocationsClient getLocations();", "@Override\n public Single<WeatherData> getForecastData(@NonNull final Location location) {\n return Single.just(true)\n .observeOn(Schedulers.io())\n .flatMap(aBoolean -> api.getForecast(apiKey, location.latitude(), location.longitude(), EXCLUDE_DATA_BLOCKS, \"ca\"));\n }", "@Override\n public String getWeatherAtLocation(@PathVariable(\"location\") String location, @RequestParam(value = \"period\", defaultValue = \"0\") int period) {\n byte[] bytes;\n String utfLocation = null;\n\n try {\n // Re-coding location\n bytes = location.getBytes(\"ISO-8859-1\");\n utfLocation = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n logger.error(\"Failed to handle byte encoding of url parameter\", e);\n }\n\n if (utfLocation != null) {\n return weatherRequest.requestWeather(utfLocation, period);\n }\n else {\n return \"Error: please try your request again!\";\n }\n }", "@GET(\"https://api.openweathermap.org/data/2.5/weather?\")\n Call<WeatherResponse> getWeatherData(@Query(\"q\") String city, @Query(\"appid\") String apiID, @Query(\"units\") String units);", "public static GlobalStates getStatesFromAllLocations()\n {\n GlobalStates globalStates = new GlobalStates();\n try {\n\n List<LocalStates> compileRes = new ArrayList<>();\n getLocationIds().getLocationIds().forEach(\n (locn) -> {\n LocalStates ls = new LocalStates();\n StateVariables sv = IoTGateway.getGlobalStates().get(locn);\n ls.setLocation(locn);\n ls.setStateVariable(sv);\n ls.setFire(IoTGateway.getIsFireLocn().get(locn));\n ls.setSmokeAlert(IoTGateway.getSmokeWarn().get(locn));\n compileRes.add(ls);\n\n }\n );\n globalStates.setLocalStates(compileRes);\n }\n catch (NullPointerException npe)\n {\n LOGGER.error(\"Null Pointer Exception at Horizon.Restart project and open browser after atleast one timestep\");\n }\n return globalStates;\n }", "IConditionsRequest getConditionsRequest(String location, IRequestListener listener);", "public String getCurrentWeather() {\n\t\tString jsonStr = null;\n\t\t\n\t\tClient client = ClientBuilder.newClient();\t\t\n\t\tWebTarget target = client.target(OpenWeatherApiUtil.BASE_URL)\n\t\t\t\t.path(OpenWeatherApiUtil.WEATHER_RESOURCE)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.CITY_QUERY_PARAM, CITY_VANCOUVER)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.UNITS_QUERY_PARAM, OpenWeatherApiUtil.METRIC_UNITS)\n\t\t\t\t.queryParam(OpenWeatherApiUtil.API_KEY_QUERY_PARAM, getApiKey());\n\n\t\tLOG.debug(\"Target URL: \" + target.getUri().toString());\n\t\t\n\t\tInvocation.Builder invocationBuilder = target.request(MediaType.APPLICATION_JSON);\t\t\n\t\t\n\t\tResponse response = invocationBuilder.get(Response.class);\t\t\n\t\tjsonStr = response.readEntity(String.class);\n\t\t\n\t\t// Check response from Open Weather API and log the response appropriately\n\t\tif (response.getStatus() == 200) {\n\t\t\tLOG.debug(jsonStr);\n\t\t}\n\t\telse {\n\t\t\tLOG.error(ErrorMessageUtils.ERROR_OPEN_WEATHER_API_RESPONSE_NON_200_STATUS\n\t\t\t\t\t+ \"\\n\" + response.readEntity(String.class));\n\t\t}\n\t\t\t\n\t\treturn jsonStr;\n\t}", "IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);", "@GET(\"iss-now.json/\")\n Call<ISStatus> GetLocation();", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "@GetMapping(\"/getAllLocation\")\n public ResponseEntity<List<LocationModel>> getAllLocation() {\n \n List<LocationModel> list = locationRepository.findAll();\n if (list.isEmpty()) {\n return new ResponseEntity<List<LocationModel>>(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity<List<LocationModel>>(list, HttpStatus.OK);\n }", "@GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetQSLocationsResponse getQSLocations\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetQSLocationsRequest getQSLocationsRequest\n )\n ;", "@Override\n public List<Object> getBatteryLogByLocation(Map<String, Object> condition) {\n return null;\n }", "@Override\n public WeatherData getCurrentWeather(String location)\n throws RemoteException {\n WeatherData weatherResult = Utils.getResult(location, getApplicationContext());\n\n if (weatherResult != null) {\n Log.d(TAG, \"\"\n + weatherResult.toString()\n + \" result for location: \"\n + location);\n\n // Return the weather data back\n return weatherResult;\n } else {\n return null;\n }\n }", "@Override\n public WeatherDaySample getDailyForecast(final String location, final WeekDay weekday, final TemperatureUnit temperatureUnit) {\n final String url = UriComponentsBuilder.fromHttpUrl(weatherServiceUrl)\n .path(\"/forecast/{location}/day/{weekday}\")\n .buildAndExpand(location, weekday)\n .toUriString();\n\n try {\n logger.trace(\"GET {}\", url);\n\n final HttpHeaders headers = new HttpHeaders();\n headers.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);\n\n final HttpEntity<?> requestEntity = new HttpEntity<>(headers);\n// final ResponseEntity<WeatherDaySample> forEntity = restTemplate.getForEntity(url, WeatherDaySample.class);\n final ResponseEntity<WeatherDaySample> forEntity = restTemplate.exchange(url, HttpMethod.GET, requestEntity, WeatherDaySample.class);\n\n logger.trace(\"GET {} - HTTP {}\", url, forEntity.getStatusCodeValue());\n\n return forEntity.getBody();\n } catch (RestClientResponseException ex) {\n // Http error response\n logger.error(\"GET {} - HTTP {} - {}\", url, ex.getRawStatusCode(), ex.getResponseBodyAsString());\n } catch (ResourceAccessException ex) {\n // Connection error (ex. wrong URL), or unknown http code received\n logger.error(\"GET {} - {}\", url, ex.getMessage());\n }\n\n // An error has occurred\n return null;\n }", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetOPSLocationsResponse getOPSLocations\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetOPSLocationsRequest getOPSLocationsRequest\n )\n ;", "net.webservicex.www.WeatherForecasts getWeatherForecasts();", "public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }", "LazyResponse<LocationBit> getLocation( double lon, double lat, double accuracy_in_meters);", "public WeatherCondition getCondition() {\n return condition;\n }", "private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }", "public double getWeatherAPI() {\n\t\tRestAssured.baseURI= props.getProperty(\"BaseURI\");\n\t\tString response = \tgiven().log().all().header(\"Content-Type\",\"application/json\").\n\t\t\t\tqueryParam(\"q\", props.getProperty(\"city\")).\n\t\t\t\tqueryParam(\"appid\", props.getProperty(\"key\")).\n\t\t\t\tqueryParam(\"units\", props.getProperty(\"unit\"))\n\t\t\t\t.when().get(\"data/2.5/weather\")\n\t\t\t\t.then().log().all().assertThat().statusCode(200).header(\"charset\", \"UTF-8\").extract().response().asString();\n\n\n\t\tSystem.out.println(response);\n\n\t\tJsonPath json = new JsonPath(response); // parsing the String response to Json\n\t\tString temp = json.getString(\".main.temp\");\n\t\tSystem.out.println(temp);\n\t\t\n\t\tdouble tempurature = Double.parseDouble(temp);\n\t\t\n\t\treturn tempurature;\n\t\t\n\t\t\n\t\t\n\t}", "public static JSONObject locationAvailability(String city,String location) throws Exception{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\tBoolean isLocationAvailable = false;\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\t\tString status = \"\";\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tconnection = DBConnection.createConnection();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t\tpreparedStatement =connection.prepareStatement(\"select \"\n\t\t\t\t\t+\" sa.is_active \"\n\t\t\t\t\t+\" from \"\n\t\t\t\t\t+\" sa_city sc, \"\n\t\t\t\t\t+\" sa_area sa \"\n\t\t\t\t\t+\" where \"\n\t\t\t\t\t+\" sc.city_name ILIKE ? \"\n\t\t\t\t\t+\" and \"\n\t\t\t\t\t+\" sa.area_name ILIKE ? \"\n\t\t\t\t\t+\" and \"\n\t\t\t\t\t+\" sc.is_active='Y' \"\n\t\t\t\t\t+\" and \"\n\t\t\t\t\t+\" sa.city_id=sc.city_id \");\n\n\t\t\tpreparedStatement.setString(1, city);\n\t\t\tpreparedStatement.setString(2, location);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\twhile(resultSet.next()){\n\t\t\t\tstatus = resultSet.getString(1);\n\n\t\t\t\tif(status.equals(\"Y\")){\n\t\t\t\t\tisLocationAvailable = true;\n\t\t\t\t}else{\n\t\t\t\t\tisLocationAvailable = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (SQLException sqle) {\n\t\t\tthrow sqle;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tif(connection!=null){\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif(connection!=null){\n\t\t\t\tconnection.close();\n\t\t\t}\n\t\t}\n\t\tjsonObject.put(\"availability\", isLocationAvailable);\n\t\treturn jsonObject;\n\t}", "@GetMapping(\"/locations\")\n public List<Location> getLocations(){\n return service.getAll();\n }", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "public static WeatherRequest generateWeatherRequestForCurrentLocationWithCurCacheData(Context context) {\n \tWeatherRequest req = generateWeatherRequestForCurrentLocation();\n \n WeatherData curInCache = _getCurCacheData(context, req);\n if (curInCache == null) {\n Log.w(LOG_TAG, \"Generate request for cur loc with cur in db, but there is no cur in db. (Called from Force update or Auto-sync)\");\n return null;\n }\n \n req.setReqCurLoc(curInCache.getCurLocLat(), curInCache.getCurLocLng(), curInCache.getCurLocLatTrim(), curInCache.getCurLocLngTrim(), \n curInCache.getCurLocName(), curInCache.getCurLocState(), curInCache.getCurLocCountry(), curInCache.getCurLocTimezoneId(), null);\n \n return req;\n }", "private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }", "private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public List<LocationInfo> getAllLocation() {\n return allLocation;\n }", "public static String findTemp(String lat, String lon) {\n //final String methodPath = \"/entities.electricityusage/\";\n //initialize\n URL url = null;\n String appid = \"appid=f93bd59bea3ab44fb8dba0d95596adfc\";\n HttpURLConnection conn = null;\n String textResult = \"\";\n //making http request\n try {\n url = new URL(WEATHER_URI + \"lat=\" + lat + \"&\" + \"lon=\" + lon + \"&\" +appid);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n return textResult;\n }", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "public WeatherForecast getForecast(String city) throws WeatherForecastClientException {\n HttpResponse<String> response;\n try {\n URI uri = new URI(\"http\", \"api.openweathermap.org\", \"/data/2.5/weather\",\n String.format(\"q=%s&units=metric&lang=bg&appid=%s\", city, apiKey), null);\n\n System.out.println(uri);\n HttpRequest request = HttpRequest.newBuilder().uri(uri).build();\n response = weatherHttpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n } catch (URISyntaxException | IOException | InterruptedException e) {\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\", e);\n }\n if (response.statusCode() == HttpURLConnection.HTTP_OK) {\n Gson gson = new Gson();\n return gson.fromJson(response.body(), WeatherForecast.class);\n } else if (response.statusCode() == HttpURLConnection.HTTP_NOT_FOUND) {\n throw new LocationNotFoundException(\"Couldn't find location with name : \" + city);\n }\n\n throw new WeatherForecastClientException(\"There was a problem with WeatherForecastClient.\");\n }", "@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}", "Weather getById(Long id);", "private void requestWeatherTypes() {\n SharedPreferences preferences = getSharedPreferences(CommonConstants.APP_SETTINGS, MODE_PRIVATE);\n String url = \"https://api.openweathermap.org/data/2.5/forecast?\" +\n \"id=\" + input.get(CommonConstants.ARRIVAL_CITY_ID) +\n \"&appid=\" + CommonConstants.OWM_APP_ID +\n \"&lang=\" + Locale.getDefault().getLanguage() +\n \"&units=\" + preferences.getString(CommonConstants.TEMPERATURE_UNIT, \"Standard\");\n ForecastListener listener = new ForecastListener(weatherList -> {\n try {\n WeatherTypeMapper mapper = new WeatherTypeMapper();\n fillPreview(mapper.from(weatherList));\n if (input.containsKey(CommonConstants.SELECTIONS)) {\n //noinspection unchecked\n setSelections((List<Settings.Selection>) input.get(CommonConstants.SELECTIONS));\n }\n } catch (ExecutionException | InterruptedException e) {\n Log.e(TAG, \"onSuccess: \" + e.getMessage(), e);\n }\n });\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, listener, null);\n TravelRequestQueue.getInstance(this).addRequest(request);\n }", "public interface WeatherService {\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"q\") String city, @Query(\"appid\") String key);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key, @Query(\"units\") String value);\n\n @GET(\"weather\")\n Call<ClaseCiudad> getCity(@Query(\"id\") int idCity, @Query(\"appid\") String key, @Query(\"units\") String value, @Query(\"lang\") String lang);\n\n }", "@Override\n protected String[] doInBackground(String... params) {\n if (params.length == 0) {\n return null;\n }\n\n String location = params[0];\n URL weatherRequestUrl = NetworkUtils.buildUrl(location);\n\n try {\n String jsonWeatherResponse = NetworkUtils\n .getResponseFromHttpUrl(weatherRequestUrl);\n\n String[] simpleJsonWeatherData = OpenWeatherJsonUtils\n .getSimpleWeatherStringsFromJson(MainActivity.this, jsonWeatherResponse);\n\n return simpleJsonWeatherData;\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\n\t}", "private LocationRequest getLocationRequest() {\r\n Log.i(TAG, \"getting location request\");\r\n LocationRequest locationRequest = new LocationRequest();\r\n locationRequest.setInterval(10000);\r\n locationRequest.setFastestInterval(5000);\r\n locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);\r\n return locationRequest;\r\n }", "public void callAPICall_shouldRetrieveCurrentWeatherInformation(String cityName) {\n\n WeatherAPIManager weatherAPIManager = new WeatherAPIManager(activity);\n weatherAPIManager.setOnResponseListener(new WeatherAPIManagerOnResponseListener());\n weatherAPIManager.connectToWeatherEndpoint(cityName);\n }", "private LocationRequest getLocationRequest() {\n LocationRequest locationRequest = new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n return locationRequest;\n }", "@Override\n @Cacheable(\"darkSkyFullWeather\")\n public WeatherDataDto getFullWeather(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n String pressure = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"pressure\"));\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n String humidity = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"humidity\")*100);\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n weatherDataDto.setPressure(pressure);\n weatherDataDto.setWindSpeed(windSpeed);\n weatherDataDto.setHumidity(humidity);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@GET(\"weather?APPID=bec2ea2f434c848c09196f2de96e3c4c&units=metric\")\n Single<Weather> getWeatherData(@Query(\"q\") String name);", "@Test\n\t@Title(\"TC_008: Verify that the current weather data is returned correctly when user search for the City Name\")\n\t \n\tpublic void TC_008_Verify_CurrentWeatherInfo_Is_Returned_For_ValidCity() {\n\t\t\n\t\tLocation city = new Location();\n\t\t\n\t\tcity = DataReader.RetrieveLocationFromFile(\"data.json\").get(0);\n\t\t\n\t\tcity.weather = new Weather(\"C\");\n\t\t\n\t\t//Steps:\n\t\t//1. Access to the site\n\t\tendUser.access_Site();\n\t\t\n\t\t//Search Weather by CityName\n\t\tendUser.SearchWeatherbyCityName(city);\n\t\t\n\t\t//Assume that the test application is triggering the correct API as expectation: OncCall\n\t\tcity = endUser.getWeatherInfoViaAPIResponse(city);\n\t\t\n\t\t//Validate Current Weather\n\t\tendUser.Validate_CurrentWeather(city);\n\t\t\n\t\tAssert.assertTrue(TestConfigs.glb_TCFailedMessage, TestConfigs.glb_TCStatus);\n\t}", "void loadData() {\n Request request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=20.5937,78.9629\")\n .get().build();\n //Create OkHttpClient Object\n OkHttpClient client = new OkHttpClient();\n\n // Call the request using client we just created\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n //Use this code to Handle Failed Request mostly due to internet issue\n // we will just Create a Tost Message for user\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n //Here we will check is reponse is Sucessfull or is their any\n // request error i.e url error\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }\n });\n\n\n //---------------------------------FOR United States----------------------------------------\n\n //Following codes has similar output as before but the difference is the city Names here\n //is of United States\n request = new Request.Builder()\n .url(\"https://www.metaweather.com/api/location/search/?lattlong=38.899101,-77.028999\")\n .get().build();\n client = new OkHttpClient();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n String respFromApi = response.body().string();\n Log.d(\"RawData\", respFromApi);\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n\n }", "public String weather() {\r\n\t\treturn weather(random.nextInt(4));\r\n\t}", "@Override\n public void requestWeatherLocationSuccess(String query, List<Location> locationList) {\n if (request != null) {\n if (locationList != null && locationList.size() > 0) {\n weatherHelper.requestWeather(this, locationList.get(0), this);\n } else {\n requestWeatherLocationFailed(query);\n }\n }\n }", "void handleWeatherDataForLocation(String lon, String lat);", "public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location.get(\"name\").getAsString();\n String country = location.get(\"country\").getAsString();\n JsonObject current = rootObject.getAsJsonObject(\"current\");\n Double temp = current.get(\"temp_c\").getAsDouble();\n JsonObject condition = current.getAsJsonObject(\"condition\");\n String conditionText = condition.get(\"text\").getAsString();\n return new WeatherInfo(city, country, conditionText, temp);\n}", "private static boolean fetchYahooWeather() {\n try {\n SAXParserFactory spf = SAXParserFactory.newInstance();\n spf.setNamespaceAware(true);\n SAXParser parser = spf.newSAXParser();\n \n String yql_format = String.format(\"select %%s from %%s where woeid in (select woeid from geo.places(1) where text=\\\"%s, %s\\\")\", CITY, ST);\n \n /* Fetch Wind Data (temp, windDir, and windSpeed) */\n String yql_wind = String.format(yql_format, \"wind\", \"weather.forecast\");\n String url_wind = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_wind, \"UTF-8\"));\n \n DefaultHandler wind_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:wind\")) return;\n \n temp = Integer.parseInt(attributes.getValue(\"chill\"));\n \n int dir = Integer.parseInt(attributes.getValue(\"direction\")); // number from 0-359 indicating direction\n // I began writing an if tree, then remembered I was lazy.\n String[] dir_words = new String[] {\n \"east\", \"northeast\", \"north\", \"northwest\", \"west\", \"southwest\", \"south\", \"southeast\"\n };\n windDir = dir_words[dir/45];\n \n windSpeed = Integer.parseInt(attributes.getValue(\"speed\")); // speed in mph\n }\n };\n parser.parse(url_wind, wind_handler);\n \n /* Fetch Atronomy Data (sunriseHour and sunsetHour) */\n String yql_astro = String.format(yql_format, \"astronomy\", \"weather.forecast\");\n String url_astro = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_astro, \"UTF-8\"));\n \n DefaultHandler astro_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:astronomy\")) return;\n \n sunriseHour = Util.parseTime(attributes.getValue(\"sunrise\"));\n sunsetHour = Util.parseTime(attributes.getValue(\"sunset\"));\n \n }\n };\n parser.parse(url_astro, astro_handler);\n \n /* Fetch Description Data (sky) */\n String yql_sky = String.format(yql_format, \"item.condition.text\", \"weather.forecast\");\n String url_sky = String.format(\"https://query.yahooapis.com/v1/public/yql?q=%s&format=xml&u=f\", URLEncoder.encode(yql_sky, \"UTF-8\"));\n \n DefaultHandler sky_handler = new DefaultHandler() {\n public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n //System.out.printf(\"uri=%s\\nlocalName=%s\\nqName=%s\\nattributes=%s\\n\\n\", uri, localName, qName, attributes);\n if (!qName.equals(\"yweather:condition\")) return;\n \n sky = attributes.getValue(\"text\").toLowerCase();\n \n }\n };\n parser.parse(url_sky, sky_handler);\n \n return E.sky != null;\n \n } catch (java.net.UnknownHostException uhe) {\n if (Data.DEBUG) System.err.println(\"You are offline!\");\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "@Test(priority = 2)\n\tpublic void WeatherReportForParticularCity() {\n\t\ttest.homepage.searchForLocation(ReadWrite.getProperty(\"Noida_City_State\"));\n\t\ttest.currentWeatherReportPage.verifyCurrentDayAndTime();\n\t\tweatherMap = test.currentWeatherReportPage.storeInformationOfWeather();\n\n\t}", "@Cacheable(\"darkSkyDirectionWind\")\n public WeatherDataDto getDirectionWind(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setDirectionWind(constants.getMessageDoesNotSupportField());\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "@Override\n protected String[] doInBackground(String... params) {\n\n /* If there's no zip code, there's nothing to look up. */\n if (params.length == 0) {\n return null;\n }\n\n String location = params[0];\n URL weatherRequestUrl = NetworkUtils.buildUrl(location);\n\n try {\n String jsonWeatherResponse = NetworkUtils\n .getResponseFromHttpUrl(weatherRequestUrl);\n\n String[] simpleJsonWeatherData = OpenWeatherJsonUtils\n .getSimpleWeatherStringsFromJson(MainActivity.this, jsonWeatherResponse);\n\n return simpleJsonWeatherData;\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public interface WeatherService {\n\n @GET(\"weather?q=Givatayim,il&appid=15cf9b712a8454b5fcd0670649018163&units=metric\")\n Call<WeatherResponse> getWeather();\n\n /**\n * http://square.github.io/retrofit/2.x/retrofit/retrofit2/http/Query.html\n *\n * The @Query(\"q\") annotation appends \"&q=..the_city..\" to the end of the GET command\n *\n * @param city\n * @return\n */\n @GET(\"weather\")\n Call<WeatherResponse> getWeather(\n @Query(\"q\") String city,\n @Query(\"appid\") String key,\n @Query(\"units\") String units\n );\n\n}", "@GET(\"group\")\r\n\tCall<CitiesWeather> getWeather(@Query(\"id\") String ids);", "@RequestMapping(value = \"/weather/{cityName}\", method = RequestMethod.GET)\n public ResponseEntity<Weather> getWeatherDetails(@PathVariable(\"cityName\") String cityName)\n {\n logger.info(\"Calling getWeatherDetails() method with \" + cityName + \" as param\");\n Weather weather = weatherService.getWeather(cityName);\n\n if(weather.getCurrentObservation() == null)\n {\n logger.debug(\"NULL DATA RETURNED\");\n return new ResponseEntity<Weather>(HttpStatus.NOT_FOUND);\n }\n\n return new ResponseEntity<Weather>(weather, HttpStatus.OK);\n }", "public WeatherAPI(double lat, double lon) throws IOException{\n\t\tapiUrl = \"http://api.openweathermap.org/data/2.5/weather?lat=\" + lat + \"&lon=\" + lon + \"&appid=\" + apiKey + \"&lang=\" + \"de\" + \"&units=metric\";\n\n\t\tresponse = HTMLGET.getHTML(apiUrl);\n\n\t\tJSONObject apiResponseJSON = new JSONObject(response);\n\t\ttempInCelsius = \t\t\tapiResponseJSON.getJSONObject(\"main\").getDouble(\"temp\") + \"\";\n\t\tfeelsLikeTempInCelsius = \tapiResponseJSON.getJSONObject(\"main\").getDouble(\"feels_like\") + \"\";\n\t\tpressure = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"pressure\") + \"\";\n\t\thumidity = \t\t\t\t\tapiResponseJSON.getJSONObject(\"main\").getInt(\"humidity\") + \"\";\n\t\t\n\t\twindSpeed = \tapiResponseJSON.getJSONObject(\"wind\").getDouble(\"speed\") + \"\";\n\t\twindDirection = apiResponseJSON.getJSONObject(\"wind\").getInt(\"deg\") + \"\";\n\t\t\n\t\tcloudiness = apiResponseJSON.getJSONObject(\"clouds\").getInt(\"all\") + \"\";\n\t\t\n\t\tmain = \t\t\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"main\") + \"\";\n\t\tdescription = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"description\") + \"\";\n\t\tweatherID = \tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getInt(\"id\") + \"\";\n\t\tweatherIcon =\tapiResponseJSON.getJSONArray(\"weather\").getJSONObject(0).getString(\"icon\") + \"\";\n\t\ttimeOfCreation = System.currentTimeMillis() / 1000L;;\n\t}", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetBSLocationsResponse getBSLocations\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.GetBSLocationsRequest getBSLocationsRequest\n )\n ;", "protected String[] doInBackground(String... args) {\n //Create string xml\n String xml;\n String cityName = \"Custom Location\";\n //if statement to determine if city name or coords\n if (args.length == 1) {\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?q=\" + args[0] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n\n try {\n JSONObject json = new JSONObject(xml);\n JSONObject coord = json.getJSONObject(\"coord\");\n String lat = coord.getString(\"lat\");\n String lon = coord.getString(\"lon\");\n cityName = json.getString(\"name\");\n\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + lat + \"&lon=\" + lon + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n\n xml = Function.excuteGet(\"http://api.openweathermap.org/data/2.5/weather?lat=\" + args[0] + \"&lon=\" + args[1] +\n \"&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n try {\n\n JSONObject json = new JSONObject(xml);\n cityName = json.getString(\"name\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n //set xml to String returned from Function.executeGet() method sending API request to http address as parameter\n xml = Function.excuteGet(\"https://api.openweathermap.org/data/2.5/onecall?lat=\" + args[0] +\n \"&lon=\" + args[1] + \"&exclude=minutely&units=metric&appid=\" + OPEN_WEATHER_MAP_API);\n }\n\n String[] json = {xml, cityName};\n\n return json;\n }", "public abstract Location[] retrieveLocation();", "@Override\n protected WeatherInfo doInBackground(Void... params) {\n String weatherID = \"\";\n String areaID = \"\";\n try {\n String cityIds = null;\n if (mRequest.getRequestInfo().getRequestType()\n == RequestInfo.TYPE_WEATHER_BY_WEATHER_LOCATION_REQ) {\n cityIds = mRequest.getRequestInfo().getWeatherLocation().getCityId();\n weatherID = cityIds.split(\",\")[0];\n areaID = cityIds.split(\",\")[1];\n } else if (mRequest.getRequestInfo().getRequestType() ==\n RequestInfo.TYPE_WEATHER_BY_GEO_LOCATION_REQ) {\n double lat = mRequest.getRequestInfo().getLocation().getLatitude();\n double lng = mRequest.getRequestInfo().getLocation().getLongitude();\n\n String cityNameResponse = HttpRetriever.retrieve(String.format(GEO_URL, lat, lng));\n if (TextUtils.isEmpty(cityNameResponse)) {\n return null;\n }\n cityNameResponse = cityNameResponse.replace(\"renderReverse&&renderReverse(\", \"\").replace(\")\", \"\");\n Log.d(TAG, \"cityNameResponse\" + cityNameResponse);\n JSONObject jsonObjectCity = JSON.parseObject(cityNameResponse);\n String areaName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"district\");\n String cityName = jsonObjectCity.getJSONObject(\"result\").getJSONObject(\"addressComponent\").getString(\"city\");\n areaName = TextUtil.getFormatArea(areaName);\n cityName = TextUtil.getFormatArea(cityName);\n City city = cityDao.getCityByCityAndArea(cityName, areaName);\n if (city == null) {\n city = cityDao.getCityByCityAndArea(cityName, cityName);\n if (city == null)\n return null;\n }\n weatherID = city.getWeatherId();\n areaID = city.getAreaId();\n } else {\n return null;\n }\n\n //miui天气\n String miuiURL = String.format(URL_WEATHER_MIUI, weatherID);\n if (DEBUG) Log.d(TAG, \"miuiURL \" + miuiURL);\n String miuiResponse = HttpRetriever.retrieve(miuiURL);\n if (miuiResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"Rmiuiesponse \" + miuiResponse);\n\n //2345天气\n String ttffUrl = String.format(URL_WEATHER_2345, areaID);\n if (DEBUG) Log.d(TAG, \"ttffUrl \" + ttffUrl);\n String ttffResponse = DecodeUtil.decodeResponse(HttpRetriever.retrieve(ttffUrl));\n if (ttffResponse == null) return null;\n if (DEBUG) Log.d(TAG, \"ttffResponse \" + ttffResponse);\n\n\n JSONObject ttffAll = JSON.parseObject(ttffResponse);\n String cityName = ttffAll.getString(\"cityName\");\n //实时\n JSONObject sk = ttffAll.getJSONObject(\"sk\");\n String humidity = sk.getString(\"humidity\");\n String sk_temp = sk.getString(\"sk_temp\");\n\n //日落日升\n JSONObject sunrise = ttffAll.getJSONObject(\"sunrise\");\n\n ArrayList<WeatherInfo.DayForecast> forecasts =\n parse2345(ttffAll.getJSONArray(\"days7\"), true);\n\n WeatherInfo.Builder weatherInfo = null;\n weatherInfo = new WeatherInfo.Builder(\n cityName, sanitizeTemperature(Double.parseDouble(sk_temp), true),\n WeatherContract.WeatherColumns.TempUnit.CELSIUS);\n //湿度\n humidity = humidity.replace(\"%\", \"\");\n weatherInfo.setHumidity(Double.parseDouble(humidity));\n\n if (miuiResponse != null) {\n //风速,风向\n JSONObject weather = JSON.parseObject(miuiResponse);\n JSONObject accu_cc = weather.getJSONObject(\"accu_cc\");\n weatherInfo.setWind(accu_cc.getDouble(\"WindSpeed\"), accu_cc.getDouble(\"WindDirectionDegrees\"),\n WeatherContract.WeatherColumns.WindSpeedUnit.KPH);\n }\n\n weatherInfo.setTimestamp(System.currentTimeMillis());\n weatherInfo.setForecast(forecasts);\n\n if (forecasts.size() > 0) {\n weatherInfo.setTodaysLow(sanitizeTemperature(forecasts.get(0).getLow(), true));\n weatherInfo.setTodaysHigh(sanitizeTemperature(forecasts.get(0).getHigh(), true));\n weatherInfo.setWeatherCondition(IconUtil.getWeatherCodeByType(\n ttffAll.getJSONArray(\"days7\").getJSONObject(0).getString(\n DateTimeUtil.isNight(sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\"))\n ? \"nightWeaShort\" : \"dayWeaShort\"), sunrise.getString(\"todayRise\"), sunrise.getString(\"todaySet\")));\n }\n\n if (lastWeatherInfo != null)\n lastWeatherInfo = null;\n\n lastWeatherInfo = weatherInfo.build();\n\n return lastWeatherInfo;\n } catch (Exception e) {\n if (DEBUG) Log.w(TAG, \"JSONException while processing weather update\", e);\n }\n return null;\n }", "public static String generateGetDiaryWeatherURL(\n String location,\n String language,\n String unit\n ) throws SignatureException, UnsupportedEncodingException {\n String timestamp = String.valueOf(new Date().getTime());\n String params = \"ts=\" + timestamp + \"&ttl=1800&uid=\" + weatherPublicKey;\n String signature = URLEncoder.encode(generateSignature(params, weatherPrivateKey), \"UTF-8\");\n return weatherUrl + \"?\" + params + \"&sig=\" + signature + \"&location=\" + location + \"&language=\" + language + \"&unit=\" + unit;\n }", "private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }", "@CrossOrigin(origins = \"*\")\n @GetMapping(\"buildings/{building_id}/floors/floor_plan\")\n public @ResponseBody\n Iterable<Sensor> searchSensorByLocation(\n @PathVariable final long building_id,\n @RequestParam final Integer floor_number,\n @RequestParam final String x_coordinate,\n @RequestParam final String y_coordinate) {\n return sensorService.searchSensorByLocation(building_id, floor_number, x_coordinate, y_coordinate);\n }", "public ArrayList<LocationDetail> getLocations() throws LocationException;", "public interface WeatherAPI {\n\n /**\n * Fetch Weather data for a given location\n *\n * @param zipCode is the location\n */\n @GET(\"/api/\" + BuildConfig.API_KEY + \"/conditions/hourly10day/q/{zip}.json\")\n Observable<WeatherModel> fetchWeather\n (@Path(\"zip\") String zipCode);\n}", "public interface WeatherInterface {\n\n /*@GET(\"weather?\")\n Call<WeatherResponse> getWeatherFromZip(\n @Query(\"zip\") String zip,\n @Query(\"APPID\") String appId\n );*/\n\n @GET(\"{api_key}/conditions/q/Mexico/Mexico_City.json\")\n Call<WeatherResponse> getWeatherFromSanFrancisco(\n @Path(\"api_key\") String apiKey\n );\n}", "@GetMapping(\"/getTheaters/{city}\")\r\n\tResponseEntity<List<Theater>> findTheaters(@PathVariable(\"city\") String city){\r\n\t\tList<Theater> selectedTheaters = new ArrayList<Theater>();\r\n\t\tList<Theater> theaterList = getTheaters();\r\n\t\tfor (Theater theater : theaterList) {\r\n\t\t\tif(theater.getTheaterCity().equals(city)) {\r\n\t\t\t\tselectedTheaters.add(theater);\r\n\t\t\t}\r\n\t\t}\r\n\t\tResponseEntity<List<Theater>> response = new ResponseEntity<List<Theater>>(selectedTheaters,HttpStatus.OK);\r\n\t\treturn response;\r\n\t}", "List<Location> getLocations(String coverageType);", "public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "@RequestMapping(value=\"/locations\", method=RequestMethod.GET)\n\t@ResponseBody\n\tpublic Iterable<Location> getLocations(){\n\t\treturn lr.findAll();\n\t}", "@Override\n @Cacheable(\"darkSkyWindSpeed\")\n public WeatherDataDto getWindSpeed(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String windSpeed = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"windSpeed\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(ServiceName.DARK_SKY);\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setWindSpeed(windSpeed);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public interface IWeatherDataProvider {\n\n\tpublic WeatherData getWeatherData(Location location);\n\t\n}", "@RequestMapping(\"/weather-forecast\")\r\n\tpublic ModelAndView getWeatherForecast(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tSystem.out.println(\"~~~~~ INFO: inside getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\tString location = request.getParameter(\"area\");\r\n\r\n\t\tWeatherService ws = new WeatherService();\r\n\t\tws.getWeatherForecast(location);\r\n\t\t\r\n\t\tModelAndView mv = new ModelAndView();\r\n\t\tmv.setViewName(\"display-weather.jsp\");\r\n\t\t\r\n\t\tmv.addObject(\"location\", location);\r\n\t\tmv.addObject(\"temperature\", ws.temperature);\r\n\t\tmv.addObject(\"description\", ws.description);\r\n\t\tmv.addObject(\"humidity\", ws.humidity);\r\n\t\tmv.addObject(\"wind_speed\", ws.wind_speed);\r\n\t\tmv.addObject(\"wind_angle\", ws.wind_angle);\r\n\t\t\r\n\t\t/* For debug purpose only */\r\n\t\tSystem.out.println(\"~~~~~ INFO: exiting getWeatherForecast() - WeatherNowController.java ~~~~~\");\r\n\t\t\r\n\t\treturn mv;\r\n\t}", "@PostMapping(\"/citiesbyname\")\n\tprivate List<Map<String, Object>> getCitiesByName(@Valid @RequestBody Location location) {\n\t\t\n\t\tprimeRealtyLogger.debug(LocationService.class, \"getCitiesByName() -> cityName: \" + location.getCityName() + \", stateCode: \" + location.getStateCode());\n\t\t\t\t\n\t\tList<Map<String, Object>> rows = new ArrayList<Map<String, Object>>();\n\t\tMap<String, Object> columns = new HashMap<String, Object>();\n\t\t\n\t\tif(location.getCityName()!= null && location.getCityName().length() >= 5) {\t\n\t\t\t\n\t\t\trows = locationDao.getCitiesByName(location.getCityName(), location.getStateCode());\n\t\t\t\n\t\t\tprimeRealtyLogger.debug(LocationService.class, \"getCitiesByName() -> databse fetch size: \" + rows.size());\n\t\t\t\t\t\n\t\t} else {\n\t\t\tcolumns.put(\"CityName\", \"minimum 5 characters required\");\n\t\t\tcolumns.put(\"StateCode\", null);\n\t\t\tcolumns.put(\"ZipCode\", null);\n\t\t\trows.add(columns);\n\t\t}\n\t\t\n\t\treturn rows;\n\t}", "@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition) {\n return null;\n }", "@Cacheable(\"darkSkyTemperature\")\n public WeatherDataDto getTemperature(@NonNull String city, @NonNull String countryCode) {\n ResponseEntity<String> response = getWeather(city, countryCode);\n if (response.getStatusCode() == HttpStatus.OK) {\n JSONObject jsonObject = new JSONObject(response.getBody());\n String temperature = String.valueOf(jsonObject\n .getJSONObject(\"currently\")\n .getDouble(\"temperature\"));\n\n WeatherDataDto weatherDataDto = new WeatherDataDto();\n weatherDataDto.setServiceName(getServiceName());\n weatherDataDto.setName(city);\n weatherDataDto.setCountry(countryCode);\n weatherDataDto.setTemperature(temperature);\n\n return weatherDataDto;\n } else {\n return new WeatherDataDto(ServiceName.DARK_SKY, response.getBody());\n }\n }", "public Document getWeatherPage() throws IOException {\n Document page = Jsoup.connect(\"https://yandex.ru/pogoda/\" + this.city)\n .userAgent(\"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\").get();\n return page;\n }", "public interface IWeatherProvider {\r\n\r\n public CurrentWeather getCurrentCondition(String data) throws WeatherLibException;\r\n\r\n public WeatherForecast getForecastWeather(String data) throws WeatherLibException;\r\n\r\n public List<City> getCityResultList(String data) throws WeatherLibException;\r\n\r\n public WeatherHourForecast getHourForecastWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURL(String cityNamePattern) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryCurrentWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n // public String getQueryForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n public HistoricalWeather getHistoricalWeather(String data) throws WeatherLibException;\r\n\r\n public String getQueryCityURLByLocation(Location location) throws ApiKeyRequiredException;\r\n\r\n public String getQueryCityURLByCoord(double lon, double lat) throws ApiKeyRequiredException;\r\n\r\n\r\n public void setConfig(WeatherConfig config);\r\n\r\n public void setWeatherCodeProvider(IWeatherCodeProvider codeProvider);\r\n\r\n public String getQueryImageURL(String weatherId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHourForecastWeatherURL(String cityId) throws ApiKeyRequiredException;\r\n\r\n //public String getQueryHistoricalWeatherURL(String cityId, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n public String getQueryLayerURL(String cityId, Params params) throws ApiKeyRequiredException;\r\n\r\n\r\n\r\n public String getQueryCurrentWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHourForecastWeatherURL(WeatherRequest request) throws ApiKeyRequiredException;\r\n\r\n public String getQueryHistoricalWeatherURL(WeatherRequest request, Date startDate, Date endDate) throws ApiKeyRequiredException;\r\n\r\n}", "@GetMapping(\"/locations/{locationId}\")\n public Location getLocation(@PathVariable Integer locationId){\n\n return service.getOne(locationId);\n }", "@Override\n\tpublic String getHourlyWeatherData(String city, String country) throws IOException {\n\t\t\n\t\treturn connectFiveDayForecast(city, country);\n\t\t\n\t}", "public static String getData(Location center, long proximity) throws MalformedURLException, IOException {\n String responseString = \"\";\r\n String outputString = \"\";\r\n\r\n //String wsURL = \"http://www.deeptraining.com/webservices/weather.asmx\";\r\n URL url = new URL(WS_URL);\r\n URLConnection connection = url.openConnection();\r\n HttpURLConnection httpConn = (HttpURLConnection)connection;\r\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\r\n String message = String.format(XML_INPUT, USER, PASS, proximity, center.getLatitude(), center.getLongitude());\r\n byte[] buffer = new byte[message.length()];\r\n buffer = message.getBytes();\r\n bout.write(buffer);\r\n byte[] b = bout.toByteArray();\r\n\r\n //String SOAPAction = \"http://litwinconsulting.com/webservices/GetWeather\";\r\n String SOAPAction = \"urn:provider/interface/chargepointservices/getPublicStations\";\r\n\r\n // Set the appropriate HTTP parameters.\r\n httpConn.setRequestProperty(\"Content-Length\",\r\n String.valueOf(b.length));\r\n httpConn.setRequestProperty(\"Content-Type\", \"text/xml; charset=utf-8\");\r\n httpConn.setRequestProperty(\"SOAPAction\", SOAPAction);\r\n httpConn.setRequestMethod(\"POST\");\r\n httpConn.setDoOutput(true);\r\n httpConn.setDoInput(true);\r\n OutputStream out = httpConn.getOutputStream();\r\n //Write the content of the request to the outputstream of the HTTP Connection.\r\n out.write(b);\r\n out.close();\r\n //Ready with sending the request.\r\n\r\n //Read the response.\r\n InputStreamReader isr =\r\n new InputStreamReader(httpConn.getInputStream());\r\n BufferedReader in = new BufferedReader(isr);\r\n\r\n //Write the SOAP message response to a String.\r\n while ((responseString = in.readLine()) != null) {\r\n outputString = outputString + responseString;\r\n }\r\n return outputString;\r\n }", "LazyResponse<List<Offer> > getCurrentActiveOffers(LocationBit location);", "String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }", "@Override\n\tpublic String getWeatherDataCity(String city, String country) throws IOException {\n\n\t\treturn connectAPICity(city, country);\n\t\t\n\t}", "public void getLocation() {\n\t\tThread locationThread = new Thread(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\ttry{\n\t\t\t\t\tURL url = new URL(\"http://ip-api.com/json\");\n\t\t\t\t\tURLConnection connection = url.openConnection();\n\t\t\t\t\n\t\t\t\t\tString line;\n\t\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tbuilder.append(line);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tJSONObject json = new JSONObject(builder.toString());\n\t\t\t\t\tString status = json.getString(\"status\");\n\t\t\t\t\tSystem.out.println(\"Location retrieval was: \" + status);\n\t\t\t\t\tif(status.equals(\"success\")){\n\t\t\t\t\t\tcity = json.getString(\"city\");\n\t\t\t\t\t\tzipCode = json.getString(\"zip\");\n\t\t\t\t\t\tcountryCode = json.getString(\"countryCode\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.println(\"Failed to retreive location\");\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(!locationThread.isAlive()){\n\t\t\tlocationThread.start();\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tlocationThread.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tlocationThread.start();\n\t\t}\n\t}", "@Override\n\tpublic Response weather(String iata, String radiusString) {\n\t\treturn null;\n\t}", "public static String getWoeid(String city)\n {\n try {\n String inline = useAPI(\"https://www.metaweather.com/api/location/search/?query=\" + city);\n if (!inline.equals(\"[]\")) {\n String[] words = inline.split(\",\");\n String[] erg = words[2].split(\":\");\n return erg[1];\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static JSONObject fetchServinglocation() throws JSONException {\n\t\tJSONArray jArrayCity = new JSONArray();\n\t\tJSONObject cityList = new JSONObject();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tPreparedStatement preparedStatement = null;\n\t\t\tResultSet resultSet = null;\n\t\t\tSQLCITY:{\n\t\t\t\ttry {\t\n\t\t\t\t\tconnection = DBConnection.createConnection();\n\t\t\t\t\tString sqlCityQuery =\"select city_id,city_name from sa_city where is_active='Y'\";\t\t \t\t\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sqlCityQuery);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\t\tJSONObject jsonObjectcity = new JSONObject();\n\t\t\t\t\t\tjsonObjectcity.put(\"cityid\",resultSet.getString(\"city_id\"));\n\t\t\t\t\t\tjsonObjectcity.put(\"cityname\",resultSet.getString(\"city_name\"));\n\t\t\t\t\t\tjsonObjectcity.put(\"arealist\", getLocationList( jsonObjectcity.getInt(\"cityid\") , true));\n\t\t\t\t\t\tjArrayCity.put(jsonObjectcity);\n\t\t\t\t\t}\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tSystem.out.println(\"Error due to:\"+e.getMessage());\n\t\t\t\t}finally{\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error due to:\"+e.getMessage());\n\t\t}\n\n\t\tSystem.out.println(\"Fetch location output length--\"+jArrayCity.length());\n\t\tcityList.put(\"citylist\", jArrayCity);\n\t\treturn cityList;\n\t}" ]
[ "0.63684344", "0.626959", "0.6265928", "0.62405026", "0.62158126", "0.60449433", "0.57750034", "0.57200587", "0.56939465", "0.5666786", "0.56664497", "0.56433344", "0.5631019", "0.56188685", "0.5509726", "0.54847443", "0.5452166", "0.5425821", "0.5400917", "0.5395598", "0.5348559", "0.5336344", "0.5326531", "0.5293093", "0.52745163", "0.52200645", "0.52094704", "0.51817435", "0.5177571", "0.5157381", "0.51512825", "0.51491123", "0.5132007", "0.5123936", "0.5113921", "0.51123416", "0.5100313", "0.5078948", "0.50619173", "0.50548255", "0.5051998", "0.5041833", "0.50322837", "0.50126386", "0.5011852", "0.50112605", "0.50056994", "0.49968767", "0.49937218", "0.49528414", "0.49468136", "0.4945437", "0.4945201", "0.49430954", "0.4942399", "0.49321008", "0.49312082", "0.49237043", "0.4923257", "0.4919528", "0.49181798", "0.4901638", "0.48945332", "0.4869828", "0.48690975", "0.4866443", "0.48585907", "0.48573163", "0.48569116", "0.48500672", "0.48414886", "0.4832761", "0.4825039", "0.48231533", "0.48203418", "0.48134252", "0.48109812", "0.47958672", "0.47950822", "0.4792824", "0.4788031", "0.47822478", "0.4773026", "0.4759343", "0.47561574", "0.47494927", "0.47476", "0.47439373", "0.47432962", "0.47354338", "0.4720771", "0.47191128", "0.47166324", "0.4716118", "0.47110704", "0.4709978", "0.47033265", "0.4703141", "0.4695121", "0.4688038" ]
0.63240886
1
Generates a random pair of geo coordinates.
private static Coordinates getRandomCoordinates() { Random r = new Random(); double upperLimit = 180; double lowerLimit = -180; double lon = r.nextDouble() * (upperLimit - lowerLimit) + lowerLimit; double lat = r.nextDouble() * (upperLimit - lowerLimit) + lowerLimit; return new Coordinates(lat, lon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double[] generateRandomCoordinates() {\n return generateRandomCoordinates(CoordinateDomain.GEOGRAPHIC, 0.05f);\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "private RandomLocationGen() {}", "public Coordinate generatePosition() {\n Random rng = new Random();\n return new Coordinate(rng.nextFloat(), rng.nextFloat());\n }", "public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y, z);\n\t}", "public static Point randomPoint() {\r\n\t\tString n = \"\" + (char) (65 + rand.nextInt(26));\r\n\t\tint x = rand.nextInt(11);\r\n\t\tint y = rand.nextInt(11);\r\n\t\treturn new Point(n, x, y);\r\n\t}", "public static Location genRandomSpawn() {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, 0, z));\n }", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "private PointF getRandCoordinate() {\n Random r = new Random();\n float xRand = (r.nextInt(getWidth()) / density) + 1;\n float y = 10 / density;\n\n return new PointF(xRand, y);\n }", "public void newCoord() {\n\t\tx = Data.generateRandomX();\n\t\ty = Data.generateRandomY();\n\t}", "public void generateNether(World world, Random random, int x, int y){\n\t}", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "private Point randomIndex() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val1 = rand.nextInt(rows_size);\r\n\t\tint val2 = rand.nextInt(columns_size);\r\n\t\twhile (!isEmpty(val1,val2)) {\r\n\t\t\tval1 = rand.nextInt(rows_size);\r\n\t\t\tval2 = rand.nextInt(columns_size);\r\n\t\t}\r\n\t\treturn new Point(val1,val2);\r\n\t}", "public Point randomLocation() {\r\n\t\tRandom rand = new Random();\r\n\t\treturn new Point(this.location.getPosition().getX()+ rand.nextInt() % location.getSize().getHeight(),this.location.getPosition().getY()+ rand.nextInt() % location.getSize().getWidth());\r\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "private void generateMap () {\n for (int i = 0 ; i < n ; i++) {\n mapCoordinate[i] = new CoordinateInfo(100 * random.nextFloat(), 100 * random.nextFloat());\n\n for (int j = 0 ; j <= i ; j++) {\n mapDistance[i][j] = mapDistance[j][i] = getDistance(mapCoordinate[i], mapCoordinate[j]);\n }\n }\n }", "public Location getRandomLocation() {\n\t\tfinal Random randomGenerator = new Random();\n\n\t\tLocation result = new Location(getWorld(), highPoint.getBlockX(), highPoint.getBlockY(), highPoint.getBlockZ());\n\t\t\n\t\tif (getSize() > 1) {\n\t\t\tfinal double randomX = lowPoint.getBlockX() + randomGenerator.nextInt(getXSize());\n\t\t\tfinal double randomY = lowPoint.getBlockY() + randomGenerator.nextInt(getYSize());\n\t\t\tfinal double randomZ = lowPoint.getBlockZ() + randomGenerator.nextInt(getZSize());\n\t\t\t\n\t\t\tresult = new Location(Bukkit.getWorld(world), randomX, randomY, randomZ);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static Location genRandomSpawn(int y) {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, y, z));\n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public double[] randomPoint(){\n\t\t\n\t\t//d1 = first random value\n\t\t//d2 = second random value\n\t\t\n\t\tdouble d1;\n\t\tdouble d2;\n\t\t\n\t\td1 = RAD_TO_DEG*(2.*PI*rnd1.nextDouble()-PI);\n\t\td2 = RAD_TO_DEG*acos(2.*rnd1.nextDouble()-1.) - 90.;\n\t\t\n\t\treturn new double[]{d2,d1};\n\t}", "private Pair<Integer, Integer> genRandomSrcDst(){\n int src = (int)(Math.random()*nodesNum);\n int dst = src;\n do {\n dst = (int)(Math.random()*nodesNum);\n }while(dst == src);\n return new Pair<Integer, Integer>(src, dst);\n }", "public Point randomPoint() \t // creates a random point for gameOjbects to be placed into\r\n\t{\n\t\tint x = rand.nextInt(900);\r\n\t\tx = x + 50;\r\n\t\tint y = rand.nextInt(900);\r\n\t\ty = y + 50;\r\n\t\tPoint p = new Point(x, y);\r\n\t\treturn p;\r\n\t}", "public static Point pos(){\r\n\t\tRandom random = new Random();\r\n\t\tint x = 0;\r\n\t\tint y = 0;\r\n\t\t//acts as a 4 sided coin flip\r\n\t\t//this is to decide which side the asteroid will appear\r\n\t\tint pos = random.nextInt(4);\r\n\t\t//west\r\n\t\tif(pos == 0){\r\n\t\t\tx = 0;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//north\r\n\t\telse if(pos == 1){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 0;\r\n\t\t}\r\n\t\t//east\r\n\t\telse if(pos == 2){\r\n\t\t\tx = 800;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//\r\n\t\telse if(pos == 3){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 600;\r\n\t\t}\r\n\t\tPoint p = new Point(x,y);\r\n\t\treturn p;\r\n\t}", "public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}", "public void randomTeleport() {\n Random random = new Random(seed);\n seed = random.nextInt(10000);\n int randomY = RandomUtils.uniform(random, 0, worldHeight);\n int randomX = RandomUtils.uniform(random, 0, worldWidth);\n int randomDirection = RandomUtils.uniform(random, 0, 4);\n move(randomX, randomY);\n turn(randomDirection);\n }", "private void generateNether(World world, Random random, int i, int j) {\n\n\t}", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }", "public static DataPoint genRandomPoint(int min, int max)\n {\n Random rand = new Random();\n return (new DataPoint(\"Centroid\", 99, rand.nextDouble(), rand.nextDouble(), rand.nextDouble(),\n rand.nextDouble(), rand.nextDouble(), rand.nextDouble()));\n }", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "public Double2D generateLocationInNeighborhood() {\n\n double neighborhoodLength = state.taskLocLength;// * (1 + 12.0 * state.random.nextDouble(true, true));\n // generate the x and y coordinates within the bounding area of the neighborhood\n double x, y;\n x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// if (state.random.nextDouble() < state.delta) {\n// // use rejection sampling to get the distribution\n// // generate those outside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(inEpsilon(x, y));\n// }else {\n// // generate those inside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(!inEpsilon(x, y));\n// }\n\n\n\n\n // generate them within the view\n// double x = (state.random.nextDouble(true, true) * state.getSimWidth());\n// double y = (state.random.nextDouble(true, true) * state.getSimHeight());\n return new Double2D(x, y);\n }", "public Position sampleRandomUniformPosition();", "Point getRandomPoint() {\n\t\t\t\t\tdouble val = Math.random() * 3;\n\t\t\t\t\tif (val >=0.0 && val <1.0)\n\t\t\t\t\t\treturn p1;\n\t\t\t\t\telse if (val >=1.0 && val <2.0)\n\t\t\t\t\t\t\treturn p2;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn p3;\n\t\t\t\t\t}", "public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}", "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 interface WB_RandomPoint extends WB_PointGenerator {\n\n\t/**\n\t * Set the seed for the RNG.\n\t *\n\t * @param seed\n\t * @return this\n\t */\n\tpublic WB_RandomPoint setSeed(final long seed);\n\n\t/**\n\t * Get the next random point.\n\t *\n\t * @return\n\t */\n\t@Override\n\tpublic WB_Point nextPoint();\n\n\t/**\n\t * Get the next random vector.\n\t *\n\t * @return\n\t */\n\tpublic WB_Vector nextVector();\n\n\t/**\n\t * Reset the RNG.\n\t */\n\tpublic void reset();\n\n\t/**\n\t * Set point offset.\n\t *\n\t * @param offset\n\t * @return\n\t */\n\tpublic WB_RandomPoint setOffset(WB_Coord offset);\n\n\t/**\n\t * Set point offset.\n\t *\n\t * @param x\n\t * @param y\n\t * @return\n\t */\n\tpublic WB_RandomPoint setOffset(double x, double y);\n\n\t/**\n\t * Set point offset.\n\t *\n\t * @param x\n\t * @param y\n\t * @param z\n\t * @return\n\t */\n\tpublic WB_RandomPoint setOffset(double x, double y, double z);\n\n}", "private PositionData getRandomPoint() {\r\n int posX = new Random().nextInt(Constants.WIDTH);\r\n int posY = new Random().nextInt(Constants.HEIGHT);\r\n //make sure point is open\r\n while(!isOpenSpace(posX, posY)) {\r\n posX = new Random().nextInt(Constants.WIDTH);\r\n posY = new Random().nextInt(Constants.HEIGHT);\r\n }\r\n return new PositionData(posX, posY, Constants.PLAYER_A_ID);\r\n }", "private float randomiseLatitude(){\n return randomiseFloat(-90,90);\n }", "public pair[] genARandomTuple(int[] values, int t){\n pair[] res = new pair[t];\n ArrayList<Integer> loc = new ArrayList<>();\n int index = 0;\n while(index < t){\n int tmp = random.nextInt(values.length);\n if(!loc.contains(tmp)){\n loc.add(tmp);\n index++;\n\t }\n\t}\n\tfor(int i = 0; i < t; i++)\n res[i] = new pair(loc.get(i), random.nextInt(values[loc.get(i)]));\n\treturn res;\n }", "public Point() {\n this.x = Math.random();\n this.y = Math.random();\n }", "public static Location genRandomSpawn(int y, int width) {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = width / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, y, z));\n }", "public void generateRandomMap() {\n\n\t}", "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}", "@Override\n\tpublic AbstractGeometryData createGeometries(float recX01, float recY01, float recX02, float recY02, double seed) {\n\t\tfloat gridRecLeft = ceilGrid(((recX01 < recX02) ? recX01 : recX02)) - 1;\n\t\tfloat gridRecRight = floorGrid(((recX01 > recX02) ? recX01 : recX02)) + 1;\n\t\tfloat gridRecBottom = ceilGrid((recY01 < recY02) ? recY01 : recY02) - 1;\n\t\tfloat gridRecTop = floorGrid((recY01 > recY02) ? recY01 : recY02) + 1;\n\n\t\tint gridPointCountX = (int) (Math.abs(gridRecRight - gridRecLeft)) + 1;\n\t\tint gridPointCountY = (int) (Math.abs(gridRecTop - gridRecBottom)) + 1;\n\n\t\tList<Float> pointsList = new ArrayList<Float>();\n\n\t\tfor (int gridOffsetX = 0; gridOffsetX < gridPointCountX; gridOffsetX++) {\n\t\t\tfor (int gridOffsetY = 0; gridOffsetY < gridPointCountY; gridOffsetY++) {\n\n\t\t\t\tfloat gridX = gridRecLeft + gridOffsetX;\n\t\t\t\tfloat gridY = gridRecBottom + gridOffsetY;\n\n\t\t\t\tfloat x = randomizePosition(gridX, gridY, seed) + (c.gridSize * gridX);\n\t\t\t\tfloat y = randomizePosition(-gridX, -gridY, seed) + (c.gridSize * gridY);\n\n\t\t\t\tif (MathE.isPointInRect(x, y, recX01, recY01, recX02, recY02)) {\n\t\t\t\t\tpointsList.add(x);\n\t\t\t\t\tpointsList.add(y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfloat[] array = new float[pointsList.size()];\n\t\tfor(int i = 0; i < pointsList.size(); i++) array[i] = pointsList.get(i);\n\t\treturn new PointList(config.id, seed, array);\n\t}", "public Location getRandomLocationForMobs() {\n\t\tfinal Location temp = getRandomLocation();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX() + 0.5, temp.getBlockY() + 0.5, temp.getBlockZ() + 0.5);\n\t}", "public int[][] generateRandomCoordinate(int mineNumber, int numberOfColumns, int numberOfRows) {\n int columnNumberIsOneRowNumberIsTwo = 1;\n while (columnNumberIsOneRowNumberIsTwo <= 2) {\n if (columnNumberIsOneRowNumberIsTwo == 1) {\n mine[mineNumber][columnNumberIsOneRowNumberIsTwo] = random.nextInt(numberOfColumns) + 1;\n }\n if (columnNumberIsOneRowNumberIsTwo == 2) {\n mine[mineNumber][columnNumberIsOneRowNumberIsTwo] = random.nextInt(numberOfRows) + 1;\n }\n columnNumberIsOneRowNumberIsTwo++;\n }\n return mine;\n }", "@Test\n public void randomSeedNumTest()\n {\n int x = _city.getRandomNum(5);\n int y = _city.getRandomNum(5);\n assertEquals(x, y);\n }", "public Point nextPoint() {\n\t\tRandom rand = new Random();\n\t\tint randomX = rand.nextInt(maxX);\n\t\tint randomY = rand.nextInt(maxY); \n\t\t\n\t\treturn new Point(randomX, randomY);\n\t}", "private static List<Point> genererPointsAlea(int nbPoints) {\n /*List<Point> points = new ArrayList<>();\n Random rand = new Random(0);\n for(int i=0; i<nbPoints; i++) {\n Point p = new Point(rand.nextDouble(), rand.nextDouble());\n points.add(p);\n }\n return points;*/\n return null;\n }", "private float randomiseLongitude(){\n return randomiseFloat(-180,180);\n }", "public LocationPoint(){\n this.mLocationID = UUID.randomUUID();\n }", "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}", "private Location generateRandomStartLocation() {\n\t\tif (!atLeastOneNonWallLocation()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There is no free tile available for the player to be placed\");\n\t\t}\n\n\t\twhile (true) {\n\t\t\t// Generate a random location\n\t\t\tfinal Random random = new Random();\n\t\t\tfinal int randomRow = random.nextInt(this.map.getMapHeight());\n\t\t\tfinal int randomCol = random.nextInt(this.map.getMapWidth());\n\n\t\t\tfinal Location location = new Location(randomCol, randomRow);\n\n\t\t\tif (this.map.getMapCell(location).isWalkable()\n\t\t\t\t\t&& !otherPlayerOnTile(location, -1)) {\n\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\treturn location;\n\t\t\t}\n\t\t}\n\t}", "private static Position fetchRandomPosition(){\n return new Position(0,0).returnRandomPosition();\n }", "Chromosome getRandom();", "public void generateRandomPosition(Zone samusZone) {\n\t\t\n\t\tint i = samusZone.getI(), j = samusZone.getJ();\n\t\twhile(i == samusZone.getI() && j == samusZone.getJ()) {\n\t\t\ti = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t\tj = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t}\n\t\t\n\t\tsamusZone.getSamus().setI(i);\n\t\tsamusZone.getSamus().setJ(j);\n\t}", "public City() {\r\n\t\tthis.x = (int) (Math.random() * 200);\r\n\t\tthis.y = (int) (Math.random() * 200);\r\n\t}", "private void generate(int x, int y) {\n \t\tvisited[x][y] = true;\n \n \t\t// while there is an unvisited neighbour\n \t\twhile (!visited[x][y + 1] || !visited[x + 1][y] || !visited[x][y - 1]\n \t\t\t\t|| !visited[x - 1][y]) {\n \t\t\t// pick random neighbour\n \t\t\twhile (true) {\n \t\t\t\tdouble r = Math.random();\n \t\t\t\tif (r < 0.25 && !visited[x][y + 1]) {\n \t\t\t\t\tnorth[x][y] = south[x][y + 1] = false;\n \t\t\t\t\tgenerate(x, y + 1);\n \t\t\t\t\tbreak;\n \t\t\t\t} else if (r >= 0.25 && r < 0.50 && !visited[x + 1][y]) {\n \t\t\t\t\teast[x][y] = west[x + 1][y] = false;\n \t\t\t\t\tgenerate(x + 1, y);\n \t\t\t\t\tbreak;\n \t\t\t\t} else if (r >= 0.5 && r < 0.75 && !visited[x][y - 1]) {\n \t\t\t\t\tsouth[x][y] = north[x][y - 1] = false;\n \t\t\t\t\tgenerate(x, y - 1);\n \t\t\t\t\tbreak;\n \t\t\t\t} else if (r >= 0.75 && r < 1.00 && !visited[x - 1][y]) {\n \t\t\t\t\twest[x][y] = east[x - 1][y] = false;\n \t\t\t\t\tgenerate(x - 1, y);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public static void main(String[] args) {\n\t\t\n\t\tdouble x = (double) Math.pow(Math.PI, RandomNumbers.getRandomInt(1,9));\n\t\tdouble y = (double) Math.pow(RandomNumbers.getRandomInt(3,14), Math.PI);\n\t\t\n\t\tSystem.out.println(\"X: \" + x + \"\\n\" + \"Y: \" + y);\n\t\t\n\t}", "private void generateRandomPosition() {\r\n int indexX, indexY;\r\n boolean collidesWithPlayers;\r\n playerState.position.x = Integer.MIN_VALUE; // While we trying...\r\n playerState.position.y = Integer.MIN_VALUE;\r\n final ExtensiveMovingObject testObject = new ExtensiveMovingObject( 0.0f, 0.0f, 0.0f, 0.0f, GeneralConsts.WORM_WIDTH, GeneralConsts.WORM_HEIGHT );\r\n int positionGenerationTrialFailureCounter = 0;\r\n do {\r\n do {\r\n indexX = 1 + (int) ( Math.random() * ( map.getWidth () - 1 ) );\r\n indexY = 1 + (int) ( Math.random() * ( map.getHeight() - 1 ) );\r\n if ( positionGenerationTrialFailureCounter++ == MAX_POSITION_GENERATION_TRIAL_FAILURE_COUNT )\r\n if ( map.getWall( indexX, indexY ) == Map.WALL_STONE )\r\n map.setWall( indexX, indexY, Map.WALL_BRICK ); // Not to empty: it can be under water!!\r\n } while( map.getWall( indexX, indexY ) == Map.WALL_STONE ); // Stone can't be cleared: it can be part of swimming pool boundaries. (But if there isn't other places where to start, we clear it!)\r\n testObject.position.x = ( indexX << GeneralConsts.WALL_WIDTH_SHIFT ) + GeneralConsts.WALL_WIDTH / 2;\r\n testObject.position.y = ( indexY << GeneralConsts.WALL_HEIGHT_SHIFT ) + GeneralConsts.WALL_HEIGHT / 2;\r\n collidesWithPlayers = false;\r\n for ( int playerIndex = 0; playerIndex < players.length && !collidesWithPlayers; playerIndex++ )\r\n if ( playerIndex != ownIndex && players[ playerIndex ] != null && testObject.hitsExtensiveObject( players[ playerIndex ].playerState ) )\r\n collidesWithPlayers = true;\r\n try {\r\n Thread.sleep( 0, 100 );\r\n }\r\n catch( InterruptedException ie ) {\r\n }\r\n } while ( collidesWithPlayers );\r\n playerState.position.x = testObject.position.x;\r\n playerState.position.y = testObject.position.y;\r\n map.clearMapForEnteringPlayer( indexX, indexY );\r\n }", "private int randomAddress() {\n\t\tint randomAddressId = (int) (Math.random() * 603);\n\t\treturn randomAddressId;\n\t}", "public static Address getARandomAddress(){\n Address address = RandomAddress.get().next();\n return address;\n }", "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tian An Men\");\n\t\tlocation1.setLatitude(0.1);\n\t\tlocation1.setLongitude(0.1);\n\n\t\tTestDriver.locationList.add(location1);\n\t\t\n\t\t\n\t\tLocation location2 = new Location();\n\t\tlocation2.setAddress(\"White House\");\n\t\tlocation2.setLatitude(100.21);\n\t\tlocation2.setLongitude(102.36);\n\t\tTestDriver.locationList.add(location2);\n\t}", "public RandomCoordinateWorldGenerator(int worldWidth, int worldHeight) {\n this.worldWidth = worldWidth;\n this.worldHeight = worldHeight;\n }", "Spawn(LatLngBounds bounds) {\n Random rand = new Random();\n double rangeNS = bounds.northeast.latitude - bounds.southwest.latitude;\n double rangeEW = bounds.northeast.longitude - bounds.southwest.longitude;\n position = new LatLng(rand.nextDouble() * rangeNS + bounds.southwest.latitude,\n rand.nextDouble() * rangeEW + bounds.southwest.longitude);\n Log.w(\"spawnpoint\", \"Placed at \" + position.toString());\n return;\n }", "public void generateKeyPair() {\n\t\ttry {\n\t\t\tKeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"DSA\", \"SUN\");\n\t\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\t\t\tkeyGen.initialize(1024, random);\n\t\t\tKeyPair pair = keyGen.generateKeyPair();\n\t\t\tprivateKey = pair.getPrivate();\n\t\t\tpublicKey = pair.getPublic();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static double[][] generateRandomPoints(Envelope env1, int iPoints, int iRandomSeed){\n\t\t\n\t\t//rgdBounds = polygon bounds\n\t\t//dLat = latitude of sampling point\n\t\t//dLng = longitude of sampling point\n\t\t//env2 = sampling bounds in radians\n\t\t//d2 = number of degrees between upper and lower bounds\n\t\t//d3 = cos(minimum latitude)\n\t\t//d4 = cos(maximum latitude) - cos(minimum latitude)\n\t\t//rgdOutput = output\n\t\t//rnd1 = random number generator\n\t\t\n\t\tdouble dLat; double dLng; double d2 = 0; double d3 = 0; double d4 = 0;\n\t\tdouble rgdOutput[][];\n\t\tEnvelope env2;\n\t\tRandom rnd1;\n\t\t\n\t\t//initializing matrix of bounds\n\t\tenv2 = new Envelope(env1.getMinX()*DEG_TO_RAD,env1.getMaxX()*DEG_TO_RAD,env1.getMinY()*DEG_TO_RAD,env1.getMaxY()*DEG_TO_RAD);\n\t\t\n\t\t//loading intermediate values\n\t\td2 = env2.getMaxX()-env2.getMinX();\n\t\td3 = cos(env2.getMinY() + PI/2.); \n\t\td4 = cos(env2.getMaxY() + PI/2.) - d3;\n\t\t\t\n\t\t//initializing output\n\t\trgdOutput = new double[iPoints][2];\n\t\trnd1 = new Random(iRandomSeed);\n\t\tfor(int i=0;i<iPoints;i++){\n\t\t\n\t\t\t//loading Lat and Lng\n\t\t\tdLng = rnd1.nextDouble()*d2 + env2.getMinX();\n\t\t\tdLng = RAD_TO_DEG*dLng;\n\t\t\tdLat = acos(d3+d4*rnd1.nextDouble());\n\t\t\tdLat = RAD_TO_DEG*dLat-90.;\n\t\t\n\t\t\t//outputting results\n\t\t\trgdOutput[i][0]=dLat;\n\t\t\trgdOutput[i][1]=dLng;\n\t\t}\n\t\t\t\n\t\t//returning result\n\t\treturn rgdOutput;\t\n\t}", "public Pair getRandomPair() {\n Shirt shirt = getRandomShirt();\n Trouser trouser = getRandomTrouser();\n\n if (trouser != null && shirt != null)\n return new Pair(shirt, trouser);\n else {\n return null;\n }\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "private void initializeShippingPoints() {\n shipping_points = new ShippingPoint[num_shipping_points];\n \n int x_size = 8;\n int y_size = 8;\n int[][] grid = new int[x_size][y_size]; //keeps track of which locations are taken\n //so no two ShippingPoints have the same location\n \n int x = 0;\n int y = 0;\n \n for(int i = 0; i < num_shipping_points; i++)\n {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n while(grid[x][y] != 0) {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n }\n grid[x][y] = 1;\n if(i % 4 == 0) { //be careful -- probably won't work in the general case\n Supplier supplier = new Supplier(x, y, i);\n shipping_points[i] = supplier;\n }\n else {\n Customer customer = new Customer(x, y, i);\n shipping_points[i] = customer;\n }\n }\n \n if(eight_shipping_points) {\n //for 8 shipping points\n shipping_points[0].setPosition(4, 0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(8, 4);\n shipping_points[3].setPosition(8, 8);\n shipping_points[4].setPosition(4, 8);\n shipping_points[5].setPosition(0, 8);\n shipping_points[6].setPosition(0, 4);\n shipping_points[7].setPosition(0, 0);\n }\n \n else {\n //for 20 shipping points\n /**/shipping_points[0].setPosition(4,0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(12, 0);\n shipping_points[3].setPosition(16, 0);\n shipping_points[4].setPosition(20, 0);\n shipping_points[5].setPosition(20, 4);\n shipping_points[6].setPosition(20, 8);\n shipping_points[7].setPosition(20, 12);\n shipping_points[8].setPosition(20, 16);\n shipping_points[9].setPosition(20, 20);\n shipping_points[10].setPosition(16, 20);\n shipping_points[11].setPosition(12, 20);\n shipping_points[12].setPosition(8, 20);\n shipping_points[13].setPosition(4, 20);\n shipping_points[14].setPosition(0, 20);\n shipping_points[15].setPosition(0, 16);\n shipping_points[16].setPosition(0, 12);\n shipping_points[17].setPosition(0, 8);\n shipping_points[18].setPosition(0, 4);\n shipping_points[19].setPosition(0, 0);/**/\n }\n \n displayShippingPoints();\n }", "Coordinate createCoordinate();", "public PrivatePublicTuple generateKeyPair() {\n try {\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom secureRandom = generateNewSecureRandom();\n keyPairGenerator.initialize(PRIVATE_KEY_LENGTH, secureRandom);\n KeyPair pair = keyPairGenerator.generateKeyPair();\n PrivateKey privateKey = pair.getPrivate();\n PublicKey publicKey = pair.getPublic();\n return new PrivatePublicTuple(getDEREncodingFromPrivateKey(privateKey), getDEREncodingFromPublicKey(publicKey));\n } catch (Exception e) {\n LOG.error(\"There was an error generating key pair: \", e);\n }\n return null;\n }", "public static void generateSeedData()\n\t{\n\t\teventIDCounter = 1; //set counter for ID of events to 1\n\t\t\n\t\t// generate the grid world\n\t\tfor(int i = 0; i <= (MAX_COORDS*2); i++)\n\t\t{\n\t\t\tfor(int j = 0; j <= (MAX_COORDS*2); j++)\n\t\t\t{\n\t\t\t\tgridWorld[i][j] = new Coordinate(i-MAX_COORDS,j-MAX_COORDS);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Assumption that there will be 1 event to every 10 coordinates\n\t\t// grid of 21*21=441, 441/10=44\n\t\tint numOfEvents = ((MAX_COORDS*2)+1)*((MAX_COORDS*2)+1)/10;\n\t\tEvent newEvent;\n\t\tint newXCoord;\n\t\tint newYCoord;\n\t\tTicket ticket;\n\t\tArrayList<Ticket> tickets;\n\t\t\n\t\tfor(int i = 1; i <= numOfEvents; i++)\n\t\t{\n\t\t\t// create random coordinates for new event\n\t\t\tnewXCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\tnewYCoord = rand.nextInt(MAX_COORDS + 1 +MAX_COORDS) -MAX_COORDS;\n\t\t\t\n\t\t\tnewEvent = new Event(i, gridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS], \"Event \"+String.format(\"%03d\", i)); \n\t\t\t\n\t\t\t//create a random number of tickets between 0 and 5\n\t\t\ttickets = new ArrayList<Ticket>(); // clear all tickets in the arraylist\n\t\t\tfor(int j = 0; j < 4; j++)\n\t\t\t{\n\t\t\t\tint num = rand.nextInt(5000 - 1000) +1000; // create price in cents, from $10 to $50 \n\t\t\t\tdouble price = num/100.0; // convert to double\n\t\t\t\tticket = new BasicTicket((new BigDecimal(price)).setScale(2, RoundingMode.CEILING));\n\t\t\t\ttickets.add(ticket);\n\t\t\t}\n\t\t\tnewEvent.setTickets(tickets);\n\t\t\t\t\n\t\t\t// set the grid coordinate to have this event\n\t\t\tgridWorld[newXCoord+MAX_COORDS][newYCoord+MAX_COORDS].setEvent(newEvent);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Add a couple of events hard coded first for testing\n\t\t/*Event newEvent1 = new Event(gridWorld[18][20], \"Event 001\"); //distance of 18 from 0,0\n\t\tgridWorld[18][20].setEvent(newEvent1);\n\t\t\n\t\tEvent newEvent2 = new Event(gridWorld[9][10], \"Event 002\"); //distance of 1 from 0,0\n\t\tgridWorld[9][10].setEvent(newEvent2);\n\t\t\n\t\tEvent newEvent3 = new Event(gridWorld[8][5], \"Event 003\"); //distance of 7 from 0,0\n\t\tgridWorld[8][5].setEvent(newEvent3);\n\t\t\n\t\tEvent newEvent4 = new Event(gridWorld[10][14], \"Event 004\"); //distance of 4 from 0,0\n\t\tgridWorld[10][14].setEvent(newEvent4);\n\t\t\n\t\tEvent newEvent5 = new Event(gridWorld[10][11], \"Event 005\"); //distance of 1 from 0,0\n\t\tgridWorld[10][11].setEvent(newEvent5);\n\t\t\n\t\tEvent newEvent6 = new Event(gridWorld[5][10], \"Event 006\"); //distance of 5 from 0,0\n\t\tgridWorld[5][10].setEvent(newEvent6);\n\t\t\n\t\tEvent newEvent7 = new Event(gridWorld[11][12], \"Event 007\"); //distance of 3 from 0,0\n\t\tgridWorld[11][12].setEvent(newEvent7);\n\t\t\n\t\tEvent newEvent8 = new Event(gridWorld[0][0], \"Event 008\"); //distance of 20 from 0,0\n\t\tgridWorld[0][0].setEvent(newEvent8);*/\n\t\t\n\t\t\n\t\t\n\t}", "private Point getRandomMiniPoint()\n {\n Random r = new Random();\n\n // Random x value\n int minX = 0;\n int x = 0;\n int maxX = findViewById(R.id.the_canvas).getWidth() - ((GameBoard)findViewById(R.id.the_canvas)).getMiniSpriteWidth();\n x = r.nextInt(maxX-minX+1)+minX;\n\n // Start at the top\n int y = 0;\n\n return new Point (x,y);\n }", "private Vector3 randomLocationDolphin() {\n\t\tVector3 center = this.getEngine().getSceneManager().getRootSceneNode().getLocalPosition();\n\t\tVector3 randomPosition;\n\t\tfloat[] randomFloat;\n\t\tdo {\n\t\t\trandomFloat = randomFloatArray(1000);\n\t\t\trandomPosition = Vector3f.createFrom(randomFloat[0], 0.0f, randomFloat[2]);\n\t\t} while (distanceFrom(center, randomPosition) < 420f);\n\t\treturn randomPosition;\n\t}", "private GlobeAccessPointRecord getRandomGAP()\n {\n int n = _random.nextInt();\n\n if (n < 0) {\n n *= -1;\n }\n\n return _gapList.get(n % _gapList.size());\n }", "private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }", "static void printRandomCoordinate(double X_MIN, double X_MAX, double Y_MIN, double Y_MAX) {\n double randomX = X_MIN + (Math.random() * (X_MAX - X_MIN + 1));\n double randomY = Y_MIN + (Math.random() * (Y_MAX - Y_MIN + 1));\n \n // Create a point instance with a random coordinate\n Point p = new Point(randomX, randomY);\n \n // Output\n if (!isValidPoint(p, X_MIN, X_MAX, Y_MIN, Y_MAX)) {\n System.out.print(\"Invalid point: \");\n }\n \n System.out.printf(\"(%.1f, %.1f) %n\", randomX, randomY);\n }", "private double[] generateRandomCentroid(double minLat, double maxLat, double minLon, double maxLon) {\n Random r = new Random();\n double randomLat = minLat + (maxLat - minLat) * r.nextDouble();\n double randomLon = minLon + (maxLon - minLon) * r.nextDouble();\n\n double[] centroid = new double[2];\n centroid[0] = randomLat;\n centroid[1] = randomLon;\n\n return centroid;\n }", "private long getRandomDestination() {\n long randomId;\n do {\n randomId = nextLong(aggregateVertices);\n } while (!destVertices.add(randomId));\n return randomId;\n }", "public static Point generateInputOrOutput(char[][] maze) {\r\n\t\tPoint point = new Point();\r\n\r\n\t\tswitch (generateDirection()) {\r\n\t\tcase DOWN:\r\n\t\t\tpoint.setLocation(maze.length - 1, 1 + random.nextInt(maze.length - 2));\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tpoint.setLocation(1 + random.nextInt(maze.length - 2), maze.length - 1);\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tpoint.setLocation(0, 1 + random.nextInt(maze.length - 2));\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tpoint.setLocation(1 + random.nextInt(maze.length - 2), 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn point;\r\n\t}", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "public Location getRandomLocation(ArenaWorld world, ArenaAnimal animal, List<Location> locations) {\n int HIGH = locations.size();\n int randomIndex = 0;\n Random randomize = new Random();\n if (HIGH > 0) {\n randomIndex = randomize.nextInt(HIGH);\n return locations.get(randomIndex);\n }\n return animal.getLocation();\n }", "public void assignPoint(Person person, String cityName) {\n List<Place> zipsForCity;\n\n if (cityName == null) {\n int size = zipCodes.keySet().size();\n cityName = (String) zipCodes.keySet().toArray()[person.randInt(size)];\n }\n zipsForCity = zipCodes.get(cityName);\n\n if (zipsForCity == null) {\n zipsForCity = zipCodes.get(cityName + \" Town\");\n }\n\n Place place;\n if (zipsForCity != null && zipsForCity.size() == 1) {\n place = zipsForCity.get(0);\n } else if (zipsForCity != null) {\n String personZip = (String) person.attributes.get(Person.ZIP);\n if (personZip == null) {\n place = zipsForCity.get(person.randInt(zipsForCity.size()));\n } else {\n place = zipsForCity.stream()\n .filter(c -> personZip.equals(c.postalCode))\n .findFirst()\n .orElse(zipsForCity.get(person.randInt(zipsForCity.size())));\n }\n } else {\n // The place doesn't exist for some reason, pick a random location...\n String key = (String) zipCodes.keySet().toArray()[person.randInt(zipCodes.keySet().size())];\n place = zipCodes.get(key).get(person.randInt(zipCodes.get(key).size()));\n }\n\n if (place != null) {\n // Get the coordinate of the city/town\n Point2D.Double coordinate = new Point2D.Double();\n coordinate.setLocation(place.coordinate);\n // And now perturbate it slightly.\n // Precision within 0.001 degree is more or less a neighborhood or street.\n // Precision within 0.01 is a village or town\n // Precision within 0.1 is a large city\n double dx = person.rand(-0.05, 0.05);\n double dy = person.rand(-0.05, 0.05);\n coordinate.setLocation(coordinate.x + dx, coordinate.y + dy);\n person.attributes.put(Person.COORDINATE, coordinate);\n }\n }", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "public String generateRandomLoc(double curLon, double curLat, double num, double r, Context mapsContext) {\r\n myDB = new DBHelper(mapsContext);\r\n boolean locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"finding data available in db or not\");\r\n //Method to find weather there was a previous record of fake locations.\r\n locationsFromDB = getLocationsFrom(curLat, curLon, num);\r\n r = r * 1609.34;\r\n //Condition if there was no previous record\r\n if(!locationsFromDB) {\r\n //Method to generate fake locations\r\n locationValues = findRandomLocations(curLat, curLon, num, r );\r\n Log.d(\"Detailed Analysis\",\"Going to save location values in sqllite db\");\r\n //calling insertLocations in DBHelper class to insert the generated fake locations into db for further use\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,locationValues, condChoice ,false);\r\n Cursor rs = myDB.getData(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0, num);\r\n rs.moveToFirst();\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\",\"Recent number value from !locationsFromDB: \"+ number);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n else{\r\n locationValues = locationValues+\"\";\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db\");\r\n double num1;\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n num1 = valuesArray.length;\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num1,locationValues, condChoice, false);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n //Condition to check if the requested fake locations count was greater than the previous request\r\n if(num > number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were higher than previous request\");\r\n Log.d(\"Detailed Analysis\",\"Generating new random locations\");\r\n String temp = locationValues;\r\n locationValues = \"\";\r\n //generating new fake locations for the extra count\r\n temp = temp + findRandomLocations(curLat, curLon, num - number, r);\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db after adding new random locations\");\r\n //updating the previous record with new fake locations count\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,temp, condChoice, true);\r\n locationValues = temp;\r\n }\r\n //Condition to check if the requested fake locations count was less than the previous request\r\n if(num < number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were lesser than previous request\");\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n String temp = \"\";\r\n //trimmig the fake locations count to the requested number\r\n for(int i = 0; i < num; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n temp = temp + Double.parseDouble(pointsArray[0]) + \",\" + Double.parseDouble(pointsArray[1]) + \":\" + \"\" ;\r\n }\r\n locationValues = temp;\r\n Log.d(\"Detailed Analysis\",\"Location values when reduced fake locations count to \"+num + \": \"+ locationValues);\r\n }\r\n Log.d(\"Detailed Analysis: \", \"number before returning locations: \"+ number);\r\n return locationValues;\r\n }", "public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}", "static Place getRandomPlace()\r\n\t{\r\n\t\tPlace randomPlace = knownPlaces.get( new Random().nextInt ( knownPlaces.size()));\r\n\t\treturn randomPlace;\r\n\t}", "private static void spawnAtRandomLocation(World world, GameObject gameObject) {\n spawnAtRandomLocation(world, gameObject, 0.5);\n }", "private static Point[] generateRandomPointArray(final int quantity) {\n\t\tfinal int min = -200;\n\t\tfinal int max = 200;\n\t\tfinal Random random = new Random();\n\t\tPoint[] pointArray = new Point[quantity];\n\t\t\n\t\tSystem.out.println(\"Using \" + quantity + \" of random co-linear points.\");\n\t\t\n\t\tfor(int i = 0; i < quantity; i++) {\n\t\t\tint x = random.nextInt(max + 1 - min) + min;\n\t\t\tint y = random.nextInt(max + 1 - min) + min;\n\t\t\tpointArray[i] = new Point(x, y);\n\t\t}\n\t\t\n\t\treturn pointArray;\n\t}", "public Point2D getRandomNodeLocation() {\n int validNum = 0;\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n validNum++;\n }\n }\n int randomIndex = RandomEnhanced.randInt(0,validNum-1);\n\n for (GraphNode graphNode : nodeVector) {\n if (graphNode.isValid()){\n if (randomIndex==0) return ((NavNode)graphNode).getPosition();\n randomIndex--;\n }\n }\n return null;\n }", "public static int generateRandom(int left,int right)\n\t{\n\t\tRandom random = new Random();\n\t\tint gap = right -left + 1;\n\t\treturn random.nextInt(Integer.MAX_VALUE)%gap + left;\n\t}", "private Point3D getRandomSolarPoint(final int radius)\n \t{\n \t\t// Might want to change the min/max values here\n \t\tPoint3D point = null;\n \t\twhile (point == null || isOccupied(point, radius)) {\n \t\t\tpoint = new Point3D(MathUtils.getRandomIntBetween(-500, 500), MathUtils.getRandomIntBetween(-500, 500),\n \t\t\t\t\tMathUtils.getRandomIntBetween(-500, 500));\n \t\t}\n \t\treturn point;\n \t}", "public static Address buildRandomAddress() {\n\t\tString randomCountry = Locale.getISOCountries()[randInt(0, Locale.getISOCountries().length - 1)];\n\t\tString postalCode = String.valueOf(randInt(10000, 99999));\n\t\tString streetName = PersonalInfoGenerator.generateOrcName() + \" Street\";\n\t\tString streetNumber = String.valueOf(randInt(1, 500));\n\t\tString city = PersonalInfoGenerator.generateOrcName() + \" City\";\n\t\treturn Address.builder().city(city).country(randomCountry).postalCode(postalCode).streetName(streetName)\n\t\t\t\t.streetNumber(streetNumber).formattedAddress(streetNumber + \" \" + streetName + \", \" + postalCode + \" \"\n\t\t\t\t\t\t+ city + \", \" + new Locale(\"\", randomCountry).getDisplayCountry())\n\t\t\t\t.build();\n\t}", "public static int weaponSpawnLocation(int cellCount)\r\n\t{\r\n\t\tRandom rng = new Random ();\t\r\n\t\treturn rng.nextInt(cellCount);\r\n\t}", "Point createPoint();", "void rndSwapTwo() {\r\n\t\t// index 0 has the start city and doesn't change\r\n\t\t// hence the random#s are from 1 onwards\r\n\t\trndSwapTwo(1, this.length());\r\n\t}", "public EarthGeometry(int iRandomSeed){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(iRandomSeed);\n\t}", "public void generateEnd(World world, Random random, int x, int y){\n\t}", "public RandomPointGenerator(int width, int height) {\n\t\tmaxX = width;\n\t\tmaxY = height;\n\t}", "private KeyPair generateKeyPair() {\n try {\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n keyGen.initialize(2048, random);\n return keyGen.generateKeyPair();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n }\n return null;\n }" ]
[ "0.75231075", "0.69491094", "0.694072", "0.67448145", "0.65985906", "0.6498333", "0.64461964", "0.6398474", "0.6366384", "0.6357596", "0.63005674", "0.6287762", "0.62665343", "0.6224475", "0.62125826", "0.6202901", "0.6110602", "0.6065411", "0.6035545", "0.6031298", "0.602617", "0.5997869", "0.5960284", "0.5957725", "0.59516084", "0.5920059", "0.5899793", "0.58983064", "0.5876744", "0.5867811", "0.58609474", "0.58534193", "0.5839152", "0.5829338", "0.58215094", "0.5804627", "0.5773242", "0.5757446", "0.5753659", "0.5722498", "0.56819856", "0.567369", "0.56621367", "0.5657448", "0.5591008", "0.55879974", "0.5565784", "0.55612934", "0.5538427", "0.55357033", "0.55255735", "0.55217445", "0.5520742", "0.55180746", "0.5496038", "0.5484036", "0.5482976", "0.5482966", "0.5473871", "0.5470332", "0.547003", "0.54677695", "0.54438126", "0.5435353", "0.54229534", "0.54216063", "0.5421598", "0.54208016", "0.54136187", "0.5408032", "0.5402437", "0.53894246", "0.5386123", "0.5369783", "0.5344762", "0.5325749", "0.5322622", "0.5316682", "0.53106594", "0.5292693", "0.5278927", "0.5258199", "0.5248712", "0.52458465", "0.520925", "0.5203181", "0.51911443", "0.51896644", "0.5183184", "0.518307", "0.51804703", "0.5168593", "0.516455", "0.51482755", "0.5145986", "0.5140921", "0.5140227", "0.5137807", "0.51323956", "0.5131185" ]
0.6908822
3
Get All Indices Name
private void listAllIndices(Client client){ try { String[] indexList = client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().concreteAllIndices(); System.out.println("Index List Size size : " + indexList.length); for (String index : indexList) { System.out.println("Index Name " + index); deleteIndex(client,index); } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getAlternateIndexNames() \n {\n if (!this.hasAlternateIndexes()) {\n return null;\n } else {\n return this.altIndexMap.keyArray(String.class);\n }\n }", "public String getIndexName() {\n return indexName;\n }", "public String getName() {\n return _index.getName();\n }", "public int nameIndex();", "static String composeIndexName() {\n\t\treturn TYPE.toLowerCase();\n\t}", "public String getName() {\n\t\tInteger inicio = indices.elementAt(0);\n\t\tInteger fin = (indices.size() > 1 ? indices.elementAt(1) : contenido.length());\n\t\treturn contenido.substring(inicio, fin-1);\n\t}", "String getPrimaryKeyNames(int index);", "public String getIndexingName()\n {\n return mcVersion.name() +'-'+ name;\n }", "@SuppressWarnings( \"unchecked\" )\n public List<String> getIndexedNames() {\n List<Employment> employments = getQueryService().findAllEmploymentsWithKnownActors();\n if ( indexedOn.equals( ACTORS ) ) {\n return (List<String>) CollectionUtils.collect(\n employments,\n new Transformer() {\n public Object transform( Object obj ) {\n return ( (Employment) obj ).getActor().getLastName();\n }\n } );\n } else if ( indexedOn.equals( ROLES ) ) {\n return (List<String>) CollectionUtils.collect(\n CollectionUtils.select(\n employments,\n new Predicate() {\n public boolean evaluate( Object obj ) {\n return ( (Employment) obj ).getJob() != null;\n }\n } ),\n new Transformer() {\n public Object transform( Object obj ) {\n return ( (Employment) obj ).getJob().getRole().getName();\n }\n\n } );\n } else if ( indexedOn.equals( ORGANIZATIONS ) ) {\n return (List<String>) CollectionUtils.collect(\n CollectionUtils.select(\n employments,\n new Predicate() {\n public boolean evaluate( Object obj ) {\n return ( (Employment) obj ).getOrganization() != null;\n }\n } ),\n new Transformer() {\n public Object transform( Object obj ) {\n return ( (Employment) obj ).getOrganization().getName();\n }\n\n } );\n } else if ( indexedOn.equals( LOCATIONS ) ) {\n return (List<String>) CollectionUtils.collect(\n CollectionUtils.select(\n employments,\n new Predicate() {\n public boolean evaluate( Object obj ) {\n return ( (Employment) obj ).getOrganization() != null\n && ( (Employment) obj ).getOrganization().getLocation() != null;\n }\n } ),\n new Transformer() {\n public Object transform( Object obj ) {\n return ( (Employment) obj ).getOrganization().getLocation().getName();\n }\n\n } );\n } else {\n throw new IllegalStateException( \"Can't index on \" + indexedOn );\n }\n }", "public int getNameIndex() {\n\t\treturn nameIndex & 0xffff;\n\t}", "public String getName(){\n StringBuilder name = new StringBuilder();\n for (int value : names) {\n name.append(\"> \").append(strings.get(value));\n }\n return name.toString();\n }", "String indexFormat();", "public String getFromIndexName() {\n return fromIndexName;\n }", "public static String generateEsIndex() {\n return new Generex(PatternValidator.ESINDEX_PATTERN).random();\n }", "java.util.List<Index>\n getIndicesList();", "public String index() {\r\n\t\treturn \"index\";\r\n\t}", "public String getIndex() {\n\t\treturn index;\n\t}", "public String getIndex() {\n\t\treturn index;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn index.toString();\n\t}", "private static String getIndex() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(App.getAppContext());\n String defaultValue = Strings.getStringByRId(R.string.c_elastic_search_index_name_default_value);\n String value = Strings.getStringByRId(R.string.c_select_elastic_search_index_name);\n String index = sp.getString(value, defaultValue);\n return index;\n }", "Index getIndices(int index);", "@VTID(10)\n int getIndex();", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public List<Index> getIndexes();", "public String getPrimaryKeyNames(int index) {\n return primaryKeyNames_.get(index);\n }", "public boolean qualifyIndexName() {\n \t\treturn true;\n \t}", "public String getIndex() {\n return index;\n }", "public String toString() {\r\n return TextFormat.getInstance(Index.class).formatToString(this);\r\n }", "@Override\n public java.util.List<Index> getIndicesList() {\n return indices_;\n }", "public int[] getIndices() {\r\n\t\treturn indices;\r\n\t}", "public String getPrimaryKeyNames(int index) {\n return primaryKeyNames_.get(index);\n }", "public String getIndName() {\r\n return indName;\r\n }", "public String[] getNames() {\n Enumeration namesEnum = keys();\n String[] namesArray = new String[size()];\n for (int i = 0; i < size(); i++) {\n namesArray[i] = (String) namesEnum.nextElement();\n }\n return namesArray;\n }", "@DISPID(10) //= 0xa. The runtime will prefer the VTID if present\r\n @VTID(17)\r\n java.lang.String[] getNames();", "public java.lang.String getResourceNames(int index) {\n return resourceNames_.get(index);\n }", "public String getNames(int i) {\n return topName.get(i);\n }", "public java.lang.String getResourceNames(int index) {\n return resourceNames_.get(index);\n }", "public abstract String[] names() throws TrippiException;", "public java.util.List<Index.Builder>\n getIndicesBuilderList() {\n return getIndicesFieldBuilder().getBuilderList();\n }", "public String getIndexedAuctions() {\n\t\tList<Auction> temp = myAuctionCalendar.getListOfAuctions();\n\t\tStringBuilder toReturn = new StringBuilder();\n\t\tfor (int i = 0; i < temp.size(); i++) {\n\t\t\ttoReturn.append(i + 1);\n\t\t\ttoReturn.append(\". \");\n\t\t\ttoReturn.append(temp.get(i).getMyName());\n\t\t\ttoReturn.append(\"\\n\");\n\t\t}\n\t\treturn toReturn.toString();\n\t}", "public String getName(int idx) {\n\t\treturn (String) nvPairs.get(idx << 1);\n\t}", "public static String[] names() {\n return ListableValuesHelper.names(LogicalFragmentBenchmarked.values());\n }", "public synchronized String getUserIndex() {\r\n StringBuilder builder = new StringBuilder(512);\r\n builder.append(userIndexOpenTag);\r\n for (String ref : this.user2ref.values()) {\r\n builder.append(ref);\r\n }\r\n builder.append(userIndexCloseTag);\r\n return builder.toString();\r\n }", "public java.util.List<Index> getIndicesList() {\n if (indicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(indices_);\n } else {\n return indicesBuilder_.getMessageList();\n }\n }", "@Schema(description = \"Display name for this index type\")\n\tpublic String getName() {\n\t\treturn name;\n\t}", "public String toString(){\n\t\treturn String.format(\"%d: %s\", index, name);\n\t}", "public int getNameIndex() {\n\t\treturn nameIndex;\n\t}", "public String[] getNames() {\r\n\t\treturn this.context.getNames();\r\n\t}", "public String getIndex() {\n return this.index;\n }", "public Set<String> getSingleIndices() {\n Set<String> singleIndices = new HashSet<>();\n for (String index : indices) {\n if (index.contains(\",\")) {\n Collections.addAll(singleIndices, index.split(\",\"));\n } else {\n singleIndices.add(index);\n }\n }\n return singleIndices;\n }", "public\tString\ttoString()\n {\n // Do not put this under SanityManager.DEBUG - it is needed for\n // error reporting.\n return \"CREATE INDEX \" + indexName;\n }", "public String getToIndexName() {\n return toIndexName;\n }", "IndexNameReference createIndexNameReference();", "public String[] getKeyNames() \n {\n DBField f[] = this.getKeyFields();\n String kn[] = new String[f.length];\n for (int i = 0; i < f.length; i++) {\n kn[i] = f[i].getName();\n }\n return kn;\n }", "public String[] getItemNames();", "private String nextIndex() {\n return ArrayElement.nameFor(myElements.size());\n }", "java.lang.String getDeployedIndexId();", "public String[] getNames() {\r\n\t\tfinal List<String> names=new ArrayList<>();\r\n\r\n\t\tString s;\r\n\t\tfor (Map.Entry<String,Map<String,Object>> entry1: data.entrySet()) {\r\n\t\t\ts=entry1.getKey();\r\n\t\t\tif (names.indexOf(s)<0) names.add(s);\r\n\t\t\tfor (Map.Entry<String,Object> entry2: entry1.getValue().entrySet()) {\r\n\t\t\t\ts=entry2.getKey();\r\n\t\t\t\tif (names.indexOf(s)<0) names.add(s);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn names.toArray(new String[0]);\r\n\t}", "String getIndexedCommunities(int index);", "public Collection getESBComponentNames()\n {\n \treturn( getFrameworkXMLParser().getAttributesForEachOccurance( \"component\", \"name\" ) );\n }", "public String name()\n {\n\tint index = indexOf();\n\treturn (index < 0 || index >= 16 || cConstantNameList == null) ? null : cConstantNameList[index];\n }", "public List<Index> getIndexes() {\n\t\tList<Index> indexes = new ArrayList<>();\n\t\tfor (Registration reg : registrations) {\n\t\t\tindexes.add(reg.getIndex());\n\t\t}\n\t\treturn indexes;\n\t}", "public String indexStr(int index) {\n\t\tif (index == TYPE_ANY) return \"*\";\n\t\tif (index == TYPE_ALL) return \"ALL\";\n\t\treturn Integer.toString(index);\n\t}", "public String[] getNames() {\n\t\tString[] names = new String[functions.size()];\n\t\tint index = 0;\n\t\tfor (Enumeration en = functions.keys(); en.hasMoreElements(); index++) {\n\t\t\tnames[index] = (String) en.nextElement();\n\t\t}\n\t\treturn names;\n\t}", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType getGeneralNameArray(int i);", "public static String[] getNames() {\n String[] res = new String[crossbows.length];\n for (int i = 0; i < crossbows.length; i++) {\n res[i] = (String)crossbows[i][2];\n }\n return res;\n }", "@Override\r\n\t\tpublic String[] getAllObjectsName() throws Exception {\n\t\treturn null;\r\n\t\t//未实现\r\n\t}", "public String toString() {\r\n return Integer.toString(index);\r\n }", "public String[][] getNames () ;", "int getIndicesCount();", "public List<String> getExchangeIndexes();", "public String getIndexColumn() {\n return \"id\";\n }", "public ArrayList<Integer> getIndices(String tName) {\n ArrayList<Integer> indices = new ArrayList<>();\n\n for (int i = 0; i < fromTables.size(); i++) {\n Pair<String, String> nameAliasPair = fromTables.get(i);\n if (nameAliasPair.second().equals(tName) || nameAliasPair.first().equals(tName)) {\n indices.add(i);\n }\n }\n\n return indices;\n }", "public com.google.protobuf.ByteString\n getResourceNamesBytes(int index) {\n return resourceNames_.getByteString(index);\n }", "private int[] getIndexes(String name) {\n int[] indexes = (int[]) indexMap.get(name);\n if (indexes == null) {\n throw new IllegalArgumentException(\"Parameter not found: \" + name);\n }\n return indexes;\n }", "public Set<String> keySet() {\n return index.keySet();\n }", "public static Enumeration getNames() \n {\n return frequency.keys();\n }", "private String getTypeName(int idx){\r\n String[] types = {\"C-SVC\",\"nu-SVC\",\"one-class SVM\",\"epsilon-SVR\",\"nu-SVR\"};\r\n return types[idx];\r\n }", "public String createSimpleIndexName(ColumnModel column) {\r\n\t\treturn \"I\" + column.getTable().getName() + column.getName();\r\n\t}", "public int getIndex()\n {\n return getInt(\"Index\");\n }", "com.google.protobuf.ByteString\n getPrimaryKeyNamesBytes(int index);", "char[][] getInterfaceNames();", "@Override\n\tpublic String getName() {\n\t\treturn BaseIncIndexProcessor.class.getSimpleName();\n\t}", "protected char[] indexEntryPrefix() {\n\tif (this.simpleName == null) // Optimization, eg. type reference is 'org.eclipse.jdt.core.*'\n\t\treturn indexEntryPrefix(REF, this.segments[this.currentSegment]);\n\n\treturn indexEntryPrefix(this.currentTag, this.simpleName);\n}", "public TreeSet<String> getIndex() {\n\t\treturn index;\n\t}", "public List<String> toNames(List<Object> indices) throws IllegalArgumentException {\n\t\tList<String> result = new ArrayList<String>();\n\t\tfor (Object index: indices) {\n\t\t\tif (index instanceof Integer)\n\t\t\t\tresult.add(this.get((Integer) index).getName());\n\t\t\telse if (index instanceof String)\n\t\t\t\tresult.add((String) index);\n\t\t\telse\n\t\t\t\tthrow new IllegalArgumentException(\"Expecting Integer or String, got \" + index.getClass());\n\t\t}\n\t\t\t\n\t\treturn result;\n\t}", "java.lang.String getValues(int index);", "public final List<Integer> getIndexList() {\r\n return this.indices;\r\n }", "public String getName(int index)\n {\n return getQName(index);\n }", "protected List<ColumnDef> getIndexes() throws IOException\n {\n CfDef cfdef = getCfDef(loadSignature);\n List<ColumnDef> indexes = new ArrayList<ColumnDef>();\n for (ColumnDef cdef : cfdef.column_metadata)\n {\n if (cdef.index_type != null)\n indexes.add(cdef);\n }\n return indexes;\n }", "public Set<String> getNames() {\n\t\t//\t\tArrayList<String> names = new ArrayList<String>();\n\t\t//\t\tfor (NameSSA n : name.values())\n\t\t//\t\t\tnames.add(n.current());\n\t\treturn name.keySet();\n\t}", "public int index();", "public String[] getColumnNames();", "public Set<String> keySet() {\n return this.index.keySet();\n }", "public String getNumIndexed() {\n\t\treturn Integer.toString(getIndex().getNumDocs(\"collection:0\" + getKey()));\n\t}", "private String calcIndexName(NamePool pool, \n String fingerName,\n List definitions,\n Configuration config) \n {\n StringBuffer sbuf = new StringBuffer();\n sbuf.append(\"key|\" + fingerName);\n for (int k = 0; k < definitions.size(); k++) \n {\n KeyDefinition def = (KeyDefinition)definitions.get(k);\n \n // Capture the match pattern.\n String matchStr = def.getMatch().toString();\n sbuf.append(\"|\" + Long.toString(Hash64.hash(matchStr), 16));\n \n // Capture the 'use' expression\n if (def.getUse() instanceof Expression) \n {\n // Saxon likes to dump debug stuff to a PrintStream, and we need to\n // capture to a buffer.\n //\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(bytes);\n \n ((Expression)def.getUse()).display(10, ps, config);\n ps.flush();\n String useStr = bytes.toString();\n sbuf.append(\"|\" + Long.toString(Hash64.hash(useStr), 16));\n }\n else\n sbuf.append(\"|non-exp\");\n } // for k\n \n return sbuf.toString();\n }", "public String[] getOutputNames()\n\t{\n\t\treturn _outputNames;\n\t}", "public com.google.protobuf.ByteString\n getResourceNamesBytes(int index) {\n return resourceNames_.getByteString(index);\n }", "default int getIndex() {\n return meta(\"nlpcraft:nlp:index\");\n }", "public int[] getColorIndices();" ]
[ "0.71712905", "0.6950037", "0.68329996", "0.68190175", "0.6591021", "0.6542354", "0.65101075", "0.6467808", "0.62482613", "0.6203251", "0.61665165", "0.61481655", "0.61047477", "0.6102304", "0.606682", "0.6059082", "0.5975478", "0.5975478", "0.59625095", "0.5949946", "0.58923894", "0.58918995", "0.5887953", "0.58736634", "0.58679676", "0.5866949", "0.58579314", "0.58238846", "0.5820821", "0.58191204", "0.5811423", "0.5800327", "0.57947385", "0.5790897", "0.5783473", "0.57499135", "0.5749375", "0.5734993", "0.5734046", "0.5732246", "0.57012457", "0.5691839", "0.56851995", "0.5684623", "0.5683217", "0.5682048", "0.56704634", "0.5664254", "0.56616634", "0.5638362", "0.5617732", "0.5598898", "0.5591241", "0.55691445", "0.55670506", "0.5553812", "0.55505925", "0.5530681", "0.5524578", "0.55243236", "0.55120987", "0.5510393", "0.550911", "0.55047566", "0.550172", "0.5498669", "0.5490951", "0.5484094", "0.548273", "0.54813755", "0.54729664", "0.5469827", "0.54693156", "0.54659617", "0.5465362", "0.5458997", "0.54584384", "0.54581356", "0.5454977", "0.5445678", "0.5439098", "0.54387355", "0.54328376", "0.5430007", "0.542553", "0.5425418", "0.54228735", "0.5419177", "0.5414149", "0.54098773", "0.5407226", "0.54057455", "0.54053307", "0.5399919", "0.53869975", "0.5385209", "0.5379727", "0.5377042", "0.5371992", "0.53715867" ]
0.555525
55
/ The this keyword is used to refer explicitly to current object. It is most commonly used when accessing instance variables.
public void setCurrentScore(int currentScore) { this.currentScore = currentScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getVarThisFlag() {\n\t\treturn heldObj.getVarThisFlag();\n\t}", "public Context getThis()\r\n {\r\n return this.context;\r\n }", "public void method(){\n\t\t\n\t\tint a=3;//only for this method//local variable\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(this.a);\n\t\tSystem.out.print(a+this.a);\n\t}", "@Override\n\tpublic IBasicObject getAccessedWithinVar() {\n\t\treturn heldObj.getAccessedWithinVar();\n\t}", "public static void thisMethod() {\n }", "private final T self() { return (T)this; }", "private final T self() { return (T)this; }", "public int thisC()\r\n\t{\r\n\t return thisc;\r\n\t}", "public int getX(){return this.x;}", "protected abstract T getThis();", "public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }", "public static Display getDisplay(){\r\n return THIS;\r\n }", "public static void thisDemo() {\n\t}", "public int somemethod(){\n return this.data;\n }", "public void sayHello(){\n System.out.println(\"This persons name is: \" + this.name);\n }", "d(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "private void assignment() {\n\n\t\t\t}", "public Object getLocalReference()\n {\n return m_localInstance;\n }", "public void afficher() {\n System.out.println(this.toString());\n }", "protected T self() {\n return (T) this;\n }", "int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "c(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "@Override // Runnable hat nur eine Methode => run()\n public void run() {\n System.out.println(localVariable);\n System.out.println(Excursus.this.outerAttribute);\n Excursus.this.outerMethod(localVariable);\n\n }", "public void testing() {\n\t\tprotectedInstanceVariable = \"\";\n\t}", "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "public void someMethod() {\n\t\tint localInt = ExampleDriver.counter;\n\t\t//int localInt2 = ExampleDriver.nonStaticCounter;\n\t\tExampleDriver exampleDriver = new ExampleDriver();\n\t\tint localInt2 = exampleDriver.nonStaticCounter;\n\t}", "public K get()\n {\n\treturn current.data(); \n }", "public final Object getCurrent()\n\t{\n\t\treturn getCapture();\n\t}", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "private int somemethod3(){\n return this.data;\n }", "public void o_()\r\n/* 533: */ {\r\n/* 534:539 */ this.e = true;\r\n/* 535: */ }", "void m1() {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(outer); // can access the outer CLASS context elements\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(finalVariable); // can access to the outer METHOD context elements if FINAL\n\t\t\t\t\tSystem.out.println(effectivellyFinal); // can access to the outer METHOD context elements if EFFECTIVELY FINAL\n\t\t\t\t}", "void method_5902(ahb var1) {\r\n this.field_5516 = var1;\r\n super();\r\n }", "public Question getQuestion()\n {\n return currentQuestion;\n }", "public String getVariableName() {\n return _vname;\n }", "public int getGameX(){return this.gameX;}", "public Object getThing() {\r\n\t\treturn myThing;\r\n\t}", "public void imprimir(){\n System.out.println(this);\n }", "public void get() {\n }", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "Object mo6080c() {\n return this.f2347q;\n }", "public int x() {\n\t\treturn this.x;\n\t}", "void m1() {\n //Instance area\n\n // 1.3 Call both instance variables into the instance method inside the print statement.\n\n System.out.println(a);\n System.out.println(name);\n }", "public Object get()\n {\n return m_internalValue;\n }", "public ThisKeyword(){\n this(1.0);\n }", "public KSMemberBaseAssignment assignment() {\n return assignment;\n }", "d(b bVar) {\n super(2);\n this.this$0 = bVar;\n }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public String getVar()\n {\n return var;\n }", "public void petCat(){\n this.isHungry = true;\n System.out.println(\"Purrrrr\");\n }", "public java.lang.String getObjectName(){\n return localObjectName;\n }", "public void showGarage() {\n\t\tSystem.out.println(this);\n\t}", "public void a(MinecraftKey var0) {\n/* 98 */ this.a = var0;\n/* */ }", "public PC getPC() {return _pc;}", "private OpenSimDB() {\n instance = this;\n }", "void method_6615(class_1303 var1) {\r\n this.field_6524 = var1;\r\n super();\r\n }", "public void methodThree(int var) {\n \n System.out.println(\"Method THREE Prints variable as: \" + this.var);\n }", "private T thisT() {\n @SuppressWarnings(\"unchecked\")\n T thisT = (T) this;\n return thisT;\n }", "@Override\n\t\tpublic void alive() {\n\t\t\tSystem.out.println(\"liverId is: \" + liverId); //liver id is a static variable of the Liver class, so we CAN access it directly. \n\t\t\tSystem.out.println(new Animal().age); //Just like a static method, the only way to access NON static vars here is to create an animal object, then access that age..\n\t\t}", "public int getX()\n {\n \t return _x;\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "private FanState() {\n\t\tinstance = this;\n\t}", "Var getVar();", "public void setName(String name) {\n this.name = name; // assigning a local variable value to a global variable\r\n }", "a(c cVar) {\n super(0);\n this.this$0 = cVar;\n }", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public class_1048 method_2258() {\r\n return this.field_1859;\r\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public void setX(int x) { this.x=x; }", "public int getThirdR() {\n/* 66 */ return this.thirdR;\n/* */ }", "public class_34 method_627() {\n return this.field_394;\n }", "public Name getVariable() {\n return variable;\n }", "public String getVariable()\n {\n return this.strVariable;\n }", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "public int geti(){\r\n return i;\r\n}", "public double getCurrent( )\n {\n // Implemented by student.\n }", "public Builder getThis() { return this; }", "public void method1() {\n\t\t\n\t\tname = \"Fredie\"; // this variable is inherited in class B\n\t\tthis.name = \"Lola\"; // this called the name from the classB, so 1st it was changed to Friedie and than was changed to Lola\n\t\tsuper.name = \"Alexa\"; // will actually call the variable from the class A, and in this case its value has been changed\n\t\t\n\t}", "private int getMY() {\n\t\treturn 0;\r\n\t}", "protected int somemethod2(){\n return this.data;\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public T get() {\n\t\treturn get(ModSettings.currentContext);\n\t}", "public String getName () { return this.name; }", "public int getProF() {\n/* 42 */ return this.proF;\n/* */ }", "protected abstract T self();", "protected abstract T self();", "protected abstract T self();", "public Sword getCurrentSword() {\n return currentSword;\n\t}", "public void getInfo() {\n\tSystem.out.println(\"My name is \"+ name+ \" my last name is \"+ lastName);\n\t // we can access static members within non static Method!!\n\t\n}", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "public Book getBook() \t\t{ return this.myBook; }", "public int getProT() {\n/* 78 */ return this.proT;\n/* */ }", "private OffState() {\n instance = this;\n }", "protected void initVars() {}", "ByCicle(int weight, String name) {\r\n //super keyword can be used to access the instance variables of superclass\r\n //\"super\" can also be used to invoke parent class constructor and method\r\n super(weight);//Accessign Superclass constructor and its variable\r\n //Global Variable=Local variable\r\n this.name = name;\r\n }" ]
[ "0.6382073", "0.6354727", "0.62039113", "0.62011516", "0.61825943", "0.60342777", "0.60342777", "0.6031028", "0.59565264", "0.59100866", "0.5896498", "0.5881238", "0.58795756", "0.58468837", "0.57262635", "0.5718512", "0.5715207", "0.5708338", "0.5689084", "0.56793875", "0.5657909", "0.5653595", "0.5649075", "0.56383413", "0.5632223", "0.5632223", "0.5632223", "0.5613884", "0.560144", "0.5600242", "0.55884004", "0.5581411", "0.5568941", "0.55677325", "0.5560037", "0.55582225", "0.5542561", "0.55319476", "0.5530312", "0.5530132", "0.5518616", "0.5516282", "0.5513069", "0.5502524", "0.55017525", "0.5491081", "0.54864967", "0.54842556", "0.54767567", "0.54756486", "0.5472834", "0.5465748", "0.54579693", "0.54293", "0.5427498", "0.5398291", "0.53882134", "0.53874034", "0.5378561", "0.5373106", "0.5372769", "0.53638875", "0.53571403", "0.53441465", "0.53440905", "0.53406566", "0.53406566", "0.5339679", "0.5333724", "0.5330114", "0.53264004", "0.5324772", "0.5313546", "0.53124785", "0.531212", "0.5310882", "0.53107136", "0.5309581", "0.53062683", "0.5304", "0.5301762", "0.530107", "0.5300886", "0.52915365", "0.5287502", "0.5286114", "0.52852273", "0.5284219", "0.5270867", "0.526827", "0.526746", "0.526746", "0.526746", "0.5263636", "0.5263484", "0.5259134", "0.52522033", "0.5250139", "0.5250097", "0.52476066", "0.52451104" ]
0.0
-1
Get the equation given the 3 points Setter of a,b,c
public void computeEquation() { // Curve equation of type : y = ax^2 + bx + c // OR (x*x)a + (x)b + 1c = y // ex : 50 = 4a + 2b + c where y = 50 and x = 2 and z = 1 double[][] matrice = {{Math.pow(A.getKey(),2),A.getKey(),1}, {Math.pow(B.getKey(),2),B.getKey(),1}, {Math.pow(C.getKey(),2),C.getKey(),1}}; double deter = computeSarrus(matrice); double [][] matriceA = {{A.getValue(),A.getKey(),1}, {B.getValue(),B.getKey(),1}, {C.getValue(),C.getKey(),1}}; double [][] matriceB = {{Math.pow(A.getKey(),2),A.getValue(),1}, {Math.pow(B.getKey(),2),B.getValue(),1}, {Math.pow(C.getKey(),2),C.getValue(),1}}; double [][] matriceC = {{Math.pow(A.getKey(),2),A.getKey(),A.getValue()}, {Math.pow(B.getKey(),2),B.getKey(),B.getValue()}, {Math.pow(C.getKey(),2),C.getKey(),C.getValue()}}; abc[0] = computeSarrus(matriceA) / deter; abc[1] = computeSarrus(matriceB) / deter; abc[2] = computeSarrus(matriceC) / deter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function(double a, double b, double c) {\r\n\t //y = a*(x*x) + b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n co[2]= a;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n degree[2] = 2;\r\n cindex = 3;\r\n\t}", "public static void equation(int a, int b, int c) {\n\t\tint D = b * b - 4 * a * c;\n\t\tif (D < 0) {\n\t\t\tSystem.out.println(\"There isn\\t any real roots\");\n\t\t} else {\n\t\t\tdouble x1 = (-b + Math.sqrt(D)) / (2.0 * a);\n\t\t\tdouble x2 = (-b - Math.sqrt(D)) / (2.0 * a);\n\t\t\tSystem.out.println(\"x1: \" + x1 + \" x2: \" + x2);\n\t\t}\n\t}", "private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}", "float calculate (int x){\n\n float y ;\n y = a* (float) Math.pow(x,2) + b*x +c;\n return y;\n\n }", "public void calculos() {\n a = a1+a2+a3;\n b = b1+b2+b3;\n c = c1+c2+c3;\n }", "public static double quadraticPos(double a, double b, double c) {\n\t\tdouble root1 = ((b*-1) + Math.sqrt(b*b-4*a*c))/(2*a);\r\n\t\treturn root1;\r\n\t\t\r\n\t}", "static final public double[] quadraticSolver(\r\n\t\t\tdouble a, double b, double c\r\n\t) {\r\n\t\tfinal double r = (b * b) - (4.0 * a * c);\r\n\t\tif (r < 0.0)\r\n\t\t\treturn null;\r\n\t\tfinal double q = -0.5 * (b + (Math.signum(b) * Math.sqrt(r)));\r\n\t\treturn new double[] { q / a, c / q };\r\n\t}", "public float getX2() {\r\n return (c + 2*b + 3*a)/3;\r\n }", "public double eval(double x) {\n double y;\n y = this.a * Math.pow(x, 3) + this.b * Math.pow(x, 2) + this.c * x + this.d;\n return y;\n }", "public void doCalculation(int a ,int b , int c){\r\n\t \r\n\tint finalValue = variableNumber(a)-add(b,c);\r\n\t \r\n System.out.println(finalValue);\r\n\t \r\n\t}", "public static String xIntercepts(double a, double b, double c) {\n\t\tdouble root1 = (\t(-1*b)\t+\t(sqrt\t( exponent(b, 2)\t-(4*a*c)\t)))\t/2*a;\r\n\t\tdouble root2 = (\t(-1*b)\t-\t(sqrt\t( exponent(b, 2)\t-(4*a*c)\t)))\t/2*a;\r\n\t\tif (root1 == root2) { \r\n\t\t\treturn (root1+\"\");\r\n\t\t}\r\n\t\telse return (root1 +\" and \"+root2);\r\n\t}", "public Function(double b, double c) {\r\n\t //y = b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n cindex = 2; \r\n\t}", "public abstract Point_3 evaluate(double u, double v);", "public QBezCurve(Vect a, Vect b, Vect c){\n\t\tA=a;\n\t\tB=b;\n\t\tC=c;\n\t}", "private double getValue(double x) {\n return getTextToDouble(textA) * Math.pow(x, 3) + getTextToDouble(textB)\n * Math.pow(x, 2) + getTextToDouble(textC) * x + getTextToDouble(textD);\n }", "include<math.h>\nint main()\n{\n float x1=2,y1=4,x2=10,y2=15,x3=5,y3=8;\n\n std::cin>>x1>>y1>>x2>>y2>>x3>>y3;\n float x = (x1+x2+x3)/3;\n float y = (y1+y2+y3)/3;\n std::cout<<x<<\"\\n\";\n std::cout<<y;\n}", "public void set(float x, float y, float z);", "public void linearEquation(double a, double b, double c){\n //if a = b = 0; x can be any real value\n this.a = a;\n this.b = b;\n this.c = c;\n if(a == 0 && b==0 && c==0) {\n System.out.println(\"Infinite solution\");\n\n }\n\n else {\n x = (c-b)/a;\n\n //if a = 0, x is undefined\n System.out.println(x);\n if(a==0){\n System.out.println(\"No solution\");\n }\n\n\n }\n }", "public static void quadEquation(final int a, final int b, final int c) {\n /*\n quadratic roots.\n */\n double r1;\n double r2;\n final int t = 4;\n r1 = (-b + Math.sqrt((b * b) - (t * a * c))) / (2 * a);\n r2 = (-b - Math.sqrt((b * b) - (t * a * c))) / (2 * a);\n System.out.println(r1 + \" \" + r2);\n }", "public static double somar(double a, double b, double c) {\n\t\treturn a + b + c;\r\n\t}", "private static void equationsTest() {\n }", "public double getValue( Coordinate[] controlPoints, Coordinate interpolated );", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "@Override\n public double getPerimeter() {\n return a + b + c;\n }", "public static void solve(double a, double b, double c) {\n double d = Math.pow(b, 2) - 4 * a * c;\n if (Double.isInfinite(1 / d)) {\n System.out.println(\"x1,2 = \" + (-b + Math.sqrt(d)) / (2 * a));\n } else if (d > 0) {\n System.out.println(\"x1 = \" + (-b + Math.sqrt(d)) / (2 * a));\n System.out.println(\"x2 = \" + (-b - Math.sqrt(d)) / (2 * a));\n } else {\n System.out.println(\"Error! Discriminant is less than zero!\");\n }\n }", "void drawCustomFormula(Graphics2D g2d){\r\n\t\tStaticVariableSet<Double> variables = new StaticVariableSet<Double>(); //javaluator junk\r\n\t\tArrayList<Point2D.Double> p_list= new ArrayList<Point2D.Double>();\r\n\t\tArrayList<Point3D> three_list=new ArrayList<Point3D>();\r\n\r\n\t\tfor(int i=0; i<pCanvas.iterations; i++){\r\n\r\n\t\t\tdouble theta=((double)i/1000)*2*Math.PI;\r\n\t\t\tvariables.set(\"x\", theta); //changes the variable xs value to be equal to theta\r\n\t\t\tdouble r=eval.evaluate(equation,variables); //evaluates the custom expression\r\n\t\t\tPoint3D next= new Point3D(r*Math.cos(theta), r*Math.sin(theta),0.0); //tells what point the cartesian coord is (z always zero since normally drawn on xy plane\r\n\t\t\tnext=pointRotate(next, theta); //rotates point around some axis\r\n\t\t\tthree_list.add(next);; //adds to pointlist\r\n\t\t}\r\n\t\tthree_list=CameraRotate(three_list); //rotates all points by some theta if camera is enabled\r\n\t\tutils.scalePoint3D(three_list, 100); //scales\r\n\t\tp_list=utils.convert3DPointsTo2DPoints(three_list, eye); //perspective transform\r\n\t\tdrawPointArr(g2d, p_list); //draws lines betweeen consecutive points\r\n\r\n\r\n\r\n\t}", "@Test\r\n public void test() {\r\n String[][] equations = { { \"a\", \"b\" }, { \"b\", \"c\" } },\r\n queries = { { \"a\", \"c\" }, { \"b\", \"a\" }, { \"a\", \"e\" }, { \"a\", \"a\" }, { \"x\", \"x\" } };\r\n double[] values = { 2.0, 3.0 };\r\n assertArrayEquals(new double[] { 6.0, 0.5, -1.0, 1.0, -1.0 }, calcEquation(equations, values, queries),\r\n Double.MIN_NORMAL);\r\n }", "@Override\n\tpublic double calPerimeter() {\n\t\treturn a+b+c;\n\t}", "private double threeDimensionalSolveQ1(RealMatrix u, RealMatrix v, double q3) {\r\n double u11 = u.getEntry(0, 0);\r\n double u12 = u.getEntry(0, 1);\r\n double u13 = u.getEntry(0, 2);\r\n double u22 = u.getEntry(1, 1);\r\n double u23 = u.getEntry(1, 2);\r\n double v1 = v.getEntry(0, 0);\r\n double v2 = v.getEntry(1, 0);\r\n\r\n return (((u12*v2)/(u11*u22)) - (v1/u11)) + ((((u12*u23)/(u11*u22)) - (u13/u11))*q3);\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 }", "public static void main(String[] args){\n Scanner input = new Scanner(System.in);\n int result = 0;\n\n System.out.print(\"Enter three integer number : \");\n String num = input.nextLine();\n\n String [] operand = num.split(\" \");\n int x = Integer.parseInt(operand[0]);\n int y = Integer.parseInt(operand[1]);\n int z = Integer.parseInt(operand[2]);\n\n System.out.print(\"Enter two operand : \");\n String operator = input.nextLine();\n\n String [] op = operator.split(\" \");\n String a = op[0];\n String b = op[1];\n\n int temp = 0;\n\n for(int i = 0; i< op.length; i++){\n if(a.equals(\"X\") || a.equals(\"D\") || a.equals(\"M\") || b.equals(\"X\") || b.equals(\"D\") || b.equals(\"M\")){\n\n if(a.equals(\"X\") || b.equals(\"X\")){\n if(a.equals(\"X\")){\n if(i == 0) temp = x*y;\n else result = temp * x;\n a = \"\";\n }\n else if(b.equals(\"X\")){\n if(i == 0) temp = y*z;\n else result = temp * z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"D\") || b.equals(\"D\")){\n if(a.equals(\"D\")){\n if(i==0) temp = x/y;\n else result = x/temp;\n a = \"\";\n }\n else if(b.equals(\"D\")){\n if(i == 0) temp = y/z;\n else result = temp / z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"M\") || b.equals(\"M\")){\n if(a.equals(\"M\")){\n if(i == 0)temp = x % y;\n else result = x % temp;\n a = \"\";\n }\n\n else if(b.equals(\"M\")) {\n if(i == 0) temp = y % z;\n else result = temp % z;\n b = \"\";\n }\n }\n\n } else{\n if(a.equals(\"A\")){\n if(b.equals(\"A\")) result = x+y+z;\n else if(b.equals(\"S\")) result = x+y-z;\n else result = temp + x;\n }\n\n else if(b.equals(\"A\")){\n if(a.equals(\"A\")) result = x+y+z;\n else if(a.equals(\"S\")) result = x-y+z;\n else result = temp + z;\n }\n }\n }\n System.out.println(x + \" \" + op[0] + \" \" + y + \" \" + op[1] + \" \" + z + \" = \" + result);\n\n }", "@Override\r\n\t\tpublic double value(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\treturn d + ((a - d) / (1 + Math.pow((x+e)/c, b)));\r\n\t\t}", "public void c(double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat1, float paramFloat2)\r\n/* 77: */ {\r\n/* 78: 89 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);\r\n/* 79: */ \r\n/* 80: 91 */ paramDouble1 /= f1;\r\n/* 81: 92 */ paramDouble2 /= f1;\r\n/* 82: 93 */ paramDouble3 /= f1;\r\n/* 83: */ \r\n/* 84: 95 */ paramDouble1 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 85: 96 */ paramDouble2 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 86: 97 */ paramDouble3 += this.V.nextGaussian() * 0.007499999832361937D * paramFloat2;\r\n/* 87: */ \r\n/* 88: 99 */ paramDouble1 *= paramFloat1;\r\n/* 89:100 */ paramDouble2 *= paramFloat1;\r\n/* 90:101 */ paramDouble3 *= paramFloat1;\r\n/* 91: */ \r\n/* 92:103 */ this.v = paramDouble1;\r\n/* 93:104 */ this.w = paramDouble2;\r\n/* 94:105 */ this.x = paramDouble3;\r\n/* 95: */ \r\n/* 96:107 */ float f2 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 97: */ \r\n/* 98:109 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 99:110 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f2) * 180.0D / 3.141592741012573D));\r\n/* 100:111 */ this.i = 0;\r\n/* 101: */ }", "public static double cube(int n ,int m){\r\n System.out.println(\"n :\"+n+ \" m : \" +m);\r\n double c=Math.pow(n,m);\r\n System.out.println(\"c :\" +c);\r\n return c;\r\n }", "public Point evaluate(double x, double y, double z) {\n\t\t// x=(-(yn(y-y0)+zn(z-z0))+xn*x0)/xn\n\t\tif (x != x) {\n\t\t\tx = (-(normal.y * (y - origin.y) + normal.z * (z - origin.z)) + normal.x\n\t\t\t\t\t* origin.x)\n\t\t\t\t\t/ normal.x;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (y != y) {\n\t\t\ty = (-(normal.x * (x - origin.x) + normal.z * (z - origin.z)) + normal.y\n\t\t\t\t\t* origin.y)\n\t\t\t\t\t/ normal.y;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (z != z) {\n\t\t\tz = (-(normal.y * (y - origin.y) + normal.x * (x - origin.x)) + normal.z\n\t\t\t\t\t* origin.z)\n\t\t\t\t\t/ normal.z;\n\t\t\treturn new Point(x, y, z);\n\t\t}\n\t\treturn null;\n\t}", "public double getX3AddSolution() {\n this.polyAddSolve();\n return this.x3add;\n }", "void doCalculations(){\n double out1;\n double out2;\n double out3;\n \n out1 = x + n * y - (x + n) * y;\n System.out.printf(\"If x=%s, n=%s, y=%s, then out1 = \\n\",x,n,y);\n System.out.println(out1 + \"\\n\");\n \n out2 = m / n + m % n;\n System.out.printf(\"If m=%s, n=%s, then out2 = \\n\",m,n);\n System.out.println(out2 + \"\\n\");\n \n out3 = 5 * x - n / 5;\n System.out.printf(\"If x=%s, n=%s, then out3 = \\n\",x,n);\n System.out.println(out3 + \"\\n\");\n \n \n }", "private static double[] calcEquation(String[][] equations, double[] values, String[][] queries) {\n // we can represent our data following way\n // a -> b, k\n // b -> a, 1/k\n\n // build graph\n Map<String, Map<String, Double>> graph = buildGraph(equations, values);\n double[] ans = new double[queries.length];\n\n for (int i = 0; i < queries.length; i++) {\n ans[i] = getPathWeight(graph, queries[i][0], queries[i][1], new HashSet<>());\n }\n\n return ans;\n }", "private double[] calculateLineEquation(Point p1, Point p2) {\n double m = ((double) p2.y - p1.y) / (p2.x - p1.x);\n double c = p1.y - (m * p1.x);\n return new double[]{m, c};\n }", "public abstract APoint3<DataType> newOffset(DataType x, DataType y, DataType z);", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n double x=Double.parseDouble(jTextField3.getText());\n double y=Double.parseDouble(jTextField4.getText());\n jTextField8.setText(x*y+\"\");\n }", "public Vector3 set (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }", "public int m3(int a,int b){\r\n\t\tint c=a+b;\r\n\t\treturn c;\r\n\t}", "private double equation(long n) {\n\t\treturn (4d * montoCarlo(n) / n);\n\t}", "public Point3D getA() {\r\n return a;\r\n }", "double CubicInterpolate (double y0,double y1,\n double y2,double y3,\n double mu)\n {\n double a0,a1,a2,a3,mu2;\n\n mu2 = mu*mu;\n\n //a0 = y3 - y2 - y0 + y1;\n //a1 = y0 - y1 - a0;\n //a2 = y2 - y0;\n //a3 = y1;\n\n // Paul Breeuwsma proposes the following coefficients for a\n // smoother interpolated curve, which uses the slope between the\n // previous point and the next as the derivative at the current\n // point. This results in what are generally referred to as\n // Catmull-Rom splines.\n a0 = -0.5*y0 + 1.5*y1 - 1.5*y2 + 0.5*y3;\n a1 = y0 - 2.5*y1 + 2*y2 - 0.5*y3;\n a2 = -0.5*y0 + 0.5*y2;\n a3 = y1;\n\n return(a0*mu*mu2+a1*mu2+a2*mu+a3);\n }", "public void button3(View v) {\n expression += \"3\";\n\n /* Update the screen. */\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "private static double getA(Point p_p1, Point p_p2, Point q_p1, Point q_p2){\n\t\tdouble a1, a2;\n\t\ta1 = q_p2.coordinate[0] - q_p1.coordinate[0] - \n\t\t\t p_p2.coordinate[0] + p_p1.coordinate[0];\t\t\n\t\ta2 = q_p2.coordinate[1] - q_p1.coordinate[1] - \n\t\t\t p_p2.coordinate[1] + p_p1.coordinate[1];\n\t\t\t\t\n\t\tdouble a = Math.pow(a1,2) + Math.pow(a2,2);\n\t\t\n\t\treturn a;\n\t}", "public static int addThreeNumbers (int a, int b, int c){ // method header\n\t\tint result = a + b + c; // add actual parameters\n\t\treturn result; // return in to main method\n\t}", "public static void main(String[] args) {\n\t\tScanner entrada = new Scanner(System.in);\n\t\tint n1, n2;\n\t\tdouble n3;\n\t\t\n\t\tn1 = entrada.nextInt();\n\t\tn2 = entrada.nextInt();\n\t\tn3 = entrada.nextDouble();\n\t\t\n\t\tSystem.out.println(\"a: \"+((n1*2)/(n2/2)));\n\t\tSystem.out.println(\"b: \"+(n1*3+n3));\n\t\tSystem.out.println(\"c: \"+(Math.pow(n3, 3)));\n\t\t\n\t\tentrada.close();\n\t}", "final public Vector3 mul(double c){\n return new Vector3(x*c, y*c, z*c);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tfloat a, b, c;\r\n\t\tSystem.out.println(\"Fill a, b, c: \");\r\n\t\ta = sc.nextFloat();\r\n\t\tb = sc.nextFloat();\r\n\t\tc = sc.nextFloat();\r\n\t\tfloat delta = (float) (Math.pow(b, 2) - 4 * a * c);\r\n\t\tif (delta < 0) {\r\n\t\t\tSystem.out.println(\"The equation has no solution!\");\r\n\t\t} else {\r\n\t\t\tif (delta == 0) {\r\n\t\t\t\tfloat x = -b / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution x = \" + x);\r\n\t\t\t} else {\r\n\t\t\t\tdouble x1 = (-b - Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tdouble x2 = (-b + Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution X1 = \" + x1);\r\n\t\t\t\tSystem.out.println(\"Solution X2 = \" + x2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "public final void transform(Tuple3f t, Tuple3f result) {\n\t\n \t// alias-safe\n \tresult.set(this.m00 * t.x + this.m01 * t.y + this.m02 * t.z,\n \t\t\t this.m10 * t.x + this.m11 * t.y + this.m12 * t.z,\n \t\t\t this.m20 * t.x + this.m21 * t.y + this.m22 * t.z);\n }", "public static void solveQuadraticEquation() {\n }", "void setPosition (double x, double y, double z);", "public double getSolutionX3() {\n this.polySolve();\n if (this.degree < 3) {\n return 0010;\n } else {\n if (this.real) {\n return this.x3;\n } else {\n return 0010;\n }\n }\n }", "public String getEquation() {\n this.tanSolve();\n return this.equation;\n }", "@Override\n protected Double[] getCorners(){\n return new Double[]{\n //leftmost point\n getXPos(), getYPos(),\n //rightmost point\n getXPos() + getWidth(), getYPos(),\n //middle point\n getXPos() + getWidth() / 2, getYPos() + getHeight() * getThirdTriangleYPoint(pointUp)\n };\n }", "private double shoelaceFormula(int[] x, int[] y, int[] z) {\n return 0.5f * Math.abs(x[0] * y[1] + y[0] * z[1] + z[0] * x[1] - y[0] * x[1] - z[0] * y[1] - x[0] * z[1]);\n }", "void position(double x, double y, double z);", "public void i(double paramDouble1, double paramDouble2, double paramDouble3)\r\n/* 104: */ {\r\n/* 105:116 */ this.v = paramDouble1;\r\n/* 106:117 */ this.w = paramDouble2;\r\n/* 107:118 */ this.x = paramDouble3;\r\n/* 108:119 */ if ((this.B == 0.0F) && (this.A == 0.0F))\r\n/* 109: */ {\r\n/* 110:120 */ float f1 = uv.a(paramDouble1 * paramDouble1 + paramDouble3 * paramDouble3);\r\n/* 111:121 */ this.A = (this.y = (float)(Math.atan2(paramDouble1, paramDouble3) * 180.0D / 3.141592741012573D));\r\n/* 112:122 */ this.B = (this.z = (float)(Math.atan2(paramDouble2, f1) * 180.0D / 3.141592741012573D));\r\n/* 113: */ }\r\n/* 114: */ }", "public static void main(String[] args) {\n Scanner entrada=new Scanner(System.in);\n \n double x;\n double y;\n double z;\n double m;\n \n System.out.println(\"Ingrese el valor de la variable X: \");\n x = entrada.nextDouble();\n System.out.println(\"Ingrese el valor de la variable Y: \");\n y = entrada.nextDouble();\n System.out.println(\"Ingreese el valor de la variable Z: \");\n z = entrada.nextDouble();\n \n m = ((x+(y/z))/(x-(y/z)));\n \n System.out.println(\"El valor de m en base a las variables: \");\n System.out.printf(\"x= %f\\n\", x);\n System.out.printf(\"y= %f\\n\", y);\n System.out.printf(\"z= %f\\n\", z);\n System.out.println(\"Da como resultado:\");\n System.out.printf(\"m= %f\", m); \n}", "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 }", "public float getX1() {\r\n return (b + 3*a)/3;\r\n }", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\tSystem.out.println(\"Quadratic equation \\tax^2+bx+c=0\");\r\n\t\tSystem.out.println();\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of a: \");\r\n\t\ta = input.nextInt();\r\n\t\tSystem.out.print(\"Enter the value of b: \");\r\n\t\tb = input.nextInt();\r\n\t\tSystem.out.print(\"Enter the value of c: \");\r\n\t\tc = input.nextInt();\r\n\t\tif(b<0 && c<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 %dx %d\", a, b, c);\r\n\t\t}else if(c<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 + %dx %d\", a, b, c);\r\n\t\t}else if(b<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 %dx + %d\", a, b, c);\r\n\t\t}else {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 + %dx + %d\", a, b, c);\r\n\t\t}\r\n\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"\\nQr = b^2 - 4ac\");\r\n\t\tint x;\r\n\t\tx = (int) (Math.pow(b, 2) - 4*a*c);\r\n\t\tSystem.out.printf(\"Qr = %d\", x);\r\n\t\tSystem.out.print(\"\\n\\nRoots of the equqtion are: \");\r\n\t\tif(x<0) {\r\n\t\t\tSystem.out.println(\"Imaginary/complex\");\r\n\t\t}else if(x==0) {\r\n\t\t\tSystem.out.println(\"Real and equal\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Real and distinct\");\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "public Point3D getC() {\r\n return c;\r\n }", "public point(int a, int b, int c) {\n\t\t\t\tx = a;\n\t\t\t\ty = b;\n\t\t\t\tz = c;\n\t\t\t}", "private final void setFromAxisAngle(double x, double y, double z, double angle) {\n \t\n\t\tdouble n = Math.sqrt(x * x + y * y + z * z);\n\t\t\n\t\t// zero-div may occur\n\t\tn = 1 / n;\n\t\tx *= n;\n\t\ty *= n;\n\t\tz *= n;\n\t\t\n\t\tdouble c = Math.cos(angle);\n\t\tdouble s = Math.sin(angle);\n\t\tdouble omc = 1.0D - c;\n\t\t\n\t\tthis.m00 = (float)(c + x * x * omc);\n\t\tthis.m11 = (float)(c + y * y * omc);\n\t\tthis.m22 = (float)(c + z * z * omc);\n\t\n\t\tdouble tmp1 = x * y * omc;\n\t\tdouble tmp2 = z * s;\n\t\tthis.m01 = (float)(tmp1 - tmp2);\n\t\tthis.m10 = (float)(tmp1 + tmp2);\n\t\n\t\ttmp1 = x * z * omc;\n\t\ttmp2 = y * s;\n\t\tthis.m02 = (float)(tmp1 + tmp2);\n\t\tthis.m20 = (float)(tmp1 - tmp2);\n\t\n\t\ttmp1 = y * z * omc;\n\t\ttmp2 = x * s;\n\t\tthis.m12 = (float)(tmp1 - tmp2);\n\t\tthis.m21 = (float)(tmp1 + tmp2);\n }", "int main()\n{\n int w,x,y,o=0;\n cin>>w;\n cin>>x;\n cin>>y;\n o=((w*x)-(w*y))-100;\n cout<<o;\n \n}", "public static void solve(String question)\n\t{\n\t\t\n\t\tint add_function = 0;\n\t\tint sub_function = 0;\n\t\t\n\t\tString string_alpha = find_a(question); //finds the value of first input including x\n\t\tString string_beta = find_b(question); //finds the value of second input including x\n\t\t\n\t\tint var_alpha = find_a_num(question); //finds value as integer not including x, of first function\n\t\tint var_beta = find_b_num(question); //finds value as integer not including x, of second function\n\t\t\n\t\tSystem.out.println((find_par(2,question) + find_par(3,question)));\n\t\t\n\t\tString function_1 = function_1(question); //finds just the trig operator of the first function only used to check what type of equation\n\t\tString function_2 = function_2(question); //finds just the trig operator of the second function\n\t\t\n\t\t//check to make sure question is valid if not will start over\n\t\tif (!((function_1.equalsIgnoreCase(\"sin\") && function_1.equalsIgnoreCase(\"cos\") && function_1.equalsIgnoreCase(\"tan\")) || (function_2.equalsIgnoreCase(\"sin\") || function_2.equalsIgnoreCase(\"cos\") || function_2.equalsIgnoreCase(\"tan\"))))\n\t\t{\n\t\t\terror();\n\t\t}\n\t\t\n\t\t//checking to see what equation to use\n\t\t\n\t\tif (function_1.equalsIgnoreCase(\"sin\") && function_2.equalsIgnoreCase(\"sin\"))\n\t\t{\n\t\t\t\n\t\t\tsin_sin(string_alpha,string_beta,var_alpha,var_beta);\n\t\t\t/*System.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"-\" + string_beta + \")) - (cos(\" + string_alpha + \"+\" + string_beta +\"))]\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.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\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_beta2 + \") - (1/2)cos(\" + string_alpha2 + \")\");\n\t\t\t\n\t\t\tfinished();*/\n\t\t\t\n\t\t}\n\t\t\n\t\tif (function_1.equalsIgnoreCase(\"sin\") && function_2.equalsIgnoreCase(\"cos\"))\n\t\t{\n\t\t\tSystem.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"+\" + string_beta + \")) - (cos(\" + string_alpha + \"-\" + string_beta +\"))]\\t\\tenter values into equation\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.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\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_alpha2 + \") + (1/2)cos(\" + string_beta2 + \") t\\tdistribute 1/2\");\n\t\t\t\n\t\t\tfinished();\n\t\t\t\n\t\t}\n\t\t//not done\n\t\tif (function_1.equalsIgnoreCase(\"cos\") && function_2.equalsIgnoreCase(\"cos\"))\n\t\t{\n\t\t\tSystem.out.println(\"Step 1: (1/2)[(cos(\" + string_alpha + \"+\" + string_beta + \")) - (cos(\" + string_alpha + \"-\" + string_beta +\"))]\\t\\tenter values into equation\"); //prints first step\n\t\t\t\n\t\t\tadd_function = var_alpha + var_beta; //adds the two values as integer\n\t\t\tsub_function = var_alpha - var_beta;\t//substracts the two values as integers\n\t\t\t\n\t\t\tString string_alpha2 = add_function +\"x\"; //reasigns string including x after substracting two values\n\t\t\tString string_beta2 = sub_function +\"x\";\t//reasigns string including x after substracting two values\n\n\t\t\tSystem.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\n\t\t\t\n\t\t\tSystem.out.println(\"\\nStep 3: (1/2)cos(\" + string_alpha2 + \") + (1/2)cos(\" + string_beta2 + \") t\\tdistribute 1/2\");\n\t\t\t\n\t\t\tfinished();\n\t\t\t\n\t\t}\n\t\t\n\t\t////////////\n\t\t//System.out.println(function_1 + \" \" + function_2);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find_b(question);\n\t}", "public double getCoefficient();", "public void set(double x, double y, double z)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Point getP3(){\n return this.p3;\n }", "private static void testSetters() {\r\n\t\tSystem.out.println(\"\\n----------\\nTesting setEquationString()\");\r\n\t\tCalculator calc = new Calculator();\r\n\t\tString calcString = \"\";\r\n\t\ttry {\r\n\t\t\tcalcString = calc.getEquationString();\r\n\t\t}catch (Exception e) {\r\n\t\t\tcalcString = e.toString();\r\n\t\t}\r\n\t\tprintTest(false, \"Calling empty constructor\", calcString, \"java.lang.SecurityException: Calculator is not properly initialized.\");\r\n\t\t\r\n\t\tcalc.setEquationString(\"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\");\r\n\t\tprintTest(true, \"setting equationString to (5*5*2*2)-(2*5)-(5*2*(2+3+4))\", calc.getEquationString(), \"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\");\r\n\t}", "@Test\n @ExcludeIn(DERBY)\n public void math3() {\n // 1.0 + 2.0 * 3.0 - 4.0 / 5.0 + 6.0 % 3.0\n NumberTemplate<Double> one = Expressions.numberTemplate(Double.class, \"1.0\");\n NumberTemplate<Double> two = Expressions.numberTemplate(Double.class, \"2.0\");\n NumberTemplate<Double> three = Expressions.numberTemplate(Double.class, \"3.0\");\n NumberTemplate<Double> four = Expressions.numberTemplate(Double.class, \"4.0\");\n NumberTemplate<Double> five = Expressions.numberTemplate(Double.class, \"5.0\");\n NumberTemplate<Double> six = Expressions.numberTemplate(Double.class, \"6.0\");\n Double num = query().select(one.add(two.multiply(three)).subtract(four.divide(five)).add(six.mod(three))).fetchFirst();\n Assert.assertEquals(6.2, num, 0.001);\n }", "public org.pentaho.pms.cwm.pentaho.meta.core.CwmExpression getExpression();", "public static void main(String args[]) {\n\t\t\n\t\t//declare the variables of equation ax*x + b*x + c = 0 \n\t\tdouble a,b,c;\n\t\t\n\t\t//define scanner variable x as\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\t//initiate the value to command line input\n\t\tSystem.out.println (\"give value of x^2 coefficient\");\n\t\t\n\t\t//now add input to variable a \n\t\ta = scan.nextDouble();\n\n //initiate the value to command line input\n\t\tSystem.out.println (\"give value of x coefficient\");\n\t\t\n\t\t//now add input to variable a \n\t\tb = scan.nextDouble();\n\n //initiate the value to command line input\n\t\tSystem.out.println (\"give value of contant\");\n\t\t\n\t\t//now add input to variable a \n\t\tc = scan.nextDouble();\n \n //declare discriminant of the equation as b^2 - 4*a*c\n double d = Math.pow(b, 2.0) - 4.0*a*c;\n \n //apply the rules for quadratic equations\n //if d =0.0 then roots are equal\n if (d == 0.0) {\n \t\n \t//the root in these situation is -b/2a\n \tSystem.out.println(\"the equation has \"+(-1.0*b/(2.0*a)) + \" as only real root\");\n }\n else if (d >=0.0) {\n \t\n \t//the root in this situation is (-b +- d^0.5)/2a\n \t//the first root is x1\n \tdouble x1 = (-1.0*b + Math.pow(d, 0.5))/(2.0*a);\n \t\n \t//the second root is x2\n \tdouble x2 = (-1.0*b - Math.pow(d, 0.5))/(2.0*a);\n \tSystem.out.println(\"the equation has \"+(x1) + \" and \"+(x2) +\" as two real roots\");\n }\n else {\n \t\n \t//the root in this situation are complex (-b +- d^0.5i)/2a\n \t//the real part of root is r\n \tdouble real = (-1.0*b)/(2.0*a);\n \t\n \t//the complex part of root is c\n \tdouble com = (Math.pow(-1.0*d, 0.5))/(2.0*a);\n \tSystem.out.println(\"the equation has \"+(real) + \"+\"+(com) +\"i and \"+real+\"-\"+com+\"i as two complex root\" );\n }\n\t}", "public String getEquation() {\n this.polySolve();\n return this.equation;\n }", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "public void Activate(float a, float b, float c) {\n if(a>0 && b>0 && c>0)\n {\n Datastore2 datastore2 = (Datastore2) this.datastore;\n datastore2.setTemp_a(a);\n datastore2.setTemp_b(b);\n datastore2.setTemp_c(c);\n mda_efsm.Activate();\n }\n else\n {\n System.out.println(\"Failed. Please input value greater than 0 for all values!\");\n }\n }", "final public double dot(final Normal3 n){\n if(n == null){\n throw new IllegalArgumentException(\"n must not be null\");\n }\n return (x*n.x + y*n.y + z*n.z);\n }", "public void jumlah(int a, int b, int c) {\n\t\tSystem.out.println(\"Jumlah 3 angka =\" + (a + b + c));\n\t}", "@Test\n public void whenInvokeThenReturnsQuadraticValues() {\n Funcs funcs = new Funcs();\n\n List<Double> expected = Arrays.asList(1D, 3D, 7D);\n List<Double> result = funcs.range(0, 2,\n (pStart) -> 1 * Math.pow(pStart, 2) + 1 * pStart + 1);\n\n assertThat(result, is(expected));\n }", "@Override\r\n public double obtenerVolumen() {\n return Math.pow(getA(), 3);//eleva al cubo\r\n }", "private void calculate () {\n try {\n char[] expression = expressionView.getText().toString().trim().toCharArray();\n String temp = expressionView.getText().toString().trim();\n for (int i = 0; i < expression.length; i++) {\n if (expression[i] == '\\u00D7')\n expression[i] = '*';\n if (expression[i] == '\\u00f7')\n expression[i] = '/';\n if (expression[i] == '√')\n expression[i] = '²';\n }\n if (expression.length > 0) {\n Balan balan = new Balan();\n double realResult = balan.valueMath(String.copyValueOf(expression));\n int naturalResult;\n String finalResult;\n if (realResult % 1 == 0) {\n naturalResult = (int) Math.round(realResult);\n finalResult = String.valueOf(naturalResult);\n } else\n finalResult = String.valueOf(realResult);\n String error = balan.getError();\n // check error\n if (error != null) {\n mIsError = true;\n resultView.setText(error);\n if (error == \"Error div 0\")\n resultView.setText(\"Math Error\");\n } else { // show result\n expressionView.setText(temp);\n resultView.setText(finalResult);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "public static void main(String[] args) {\n int a = 1;\n int b = 3;\n int c = 4;\n int d = 27;\n int result = (Math.abs(a * b + c - d));\n System.out.println(result);\n }", "float determinante (){\r\n //lo de adentro de la raiz\r\n float det= (float)(Math.pow(b, 2)-4*a*c);\r\n //(float) por que pow tiene valores por defecto de double\r\n //entonces, hacemos casting: poniendole el (float) antes de\r\n //toda la funcion.\r\n return det; \r\n }", "abstract void setOrigin(double x, double y, double z);", "public void controlPointsChanged(List<Coordinates> lcp) {\n // sort the control points by x position.\n // this makes things easier later when we paint the function.\n lcp.sort(\n (point1,point2) -> Integer.compare(point1.getX(),point2.getX())\n );\n\n // collect the points in an array before doing the calculations.\n // again, this makes things easier for us.\n controlPoints=lcp.toArray(new Coordinates[0]);\n n=controlPoints.length;\n if(n<2) {\n // nothing to do here\n return;\n }\n double []X = new double[n];\n double []Y = new double[n];\n for(int i =0;i<n;i++){\n \tX[i]=controlPoints[i].getX();\n \tY[i]=controlPoints[i].getY();\n }\n // Construct the linear system S*C=T with n-2 equations.\n // The matrix S contains the left hand side of the equations on slide 13.\n // The matrix Z contains the right hand side of the equations on slide 13.\n double[][] S=new double[n-2][n-2];\n double[] Z=new double[n-2];\n \n // Fill the matrix S and the vector Z and solve S*C=T to get c_2 to c_{n-1}.\n for(int i = 0; i< n-3;i++){\n \tS[i][i]=2*delta(X,i+1,0);\n \tS[i+1][i]=delta(X,i+2,-1);\n \tS[i][i+1]=delta(X,i+1,1);\n \tZ[i]=z(Y,X,i);\n }\n S[n-2][n-2]=2*delta(X,n-1,0);\n \n C= EliminationGaussLegendre.solve(S, Z);\n \n // Calculate the n-1 coefficients b_i and d_i.\n // Note that you need all c_i here (but you know that c_1 and c_n are zero).\n //a_i = y_i;\n for(int i=1 ; i<n ; i++){\n \tD[i-1]=d(Y,X,i-1);\n \tB[i-1]=b(Y,C,X,i-1);\n }\n \n }", "public BigInteger compute() {\n\t\tBigInteger g = parameters.getG();\n\t\tBigInteger h = parameters.getH();\n\t\tBigInteger p = parameters.getP();\n\n\t\tBigInteger gPowAik = g.modPow(aik.getValue(), p);\n\t\tBigInteger hPowBik = h.modPow(bik.getValue(), p);\n\n\t\t/*\n\t\t * ((x^a mod q) * (y^b mod q)) mod q = (x^a * y^b) mod q\n\t\t * \n\t\t * otherwise modPow cannot be used!\n\t\t */\n\t\tvalue = gPowAik.multiply(hPowBik).mod(p);\n\n\t\treturn value;\n\t}", "@Test\n\tpublic void testBuildExpressionWithThreeArguments() {\n\t\t\n\t\tWord wordA = new Word(\"apple\", 1);\n\t\tWord wordB = new Word(\"car\", 1);\n\t\tWord wordC = new Word(\"roof\", 2);\n\t\t\n\t\tExpressionBuilder<Word> builder = new ExpressionBuilder<>();\n\t\tbuilder.append(null, wordA);\n\t\tbuilder.append(new AndOperator<Word>(), wordB);\n\t\tbuilder.append(new OrOperator<Word>(), wordC);\n\t\t\n\t\tExpression<Word> resultExpression = builder.getExpression();\n\t\t\n\t\tString expectedResult = \"((apple [1] AND car [1]) OR roof [2])\";\n\t\t\n\t\tSystem.out.println(resultExpression.evaluate());\n\t\tassertEquals(expectedResult, resultExpression.toString());\n\t\t\n\t}", "@org.junit.Test\n public void getTangentTestCurve3() {\n BezierCurve curve = new BezierCurve(new Vector(10, 20), new Vector(15, 20), new Vector(20, 20));\n assertEquals(0, curve.getTangent(0).dot(new Vector(0, 1)), 0);\n assertEquals(0, curve.getTangent(0.5).dot(new Vector(0, 1)), 0);\n assertEquals(0, curve.getTangent(1).dot(new Vector(0, 1)), 0);\n }", "public double getEquinox();", "static PT ComputeCircleCenter(PT a, PT b, PT c) {\r\n\t\tb = (a.add(b)).divide(2);\r\n\t\tc = (a.add(c)).divide(2);\r\n\t\treturn ComputeLineIntersection(b, b.add(RotateCW90(a.subtract(b))), c, c.add(RotateCW90(a.subtract(c))));\r\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 static void main(String[] args)\r\n\t{\n\t\tdouble[] x = increment(-1.0, 0.2, 1.2); // INCREMENTS X = [-1.0, 1.2) BY 0.2\r\n\t\tdouble[] y = increment(-2.0, 0.2, 2.2); // INCREMENTS Y = [-2.0, 2.2) BY 0.2\r\n\t\t\r\n\t\t// THE increment METHOD OF THE DoubleArray CLASS GIVES INCREMENTED \r\n\t\t// DOUBLE VALUES THAT AREN'T ENTIRELY ACCURATE DUE TO THE FORMULA USED.\r\n\t\t// THIS FIXES THAT FOR THIS PROGRAM WHERE WE ONLY NEED 1 DECIMAL PLACE.\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.#\");\r\n\t\tfor (int i = 0; i < x.length; i++)\r\n\t\t{\r\n\t\t\tx[i] = Double.valueOf(df.format(x[i]));\r\n\t\t\ty[i] = Double.valueOf(df.format(y[i]));\r\n\t\t}\r\n\t\t\r\n\t\t// PLOT DATA FOR z(x,y)\r\n\t\tdouble[][] z = function(x, y);\r\n\t\t\r\n \r\n\t\t// PANEL THAT SHOWS THE PLOT WITH A LEGEND AT THE BOTTOM\r\n\t\tPlot3DPanel plot = new Plot3DPanel(\"SOUTH\");\r\n \r\n\t\t// ADD THE VALUES OF X, Y, Z TO THE PANEL WITH LEGEND\r\n\t\tplot.addGridPlot(\"z(x,y) = (1-cos(PI*x))*((1.23456+cos(1.06512*y))^2)*e^(-x^2-y^2)\", x, y, z);\r\n \r\n\t\t// PUT THE PANEL INTO A JFrame\r\n\t\tJFrame frame = new JFrame(\"A Plot\");\r\n\t\tframe.setSize(600, 600);\r\n\t\tframe.setContentPane(plot);\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n\t\t// FIND THE GRADIENTS\r\n\t\thighest[3] = gradient(partialX(highest[0], highest[1]), \r\n\t\t\t\tpartialY(highest[0], highest[1]));\r\n\t\tsecondHighest[3] = gradient(partialX(secondHighest[0], secondHighest[0]), \r\n\t\t\t\tpartialY(secondHighest[0], secondHighest[0]));\r\n\t\tlowest[3] = gradient(partialX(lowest[0], lowest[1]), \r\n\t\t\t\tpartialY(lowest[0], lowest[1]));\r\n\t\tsecondLowest[3] = gradient(partialX(secondLowest[0], secondLowest[1]), \r\n\t\t\t\tpartialY(secondLowest[0], secondLowest[1]));\r\n\t\t\r\n\t\t// PRINT A TABLE IN THE CONSOLE\r\n\t\tDecimalFormat out = new DecimalFormat(\"#.####\");\r\n\t\tSystem.out.println(\"\\t\\tX\\t|\\tY\\t|\\tZ\\t|\\tGrad\");\r\n\t\tSystem.out.println(\"Highest:\\t\" + highest[0] + \"\\t|\\t\" + highest[1] + \r\n\t\t\t\t\"\\t|\\t\" + out.format(highest[2]) + \"\\t|\\t\" + out.format(highest[3]));\r\n\t\tSystem.out.println(\"2nd Highest:\\t\" + secondHighest[0] + \"\\t|\\t\" + \r\n\t\t\t\tsecondHighest[1] + \"\\t|\\t\" + out.format(secondHighest[2]) + \r\n\t\t\t\t\"\\t|\\t\" + out.format(secondHighest[3]));\r\n\t\tSystem.out.println(\"Lowest: \\t\" + lowest[0] + \"\\t|\\t\" + lowest[1] + \r\n\t\t\t\t\"\\t|\\t\" + out.format(lowest[2]) + \"\\t|\\t\" + out.format(lowest[3]));\r\n\t\tSystem.out.println(\"2nd Lowest:\\t\" + secondLowest[0] + \"\\t|\\t\" + \r\n\t\t\t\tsecondLowest[1] + \"\\t|\\t\" + out.format(secondLowest[2]) + \r\n\t\t\t\t\"\\t|\\t\" + out.format(secondLowest[3]));\r\n\t}", "ExpressionCalculPrimary getExpr();", "@Override\n public double getArea() {\n double s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n }", "private double threeDimensionalSolveQ2(RealMatrix u, RealMatrix v, double q3) {\r\n double u22 = u.getEntry(1, 1);\r\n double u23 = u.getEntry(1, 2);\r\n double v2 = v.getEntry(1, 0);\r\n\r\n return (-v2/u22) - ((u23/u22)*q3);\r\n }" ]
[ "0.6322516", "0.62016356", "0.6019624", "0.5843027", "0.5705513", "0.5523715", "0.5518429", "0.55094016", "0.5500703", "0.54258764", "0.5373807", "0.5344628", "0.53418684", "0.5301566", "0.52558404", "0.52555734", "0.52470946", "0.52224964", "0.5215959", "0.52054584", "0.5203897", "0.5184434", "0.51698893", "0.5160731", "0.5160028", "0.5139504", "0.5119391", "0.5114512", "0.5112889", "0.51120394", "0.51114196", "0.5109847", "0.5109105", "0.5108912", "0.51085716", "0.508925", "0.5080712", "0.50506777", "0.50486815", "0.50358176", "0.503566", "0.5021658", "0.5018962", "0.50189507", "0.50014395", "0.4996802", "0.4985891", "0.4964098", "0.49619582", "0.49505913", "0.49439183", "0.4938937", "0.49325296", "0.4926625", "0.49180028", "0.4916777", "0.49119854", "0.49104288", "0.4907165", "0.4904457", "0.4892897", "0.48920444", "0.48896948", "0.48778927", "0.48760444", "0.48669294", "0.48665813", "0.48657826", "0.48594025", "0.48533607", "0.48489028", "0.48376006", "0.4827926", "0.482633", "0.48137045", "0.48114437", "0.48104393", "0.48086494", "0.48078525", "0.48018378", "0.47998402", "0.4797945", "0.4795711", "0.47889352", "0.47870314", "0.4777327", "0.47727108", "0.47688466", "0.4768758", "0.4764291", "0.47641358", "0.4761958", "0.47584406", "0.47571653", "0.47451735", "0.4743249", "0.47382325", "0.47371468", "0.4730671", "0.4729619" ]
0.6480226
0
method to detect and return all induced diamonds found
public List<Collection<Vertex<Integer>>> detect(UndirectedGraph<Integer,Integer> graph){ long start = System.currentTimeMillis(); List<Collection<Vertex<Integer>>> diamonds = find(graph); long stop = System.currentTimeMillis(); p1time = ""+(stop-start); found=diamonds.size(); return diamonds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printDiamond(){\n printIsoceles();\n //use bottom isosceles method to get bottom half of Diamond\n printBottomIsoceles();\n }", "private void startGame() { \n \n int body = 0;\n int column = 0;\n int end = 0;\n int fill = 0;\n int increment = 2; \n int numPerSide = 0; \n int prefixIndex = 0;\n int row = 0; \n int start = 1; \n int userNum = 0; \n \n String lineContent = \"\";\n \n // Get user input\n System.out.println(\"FOR A PRETTY DIAMOND PATTERN,\");\n System.out.print(\"TYPE IN AN ODD NUMBER BETWEEN 5 AND 21? \");\n userNum = scan.nextInt();\n System.out.println(\"\");\n \n // Calcuate number of diamonds to be drawn on each side of screen\n numPerSide = (int) (LINE_WIDTH / userNum); \n\n end = userNum; \n \n // Begin loop through each row of diamonds\n for (row = 1; row <= numPerSide; row++) {\n \n // Begin loop through top and bottom halves of each diamond\n for (body = start; increment < 0 ? body >= end : body <= end; body += increment) {\n\n lineContent = \"\";\n \n // Add whitespace\n while (lineContent.length() < ((userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n // Begin loop through each column of diamonds\n for (column = 1; column <= numPerSide; column++) {\n \n prefixIndex = 1;\n \n // Begin loop that fills each diamond with characters\n for (fill = 1; fill <= body; fill++) {\n \n // Right side of diamond\n if (prefixIndex > PREFIX.length()) {\n \n lineContent += SYMBOL; \n \n }\n // Left side of diamond\n else {\n \n lineContent += PREFIX.charAt(prefixIndex - 1);\n prefixIndex++;\n \n } \n \n } // End loop that fills each diamond with characters\n \n // Column finished\n if (column == numPerSide) {\n \n break;\n \n }\n // Column not finishd\n else {\n \n // Add whitespace\n while (lineContent.length() < (userNum * column + (userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n } \n \n } // End loop through each column of diamonds\n \n System.out.println(lineContent);\n\n } // End loop through top and bottom half of each diamond\n\n if (start != 1) {\n\n start = 1;\n end = userNum;\n increment = 2; \n \n }\n else {\n \n start = userNum - 2;\n end = 1;\n increment = -2; \n row--;\n\n } \n\n } // End loop through each row of diamonds\n \n }", "Ingredient[] shape(IRecipe recipe);", "@Test\n public void testDiamond() {\n IntegerReturningItem diamond = new Diamond(0);\n final Random rand = new Random();\n\n assertEquals(diamond.runEffectGettingResult(), DIAMOND_VALUE);\n assertEquals(diamond.getPosition(), 0);\n\n for (int i = 0; i < NUMBER_OF_ITERATION; i++) {\n final int position = rand.nextInt(RAND_UPPER_BOUND);\n diamond = new Diamond(position);\n assertEquals(diamond.runEffectGettingResult(), DIAMOND_VALUE);\n assertEquals(diamond.getPosition(), position);\n }\n }", "static ArrayList<Ingredient> getIngredients() {\n\t\tArrayList<Ingredient> Ingredients = new ArrayList<Ingredient>();\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\taddIngredient(Ingredients, ing);\n\t\t\t}\n\t\t}\n\t\treturn Ingredients;\n\t}", "public static void findRegisteredFoods() {\n\t\tfor (Item item : Item.REGISTRY) {\n\t\t\tItemStack itemStack = new ItemStack(item);\n\t\t\tif (isValidFood(itemStack) && getFoodNutrients(itemStack).size() == 0)\n\t\t\t\tLog.warn(\"Registered food without nutrients: \" + item.getRegistryName());\n\t\t}\n\t}", "public static int[] guthansEquipment() {\n return new int[]{\n Items.GUTHANS_HELM_4724,\n Items.GUTHANS_HELM_100_4904,\n Items.GUTHANS_HELM_75_4905,\n Items.GUTHANS_HELM_50_4906,\n Items.GUTHANS_HELM_25_4907,\n Items.GUTHANS_PLATEBODY_4728,\n Items.GUTHANS_PLATEBODY_100_4916,\n Items.GUTHANS_PLATEBODY_75_4917,\n Items.GUTHANS_PLATEBODY_50_4918,\n Items.GUTHANS_PLATEBODY_25_4919,\n Items.GUTHANS_CHAINSKIRT_4730,\n Items.GUTHANS_CHAINSKIRT_100_4922,\n Items.GUTHANS_CHAINSKIRT_75_4923,\n Items.GUTHANS_CHAINSKIRT_50_4924,\n Items.GUTHANS_CHAINSKIRT_25_4925,\n Items.GUTHANS_WARSPEAR_4726,\n Items.GUTHANS_WARSPEAR_100_4910,\n Items.GUTHANS_WARSPEAR_75_4911,\n Items.GUTHANS_WARSPEAR_50_4912,\n Items.GUTHANS_WARSPEAR_25_4913,\n Items.BERSERKER_RING_I_11773\n };\n }", "public ArrayList<Dog> dogsOfBreed(String breed){\n ArrayList<Dog> dogsOfBreed = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getBreed().equals(breed)){\n dogsOfBreed.add(d);\n }\n }\n\n return dogsOfBreed;\n }", "boolean hasIngredientsFor(Drink drink);", "public static void PrintDiamond()\n {\n DiamondTop();\n PrintReverseDiamond();\n }", "public static void main(String[] args) {\n Point p1 = new Point(new double[]{0,0}, 0);\n Point p2 = new Point(new double[]{0,10}, 10);\n Point p3 = new Point(new double[]{0,12}, 12);\n ArrayList<Point> r = new ArrayList<>();\n r.add(p1); r.add(p2); r.add(p3);\n \n Point p4 = new Point(new double[]{2,0}, 0);\n Point p5 = new Point(new double[]{2,7}, 7);\n Point p6 = new Point(new double[]{2,10}, 10);\n ArrayList<Point> s = new ArrayList<>();\n s.add(p4); s.add(p5); s.add(p6);\n \n double dissim = getDISSIM(r, s, 0, 10);\n \n System.out.println(\"DISSIM: \" + dissim);\n }", "public static boolean [][] breedChoice (Species [][] map, int x, int y, int plantHealth) {\n // First int: direction\n // Second int: sheep or wolf\n boolean [][] breeding = {\n {false, false},\n {false, false},\n {false, false},\n {false, false},\n };\n \n // Check null pointer exceptions\n if (map[y][x] != null) {\n\n // Breed sheep\n if ((map[y][x] instanceof Sheep) && (y > 0) && (map[y-1][x] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y-1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y-1][x].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y-1][x]).getAge() > 5)) {\n breeding[0][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (y < map[0].length - 2) && (map[y+1][x] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y+1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y+1][x].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y+1][x]).getAge() > 5)) {\n breeding[1][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (x > 0) && (map[y][x-1] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y][x-1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x-1].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y][x-1]).getAge() > 5)) {\n breeding[2][0] = true;\n }\n } else if ((map[y][x] instanceof Sheep) && (x < map.length - 2) && (map[y][x+1] instanceof Sheep)) {\n if ((((Sheep)map[y][x]).getGender() != ((Sheep)map[y][x+1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x+1].getHealth() > 20) && (((Sheep)map[y][x]).getAge() > 5) && (((Sheep)map[y][x+1]).getAge() > 5)) {\n breeding[3][0] = true;\n }\n \n // Breed wolves\n } else if ((map[y][x] instanceof Wolf) && (y > 0) && (map[y-1][x] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y-1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y-1][x].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y-1][x]).getAge() > 5)) {\n breeding[0][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (y < map[0].length - 2) && (map[y+1][x] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y+1][x]).getGender()) && (map[y][x].getHealth() > 20) && (map[y+1][x].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y+1][x]).getAge() > 5)) {\n breeding[1][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (x > 0) && (map[y][x-1] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y][x-1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x-1].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y][x-1]).getAge() > 5)) {\n breeding[2][1] = true;\n }\n } else if ((map[y][x] instanceof Wolf) && (x < map.length - 2) && (map[y][x+1] instanceof Wolf)) {\n if ((((Wolf)map[y][x]).getGender() != ((Wolf)map[y][x+1]).getGender()) && (map[y][x].getHealth() > 20) && (map[y][x+1].getHealth() > 20) && (((Wolf)map[y][x]).getAge() > 5) && (((Wolf)map[y][x+1]).getAge() > 5)) {\n breeding[3][1] = true;\n }\n }\n \n }\n return breeding;\n }", "boolean hasProduces();", "@Override\n\tpublic boolean InCorrectDes(IDiamond diamond) {\n\t\tint cell = touchCell(diamond.getCenterPosition());\n\t\tint row = CellRow(cell);\n\t\tint col = CellCol(cell);\n\t\tint cell1 = touchCell(diamond.getSource());\n\t\tint row1 = CellRow(cell1);\n\t\tint col1 = CellCol(cell1);\n\t\t\n\t\tif (inGrid(row, col)) {// diem dung o trong\n\t\t\tIDiamond temp = screen.diamonds.get(cell);\n\t\t\ttemp.setSource(diamond.getPosX(), diamond.getPosY());\n\t\t\ttemp.setDestination(diamond.getPosX(), diamond.getPosY());\n\t\t\t\n\t\t\tscreen.logic.grid[row][col] = diamond.getDiamondValue();\n\t\t\t\n\t\t\tif (diamondType(screen.logic.grid[row][col]) == IDiamond.BUTTERFLY_DIAMOND) {\n\t\t\t\tinstance.spider.addButterfly(row * 8 + col);\n\t\t\t}\n\t\t\t\n\t\t\ttemp.setDiamondValue(diamond.getDiamondValue());\n\t\t\ttemp.setAction(Diamond.REST);\n\t\t\ttemp.getBound().width = screen.DIAMOND_WIDTH; temp.getBound().height = screen.DIAMOND_HEIGHT;\n\t\t\ttemp.setCenterPosition(diamond.getPosX(), diamond.getPosY());\n\t\t\tscreen.inGridFlag[row][col] = Operator.onBit(Effect.FIXED_POS, screen.inGridFlag[row][col]);\n\t\t\tchangeStatusBehindFall(row, col);\n\t\t\t\n\t\t\tif (!inGrid(row1, col1)) {\n\t\t\t\tscreen.colHeight[col]++;\n\t\t\t\t\n\t\t\t\tscreen.fallingNum[col]--;\n\t\t\t\t\n\t\t\t\tIDiamond diamondPre = diamond.getPreDiamond();\n\t\t\t\tIDiamond diamondNext = diamond.getNextDiamond();\n\t\t\t\tif (diamond == outGridHead[col1]) {\n\t\t\t\t\toutGridHead[col1] = diamondNext;\n\t\t\t\t\tif (outGridHead[col1] == null) {\n\t\t\t\t\t\toutGridHead[col1] = outGridTail[col1] = null;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\tif (diamond == outGridTail[col1]) {\n\t\t\t\t\toutGridTail[col1] = diamondPre;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondNext);\n\t\t\t\tif (diamondNext != null) diamondNext.setPreDiamond(diamondPre);\n\t\t\t\tdiamond.setNextDiamond(null);\n\t\t\t\tdiamond.setPreDiamond(null);\n\t\t\t\tif (diamond.equals(HeadCur[col1])) HeadCur[col1] = diamondNext;\n\t\t\t\tif (diamond.equals(TailCur[col1])) HeadCur[col1] = TailCur[col1] = null;\t\n\t\t\t\tdiamond = null;\n\t\t\t} else {\n\t\t\t\tIDiamond diamondPre = diamond.getPreDiamond();\n\t\t\t\tIDiamond diamondNext = diamond.getNextDiamond();\n\t\t\t\t\n\t\t\t\tif (diamond == inGridHead[col1]) {// neu do la diem dau\n\t\t\t\t\tinGridHead[col1] = diamondNext;\n\t\t\t\t\tif (inGridHead[col1] == outGridHead[col1]) {// da het danh sach trong grid\n\t\t\t\t\t\tinGridHead[col1] = inGridTail[col1] = null;// xoa danh sach\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\tif (diamond == inGridTail[col1]) {// la diem cuoi cua danh sach > 1\n\t\t\t\t\tinGridTail[col1] = diamondPre;\n\t\t\t\t}\n\t\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondNext);\n\t\t\t\tif (diamondNext != null) diamondNext.setPreDiamond(diamondPre);\n\t\t\t\tdiamond.setNextDiamond(null);\n\t\t\t\tdiamond.setPreDiamond(null);\n\t\t\t\tdiamond = null;\n\t\t\t}\n\t\t\t\n\t\t\tEffect effect = screen.logic.allocateEffect(Effect.TEMP_EFFECT);\n\t\t\teffect.setSource(row * 8 + col);\n\t\t\tscreen.logic.effects.add(effect);\n\t\t\treturn true;\n\t\t} else {// diem dung o ngoai\n//\t\t\tLog.d(\"Fault1\", \"lai dung o ngoai \"+row+\" des \"+col+\" \"+row1+\" source \"+col1);\n\t\t\t\t\t\n\t\t\t//if (col > -1 && col < 8)\n\t\t\t//screen.fallingNum[col]--;\n\t\t\t//screen.lastFallNum[col]--;\n\t\t}\n\t\treturn false;\n\t}", "public static void sampling(String[][][] god){\n Scanner myScanner = new Scanner(System.in);\n String letters = \"AA\";\n String numbers = \"0000\";\n \n System.out.print(\"Enter a 2 characters:\");\n letters = myScanner.nextLine();\n String uppercase = letters.toUpperCase();\n System.out.print(\"Enter a 4 integer sequence:\");\n numbers = myScanner.nextLine();\n \n String code = uppercase + numbers;\n System.out.print(code);\n \n int findCount = 0;\n \n for(int i = 0; i < god.length; i++){\n for(int j = 0; j < god[i].length; j++){\n for(int k = 0; k < god[i][j].length; k++){\n if(god[i][j][k].equals(code)){\n System.out.print(\"The code was found at position (\" + i + \",\" + j + \",\" + k + \")\");\n findCount++; \n }\n }\n }\n }\n \n if (findCount == 0){\n System.out.print(\"Code not found.\");\n }\n \n }", "public boolean heatPotion() \n\t{\n\t\tint count=0;\n\t\tfor (int i=0; i < ingredients.length(); i++) \n\t\t{\n\t\t\tif (ingredients.charAt(i)=='w') \n\t\t\t{\n\t\t\t\t//take out the water and count that it was there\n\t\t\t\tingredients = ingredients.replace(\"w\", \"\");\n\t\t\t\tcount+=1;\n\t\t\t}\n\t\t}\n\t\t//check that there was water in the potion in order to have it properly heated\n\t\tif (count > 0) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse\n\t\t\treturn false;\n\t}", "public int[] findVerticalSeam() {\n double minDist = Double.POSITIVE_INFINITY;\n int[] minPixel = new int[2];\n double[][] distToPixel = new double[width()][height()];\n HashMap<Integer, int[]> pixelToPixel = new HashMap<Integer, int[]>();\n for (double[] row : distToPixel) { Arrays.fill(row, Double.POSITIVE_INFINITY); }\n for (int i = 0; i < width(); i++) {\n distToPixel[i][0] = 0;\n }\n for (int y = 0; y < height() - 1; y++) {\n for (int x = 0; x < width(); x++) {\n\n for (int[] ap : adjacentPixels(x, y)) {\n if (distToPixel[ap[0]][ap[1]] > distToPixel[x][y] + energy(ap[0], ap[1])) {\n distToPixel[ap[0]][ap[1]] = distToPixel[x][y] + energy(ap[0], ap[1]);\n pixelToPixel.put(pixelHash(ap[0], ap[1]), new int[] { x, y });\n }\n }\n }\n }\n for (int i = 0; i < width(); i++) {\n if (distToPixel[i][height() - 1] < minDist) {\n minDist = distToPixel[i][height() - 1];\n minPixel = new int[] { i, height() - 1 };\n }\n }\n int[] outputSeam = new int[height()];\n Stack<Integer> pixPath = new Stack<Integer>();\n pixPath.push(minPixel[0]);\n int mp = pixelHash(minPixel[0], minPixel[1]);\n while (true) {\n int[] pixelArr = pixelToPixel.get(mp);\n if (pixelArr == null) { break; }\n pixPath.push(pixelArr[0]);\n mp = pixelHash(pixelArr[0], pixelArr[1]);\n }\n for (int i = 0; i < outputSeam.length; i++) { outputSeam[i] = pixPath.pop(); }\n return outputSeam;\n }", "void analyze(CaveGen g) {\n caveGenCount += 1; \n\n // count the number of purple flowers\n int num = 0;\n for (Teki t: g.placedTekis) {\n if (t.tekiName.equalsIgnoreCase(\"blackpom\"))\n num += 1;\n }\n if (num > 5) num = 5;\n numPurpleFlowers[num] += 1;\n\n // report about missing treasures\n // print the seed everytime we see a missing treasure\n int minTreasure = 0, actualTreasure = 0;\n for (Item t: g.spawnItem) { minTreasure += t.min; }\n for (Teki t: g.spawnTekiConsolidated) { if (t.itemInside != null) minTreasure += t.min; }\n actualTreasure += g.placedItems.size();\n for (Teki t: g.placedTekis) {\n if (t.itemInside != null)\n actualTreasure += 1;\n }\n int expectedMissingTreasures = 0;\n if (\"CH29 1\".equals(g.specialCaveInfoName + \" \" + g.sublevel))\n expectedMissingTreasures = 1; // This level is always missing a treasure\n boolean missingUnexpectedTreasure = actualTreasure + expectedMissingTreasures < minTreasure;\n if (missingUnexpectedTreasure) {\n println(\"Missing treasure: \" + g.specialCaveInfoName + \" \" + g.sublevel + \" \" + Drawer.seedToString(g.initialSeed));\n missingTreasureCount += 1;\n }\n\n // Good layout finder (story mode)\n if (CaveGen.findGoodLayouts && !CaveGen.challengeMode && !missingUnexpectedTreasure) {\n boolean giveWorstLayoutsInstead = CaveGen.findGoodLayoutsRatio < 0;\n\n ArrayList<Teki> placedTekisWithItems = new ArrayList<Teki>();\n for (Teki t: g.placedTekis) {\n if (t.itemInside != null)\n placedTekisWithItems.add(t);\n }\n\n String ignoreItems = \"g_futa_kyodo,flower_blue,tape_blue,kinoko_doku,flower_red,futa_a_silver,cookie_m_l,chocolate\";\n String findTekis = \"\"; //\"whitepom,blackpom\";\n\n // Compute the waypoints on the shortest paths\n ArrayList<WayPoint> wpOnShortPath = new ArrayList<WayPoint>();\n for (Item t: g.placedItems) { // Treasures\n if (ignoreItems.contains(t.itemName.toLowerCase())) continue;\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n for (Teki t: placedTekisWithItems) { // Treasures inside enemies\n if (ignoreItems.contains(t.itemInside.toLowerCase())) continue;\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n for (Teki t: g.placedTekis) { // Other tekis\n if (findTekis.contains(t.tekiName.toLowerCase())) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n }\n /*if (g.placedHole != null) {\n WayPoint wp = g.closestWayPoint(g.placedHole);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n if (g.placedGeyser != null) {\n WayPoint wp = g.closestWayPoint(g.placedGeyser);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }*/\n\n // add up distance penalty for score\n int score = 0;\n for (WayPoint wp: wpOnShortPath) {\n score += wp.distToStart - wp.backWp.distToStart;\n } \n // add up enemy penalties for score\n for (Teki t: g.placedTekis) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n if (wpOnShortPath.contains(wp)) {\n score += Parser.tekiDifficulty.get(t.tekiName.toLowerCase());\n }\n }\n // add up gate penalties for score\n for (Gate t: g.placedGates) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n if (g.placedHole != null && g.placedHole.mapUnit.type == 0 && g.placedHole.mapUnit.doors.get(0).spawnPoint == t.spawnPoint)\n score += t.life / 3; // covers hole\n // if (g.placedGeyser != null && g.placedGeyser.mapUnit.type == 0 && g.placedGeyser.mapUnit.doors.get(0).spawnPoint == t.spawnPoint)\n // score += t.life / 3; // covers geyser\n if (wpOnShortPath.contains(wp))\n score += t.life / 3; // covers path back to ship\n }\n\n if (giveWorstLayoutsInstead) score *= -1;\n\n // keep a sorted list of the scores\n allScores.add(score);\n\n // only print good ones\n if (CaveGen.indexBeingGenerated > CaveGen.numToGenerate/10 && \n score <= allScores.get((int)(allScores.size()*Math.abs(CaveGen.findGoodLayoutsRatio))) \n || score == allScores.get(0) && CaveGen.indexBeingGenerated > CaveGen.numToGenerate/40) {\n CaveGen.images = true;\n println(\"GoodLayoutScore: \" + Drawer.seedToString(g.initialSeed) + \" -> \" + score);\n }\n else {\n CaveGen.images = false;\n }\n\n }\n\n // good layout finder (challenge mode)\n if (CaveGen.findGoodLayouts && CaveGen.challengeMode) {\n boolean giveWorstLayoutsInstead = CaveGen.findGoodLayoutsRatio < 0;\n\n // compute the number of pokos availible\n int pokosAvailible = 0;\n for (Teki t: g.placedTekis) {\n String name = t.tekiName.toLowerCase();\n if (plantNames.contains(\",\" + name + \",\")) continue;\n if (hazardNames.contains(\",\" + name + \",\")) continue;\n if (name.equalsIgnoreCase(\"egg\"))\n pokosAvailible += 10; // mitites\n else if (!noCarcassNames.contains(\",\" + name + \",\") && !name.contains(\"pom\"))\n pokosAvailible += Parser.pokos.get(t.tekiName.toLowerCase());\n if (t.itemInside != null)\n pokosAvailible += Parser.pokos.get(t.itemInside.toLowerCase());\n }\n for (Item t: g.placedItems)\n pokosAvailible += Parser.pokos.get(t.itemName.toLowerCase());\n\n // compute the number of pikmin*seconds required to complete the level\n float pikminSeconds = 0;\n for (Teki t: g.placedTekis) {\n if (plantNames.contains(\",\" + t.tekiName.toLowerCase() + \",\")) continue;\n if (hazardNames.contains(\",\" + t.tekiName.toLowerCase() + \",\")) continue;\n pikminSeconds += workFunction(g, t.tekiName, t.spawnPoint);\n if (t.itemInside != null)\n pikminSeconds += workFunction(g, t.itemInside, t.spawnPoint);\n }\n for (Item t: g.placedItems) {\n pikminSeconds += workFunction(g, t.itemName, t.spawnPoint);\n }\n pikminSeconds += workFunction(g, \"hole\", g.placedHole);\n pikminSeconds += workFunction(g, \"geyser\", g.placedGeyser);\n // gates??\n // hazards??\n \n int score = -pokosAvailible * 1000 + (int)(pikminSeconds/2);\n if (giveWorstLayoutsInstead) score *= -1;\n\n // keep a sorted list of the scores\n allScores.add(score);\n\n // only print good ones\n if (CaveGen.indexBeingGenerated > CaveGen.numToGenerate/10 && \n score <= allScores.get((int)(allScores.size()*Math.abs(CaveGen.findGoodLayoutsRatio))) \n || score == allScores.get(0) && CaveGen.indexBeingGenerated > CaveGen.numToGenerate/40) {\n CaveGen.images = true;\n println(\"GoodLayoutScore: \" + Drawer.seedToString(g.initialSeed) + \" -> \" + score);\n }\n else {\n CaveGen.images = false;\n }\n }\n }", "public void returnDogs(Nursery nursery);", "public interface Treat {\n public static final int GIANT_DONUT = 0;\n public static final int GIANT_MATCHA_PARFAIT = 1;\n public static final int GIANT_MINT_CHIP = 2;\n public static final int CUPCAKE_CHERRY = 0;\n public static final int CUPCAKE_VANILLA = 1;\n public static final int CUPCAKE_SUNDAE = 2;\n public static final int SMALL_DONUT = 3;\n public static final int DONUT_PINK_SPRINKLES = 4;\n public static final int DONUT_CHOCOLATE = 5;\n public static final int MATCHA_CAKE = 6;\n public static final int STRAWBERRY_CAKE = 7;\n public static final int CHOCOLATE_CAKE = 8;\n public static final int CHOCO_BANANA_SANDWICH = 9;\n public static final int MINT_CHIP_SANDWICH = 10;\n public static final int RED_VELVET_CAKE = 11;\n public static final int MATCHA_CAKE_ROUND = 12;\n public static final int DONUT_WHITE_NUTS = 13;\n public static final int DONUT_BERRY_JAM = 14;\n //public static final int DONUT_CARAMEL = 15;\n public static final int DONUT_CEREAL = 15;\n //public static final int DONUT_CHOCOLATE_WHITE = 17;\n public static final int DONUT_HALF = 16;\n public static final int DONUT_JELLY_CHOCOLATE = 17;\n public static final int DONUT_LIGHT_BLUE = 18;\n //public static final int DONUT_RED_POWDER = 21;\n public static final int CUPCAKE_CINNAMON = 19;\n public static final int CUPCAKE_MINT_CHOCOLATE = 20;\n public static final int CUPCAKE_PINK_YELLOW = 21;\n public static final int CUPCAKE_RED_VELVET = 22;\n public static final int CUPCAKE_SMORE = 23;\n public static final int DONUT_BLUE_SPRINKLES = 24;\n //public static final int DONUT_MINT_TRI = 28;\n //public static final int DONUT_PURPLE_FLOWER = 29;\n public static final int CAKE_KIWI_STRAWBERRY = 25;\n public static final int DONUT_SILA_BERRY = 26;\n public static final int MOUSSE_TRIPLE_CHOCOLATE = 27;\n public static final int CAKE_PASTEL_RAINBOW = 28;\n public static final int CAKE_CHEESE_SWIRL = 29;\n public static final int MOUSSE_TRIPLE_RASPBERRY = 30;\n public static final int MOUSSE_TRIPLE_LEMON = 31;\n public static final int MOUSSE_TRIPLE_STRAWBERRY= 32;\n\n\n public static final int NUM_TREAT_TYPES = 33;\n public static final int NULL = 100;\n public static final int RED_BEAN_HEART = 101;\n public static final int RED_BEAN_CAKE = 102;\n public static final int BAD_SHROOM = 103;\n public static final int BUFF_MAGNET = 104;\n public static final int CABBAGE = 105;\n public static final int PARTY_BALL = 106;\n public static final int BUFF_PARTY_BALL = 107;\n\n\n\n public void setMove(IObjectMove objMove);\n public IObjectMove getMove();\n public void draw(Canvas canvas);\n public void update(int elapsedTime);\n public Coordinates getCoordinates();\n public int getPoints();\n public Rect getRect();\n public int getRectTop();\n public boolean isDeleted();\n public void reinit(ITreatTypeGood type, int x, int y);\n public void delete();\n public ITreatTypeGood getType();\n}", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "public int getNbDiamond()\n {\n return this.nbDiamond;\n }", "private static Collection<Piece> getCorrectBluePieces() {\n\t\tfinal Collection<Piece> pieces = new ArrayList<Piece>();\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.SERGEANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.LIEUTENANT, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.CAPTAIN, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.COLONEL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.MARSHAL, PlayerColor.BLUE));\n\t\tpieces.add(new Piece(PieceType.FLAG, PlayerColor.BLUE));\n\t\treturn pieces;\n\t}", "public Set<List<String>> combinationForWindDragon(int[] suit) {\n if (suit.length != 7) throw new IllegalArgumentException(\"Not wind and \"\n + \"dragon suit length\");\n //Dragon and suits.\n Set<List<String>> combinations = new HashSet<>();\n List<String> element = new ArrayList<>();\n for (int i = 0; i < suit.length; i++) {\n String s = \"\";\n for (int j = 0; j < suit[i]; j++) {\n s += i;\n }\n if (s != \"\") {\n element.add(s);\n }\n }\n combinations.add(element);\n return combinations;\n }", "public int getDiamondCount() {\r\n\t\treturn diamondCount;\r\n\t}", "public String getAllFarmAnimals(){\r\n\t\tPlayer[] p = Bukkit.getOnlinePlayers();\r\n\t\t\tfor(Player player : p){\r\n\t\t\tif(plugin.getAnimalData().contains(\"Farmer.\" + player.getUniqueId().toString())){\r\n\t\t\tString farmer = player.getUniqueId().toString();\t\r\n\t\t\tSet<String> animals = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\tfor(String animal : animals){\r\n\t\treturn animal;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "private Map<String, Integer> identifyInputs(Bookshelf basis) {\n\n\tMap<String, Integer> idPairs = new HashMap<String, Integer>();\n\n\tmaxTagMag = 0;\n\n\tint i = 0;\n\n\tIterator<Book> books = basis.iterator();\n\n\twhile (books.hasNext()) {\n\t Book book = books.next();\n\t Iterator<Map.Entry<String, Integer>> tags = book.enumerateTags()\n\t\t .iterator();\n\n\t while (tags.hasNext()) {\n\n\t\tMap.Entry<String, Integer> tag = tags.next();\n\n\t\tmaxTagMag = Math.max(maxTagMag, Math.abs(tag.getValue()));\n\n\t\tif (!idPairs.containsValue(tag.getKey())) {\n\t\t idPairs.put(tag.getKey(), i);\n\t\t ++i;\n\t\t}\n\t }\n\t}\n\tidPairs.put(OTHER, i);\n\n\tnumTags = i + 1;\n\n\treturn idPairs;\n }", "private boolean isFound(int remaingingMarbles) {\n\n return (Math.log(remaingingMarbles) / Math.log(2)) % 1 == 0 ;\n\n }", "public List<String> extractIllnesses(String description) {\n\t\tList<String> newSentences = this.getSentences(description);\n\t\t\n\t\t// For each sentence, generate valid word sequences\n\t\tList<String> allValidWordSequences = new ArrayList<String>();\n\t\tnewSentences.forEach(s -> allValidWordSequences.addAll(this.getWordCombinations(s)));\n\n\t\tSicknessMap medicalRecords = SicknessMap.getInstance();\n\t\tList<String> results = allValidWordSequences.stream()\n\t\t\t\t.filter(potentialIllness -> medicalRecords.contains(potentialIllness))\n\t\t\t\t.map(actualIllness -> medicalRecords.getByKey(actualIllness))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn results;\n\t}", "public String considerDiet() {\n if (diet.equals(\"carnivore\")) {\n printedDailyCarbon = allowedCarbonPerDay * 1;\n } else if (diet.equals(\"pescetarian\")) {\n printedDailyCarbon = allowedCarbonPerDay * 0.65;\n } else if (diet.equals(\"vegetarian\")) {\n printedDailyCarbon = allowedCarbonPerDay * 0.5;\n } else if (diet.equals(\"vegan\")) {\n printedDailyCarbon = ((double) allowedCarbonPerDay / (double) 6) * (double) 2;\n }\n String formattedDailyCarbonFigure = String.format(\"%.2f\", printedDailyCarbon);\n return formattedDailyCarbonFigure;\n }", "static void findSilhouettes(PrivateHashMap<String, PrivateArrayList<String>> image) {\n\n int tempSize = 0;\n\n for (String lab : image.keySet()) {\n\n /* Place any vertex of the graph at the end of the queue */\n if (!graphVisited.containsKey(lab)) {\n queue.addLast(lab);\n bfs(lab);\n }\n\n /* Add the current size of the found silhouette to the array of silhouette sizes. */\n numberOfVertices.add(graphVisited.size() - tempSize);\n tempSize = graphVisited.size();\n }\n }", "public List<Bed> solvedBeds() {\n // TODO: Fix me.\n return bed;\n }", "@Override\n\tpublic void CorrectDes(IDiamond diamond) {\n\t\tint cell = touchCell(diamond.getCenterPosition());\n\t\tint row = CellRow(cell);\n\t\tint col = CellCol(cell);\n\t\tint cell1 = touchCell(diamond.getSource());\n\t\tint row1 = CellRow(cell1);\n\t\tint col1 = CellCol(cell1);\n\t\t\n\t\tIDiamond temp = screen.diamonds.get(cell);\n\t\ttemp.setSource(diamond.getPosX(), diamond.getPosY());\n\t\ttemp.setDestination(diamond.getPosX(), diamond.getPosX());\n\n\t\tscreen.logic.grid[row][col] = diamond.getDiamondValue();\n\t\ttemp.setDiamondValue(diamond.getDiamondValue());\n//\t\ttemp.setSprite(gAssets.getDiamondAnimation(diamond.getDiamondValue(), screen.getGameID()));\n\t\ttemp.setAction(Diamond.REST);\n\t\ttemp.getBound().width = screen.DIAMOND_WIDTH; temp.getBound().height = screen.DIAMOND_HEIGHT;\n\t\ttemp.setCenterPosition(diamond.getPosX(), diamond.getPosY());\n\t\tscreen.inGridFlag[row][col] = Operator.onBit(Effect.FIXED_POS, screen.inGridFlag[row][col]);\n\t\t\n\t\tchangeStatusBehindFall(row, col);\n\t\t\n//\t\tif (diamondType(screen.logic.grid[row][col]) == IDiamond.SOIL_DIAMOND) {\n//\t\t\tMissionDiamond lScreen = (MissionDiamond) screen;\n//\t\t\t((SharpenDiamond)lScreen.mission).add(row, col);\n//\t\t}\n\t\t\n\t\tif (diamondType(screen.logic.grid[row][col]) == IDiamond.BUTTERFLY_DIAMOND) {\n\t\t\tinstance.spider.addButterfly(row * 8 + col);\n\t\t}\n\t\t\n\t\tif (!inGrid(row1, col1)) {// ngoai gird\n\t\t\tscreen.colHeight[col]++;\n\t\t\tscreen.fallingNum[col]--;\n\t\t\tIDiamond diamondPre = diamond.getPreDiamond();\n\t\t\tIDiamond diamondNext = diamond.getNextDiamond();\n\t\t\tif (diamond == outGridHead[col1]) {\n\t\t\t\toutGridHead[col1] = diamondNext;\n\t\t\t\tif (outGridHead[col1] == null) {\n\t\t\t\t\toutGridHead[col1] = outGridTail[col1] = null;\n\t\t\t\t}\n\t\t\t} else\n\t\t\tif (diamond == outGridTail[col1]) {\n\t\t\t\toutGridTail[col1] = diamondPre;\n\t\t\t}\n\t\t\t\n\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondNext);\n\t\t\tif (diamondNext != null) diamondNext.setPreDiamond(diamondPre);\n\t\t\tdiamond.setNextDiamond(null);\n\t\t\tdiamond.setPreDiamond(null);\n\t\t\tdiamond = null;\n\t\t} else {// trong grid\n\t\t\tIDiamond diamondPre = diamond.getPreDiamond();\n\t\t\tIDiamond diamondNext = diamond.getNextDiamond();\n\t\t\tif (diamond == inGridHead[col1]) {// neu do la diem dau\n\t\t\t\tinGridHead[col1] = diamondNext;\n\t\t\t\tif (inGridHead[col1] == outGridHead[col1]) {// da het danh sach trong grid\n\t\t\t\t\tinGridHead[col1] = inGridTail[col1] = null;// xoa danh sach\n\t\t\t\t}\n\t\t\t} else\n\t\t\tif (diamond == inGridTail[col1]) {// la diem cuoi cua danh sach > 1\n\t\t\t\tinGridTail[col1] = diamondPre;\n\t\t\t}\n\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondNext);\n\t\t\tif (diamondNext != null) diamondNext.setPreDiamond(diamondPre);\n\t\t\tdiamond.setNextDiamond(null);\n\t\t\tdiamond.setPreDiamond(null);\n\t\t\tdiamond = null;\n\t\t}// \n\t\t\n\t\tEffect effect = screen.logic.allocateEffect(Effect.TEMP_EFFECT);\n\t\teffect.setSource(row * 8 + col);\n\t\tscreen.logic.effects.add(effect);\n\t}", "public List<Food> getFoodsByMeal(Meal m) {\n List<Food> foodsByMeal = new ArrayList<>();\n\n for (Food f : units) {\n if (f.getMeal() == m) {\n foodsByMeal.add(f);\n }\n }\n\n return foodsByMeal;\n }", "private RecipeIngredient getDarkMalt() {\n\t\tRecipeIngredient darkMalt = null;\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.MALT) {\n\t\t\t\tif (darkMalt == null) { darkMalt = ri; }\n\t\t\t\telse if (((Malt) ri.getIngredient()).getSrm() > ((Malt) darkMalt.getIngredient()).getSrm()){\n\t\t\t\t\tdarkMalt = ri;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn darkMalt;\t\t\n\t}", "@NotNull\n @Override\n public Object[] getVariants() {\n final Set<String> alreadySeen = ContainerUtil.newHashSet();\n final List<LookupElement> results = ContainerUtil.newArrayList();\n ResolveUtil.treeWalkUp(myElement, new FrogBaseScopeProcessor() {\n @Override\n public boolean execute(@NotNull PsiElement element, ResolveState state) {\n if (element instanceof FrogNamedElement) {\n FrogNamedElement namedElement = (FrogNamedElement) element;\n String name = namedElement.getName();\n if (!alreadySeen.contains(name)) {\n alreadySeen.add(name);\n results.add(buildLookupElement(namedElement));\n }\n }\n return true;\n }\n });\n return ArrayUtil.toObjectArray(results);\n }", "public int[] findVerticalSeam() {\n\n int[] seam = new int[height()];\n\n // Tracks columns of least-energy seams.\n int[][] edgeTo = new int[width()][height()];\n\n // Store cumulative energy of the seams that go through each pixel.\n double[][] distTo = new double[width()][height()];\n\n // Initialize all distances to infinity, except top row.\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n if (row == 0) distTo[col][row] = energy[col][row];\n else distTo[col][row] = Double.POSITIVE_INFINITY;\n }\n }\n\n // Builds least-energy seams through picture.\n for (int row = 1; row < height(); row++) {\n for (int col = 0; col < width(); col++) {\n\n if (col > 0 && distTo[col - 1][row] > (energy[col - 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col - 1][row] = energy[col - 1][row] + distTo[col][row - 1];\n edgeTo[col - 1][row] = col;\n }\n if (distTo[col][row] > (energy[col][row] + distTo[col][row - 1])) {\n\n distTo[col][row] = energy[col][row] + distTo[col][row - 1];\n edgeTo[col][row] = col;\n }\n if (col < width() - 1 && distTo[col + 1][row] > (energy[col + 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col + 1][row] = energy[col + 1][row] + distTo[col][row - 1];\n edgeTo[col + 1][row] = col;\n }\n }\n }\n // Find the end of the least total energy seam.\n double leastEnergy = Double.POSITIVE_INFINITY;\n for (int col = 0; col < width() - 1; col++) {\n double currentEnergy = distTo[col][height() - 1];\n if (currentEnergy < leastEnergy) {\n leastEnergy = currentEnergy;\n seam[height() - 1] = col;\n }\n }\n // Back-track from end of seam to beginning.\n for (int row = height() - 1; row > 0; row--) {\n seam[row - 1] = edgeTo[seam[row]][row];\n }\n return seam;\n }", "public Map<String, Kingdom> generateAllRulers() {\n Map<String, String> kingdomWithAnimal;\n kingdomWithAnimal = kingdomRepository.getRulersWithAnimal();\n Map<String, Kingdom> kingdoms = new HashMap<>();\n for (String emblem : kingdomWithAnimal.keySet()) {\n Kingdom kingdom = new Kingdom(emblem, kingdomWithAnimal.get(emblem));\n kingdom.makeCipherFromAnimalName();\n kingdoms.put(emblem, kingdom);\n }\n return kingdoms;\n }", "private List<Collection<Pixel>> holeFinder() {\n\n\t\tList<Pixel> holePixels = new LinkedList<Pixel>();\n\t\tList<Pixel> boundaryPixels = new LinkedList<Pixel>();\n\t\tQueue<Pixel> bfsQueue = new LinkedList<Pixel>();\n\t\tboolean[][] marked = new boolean[mRows][mCols];\n\n\t\tPixel pixel = findFirstHolePixel();\n\t\tbfsQueue.add(pixel);\n\t\tholePixels.add(pixel);\n\t\tmarked[pixel.getRow()][pixel.getCol()] = true;\n\n\t\twhile (!bfsQueue.isEmpty()) {\n\t\t\tPixel currentPixel = bfsQueue.remove();\n\n\t\t\tList<Pixel> connectedPixels = mConnections.getConnections(currentPixel);\n\n\t\t\t// iterates on the pixels who are connected to current pixel\n\t\t\t// if the pixel was already visited skip it\n\t\t\t// else, if the pixel is a hole add it to the list of the holes and to the BFS Queue to expand the hole\n\t\t\t// \t\t else add it to the result list, the pixel belongs to the boundary\n\t\t\tfor (Pixel p : connectedPixels) {\n\t\t\t\tint indexRow = p.getRow();\n\t\t\t\tint indexCol = p.getCol();\n\n\t\t\t\tif (!marked[indexRow][indexCol]) {\n\t\t\t\t\tmarked[indexRow][indexCol] = true;\n\n\t\t\t\t\tif (mImage[indexRow][indexCol] == HOLE) {\n\t\t\t\t\t\tholePixels.add(p);\n\t\t\t\t\t\tbfsQueue.add(p);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setColor(mImage[p.getRow()][p.getCol()]);\n\t\t\t\t\t\tboundaryPixels.add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tList<Collection<Pixel>> result = new LinkedList<Collection<Pixel>>();\n\t\tresult.add(boundaryPixels);\n\t\tresult.add(holePixels);\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Nature> findNaturesIn() {\n\t\treturn natureRepository.findNaturesIn();\n\t}", "public List<int[]> getThem() {\n int[][] theList = new int[2][2];\n List<int[]> list1 = new ArrayList<int[]>();\n for (int[] x : theList)\n if (x[0] == 4)\n list1.add(x);\n return list1;\n }", "public List<Ingrediente> verCondimentos(){\n // Implementar\n \tList<Ingrediente> condimentos = new LinkedList<Ingrediente>();\n for (Ingrediente ingrediente : ingredientes) {\n \tif(ingrediente.getTipo().toString().toLowerCase() == \"condimento\")\n\t\t\t\tcondimentos.add(ingrediente);\n\t\t}\n \treturn condimentos;\n }", "public static int gemstones(List<String> arr) {\n // Write your code here\n boolean[][] found = new boolean[arr.size()][27];\n \n for (int i = 0; i < arr.size(); i++) {\n String str = arr.get(i);\n \n for (int j = 0; j < str.length(); j++) {\n found[i][str.charAt(j) - 'a'] = true;\n }\n }\n \n int result = 0;\n for (int j = 0; j < found[0].length; j++) {\n boolean allFound = true;\n \n for (int i = 0; i < found.length; i++) {\n if (!found[i][j]) {\n allFound = false;\n break;\n }\n }\n \n if (allFound) {\n result++;\n }\n }\n \n return result;\n }", "public void printDogsOfBreed(String breed){\n System.out.println(\"Here are the \" + breed + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfBreed(breed);\n for(Dog d : specificDogs){d.printInfo();}\n }", "static int silhouetteAnalyzer(PrivateArrayList<Integer> list) {\n PrivateArrayList<Integer> array = new PrivateArrayList<>();\n\n /* Find the maximum silhouette size in the list. */\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) > maxElement) maxElement = list.get(i);\n }\n\n /* Discard garbage from the list of silhouettes */\n for (int elem : list) {\n if (elem > maxElement * GARBAGE_FACTOR) {\n array.add(elem);\n }\n }\n System.out.println(\"Sizes of silhouettes in pixels: \" + array.toString());\n return array.size();\n }", "ArrayList<ArrayList<Double>> indication(int column) {\r\n\t\tArrayList<ArrayList<Double>> result = new ArrayList<ArrayList<Double>>();\r\n\t\tresult.add(new ArrayList<Double>());\r\n\t\tresult.add(new ArrayList<Double>());\r\n\t\tfor (int i = 0; i < data.size(); ++i) {\r\n\t\t\tint truthCount = 0;\r\n\t\t\tdouble sumTrue = 0;\r\n\t\t\tdouble sumFalse = 0;\r\n\t\t\tfor (int j = 0; j < data.get(column).size(); ++j) {\r\n\t\t\t\tif (data.get(i).get(j)) {\r\n\t\t\t\t\t++truthCount;\r\n\t\t\t\t\tif (data.get(column).get(j)) {\r\n\t\t\t\t\t\tsumTrue += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (data.get(column).get(j)) {\r\n\t\t\t\t\t\tsumFalse += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult.get(0).add(sumTrue / truthCount);\r\n\t\t\tresult.get(1).add(sumFalse / (data.get(column).size() - truthCount));\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "void findInGoods(String str) {\n Iterator<Map.Entry<SportEquipment, Integer>> i = goods.entrySet().iterator();\n int count = 1;\n boolean flag = false; //indicates whether sequences were found or not\n\n while (i.hasNext()) {\n\n Map.Entry<SportEquipment, Integer> pair = i.next();\n SportEquipment seq = pair.getKey();\n String category = seq.getCategory().toString();\n String name = seq.getTitle();\n if (category.contains(str.toUpperCase()) || name.contains(str.toLowerCase())) {\n System.out.println(Integer.toString(count) + Strings.DROP + category + Strings.SEPARATOR2 +\n name + Strings.CURRENCY + seq.getPrice() + Strings.SEPARATOR + pair.getValue());\n flag = true;\n }\n count++;\n }\n if (!flag) System.out.println(Strings.ITEM_IS_NOT_FOUND);\n\n }", "protected boolean dangerAnimal(double margin) {\n if (!state.isHoldingItem() && !(state.isSearching() && state.getTimeToFinishSearching() > 1)) {\n return false;\n }\n FoodType type = state.isHoldingItem() ? state.getItemHeld() : state.getFoodSearched();\n int dangerGoose = 0;\n int dangerMonkey = 0;\n final Point location = state.getLocation();\n for (Animal animal : animals) {\n if (animal.isEating()) {\n continue;\n }\n if (animal.getType() == AnimalType.MONKEY) { //monkey\n if (//distance(animal.predictNextLocation(), location) <= 5.0 + 1e-7 && \n distance(animal.getLocation(), location) <= 5.0 + 1e-7 + margin) {\n dangerMonkey += 1;\n }\n } else if (type == FoodType.SANDWICH) { //goose\n if (//distance(animal.predictNextLocation(), location) <= 2.0 + 1e-7 &&\n distance(animal.getLocation(), location) <= 2.0 + 1e-7 + margin) {\n dangerGoose += 1;\n }\n }\n }\n return (dangerGoose >= 1 || dangerMonkey >= 3);\n }", "public float[] sense() {\r\n float[] ret = new float[landmarks.length];\r\n \r\n for(int i=0;i<landmarks.length;i++){\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y);\r\n ret[i] = dist + (float)random.nextGaussian() * senseNoise;\r\n } \r\n return ret;\r\n }", "@Test\n\tpublic void buildDiamond_widestPointCharSetToCharGreaterThanA_returnedValueHasCorrectNumberOfRepetitions() {\n\t\tfor (char widestPointChar = 'B'; widestPointChar <= 'Z'; widestPointChar++) {\n\t\t\t//assume\n\t\t\tint diagonalLength = widestPointChar - Diamond.BASE_CHARACTER + 1;\n\n\t\t\t//act\n\t\t\tString diamondString = Diamond.buildDiamond(widestPointChar);\n\n\t\t\t//assert\n\t\t\tchar[] diagonal = new char[diagonalLength];\n\t\t\tArrays.fill(diagonal, widestPointChar);\n\n\t\t\tassertTrue(diamondString.contains(String.valueOf(diagonal)));\n\t\t\tassertEquals(Math.pow(diagonalLength, 2), diamondString.length());\n\t\t}\n\t}", "default Stream<Triple> witnesses(Triple... elements) {\n Set<Triple> toBeMatched = new HashSet<>(Arrays.asList(elements));\n return apex().carrier().elements().filter(witnes -> {\n return toBeMatched.stream().allMatch(target -> {\n return projections().anyMatch(morphism -> morphism.apply(witnes).map(target::equals).orElse(false));\n });\n });\n }", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"\\\\bis\\\\b\"); // эффект тот же\n\n Matcher m = p.matcher(\"this island is beautiful\");\n while (m.find()){\n System.out.println(m.start() + \" \" + m.group());\n }\n }", "public static void main(String[] args) {\n\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"How high a diamond would you like? Please enter a number:\");\r\n\r\n int dHeight = scanner.nextInt();\r\n\r\n String pyr = \"*\";\r\n\r\n for (int i = 0; i < ((dHeight-1)/2)+1; i++) {\r\n for (int j = 0; j < ((dHeight-1)/2) - i; j++) {\r\n System.out.print(\" \");\r\n }\r\n System.out.println(pyr);\r\n pyr = pyr + \"**\";\r\n }\r\n pyr = pyr.substring(1, pyr.length() - 1);\r\n\r\n for (int i = 0; i < ((dHeight - 1) / 2); i++) {\r\n for (int j = 0; j < i + 1; j++) {\r\n System.out.print(\" \");\r\n }\r\n pyr = pyr.substring(1, pyr.length() - 1);\r\n System.out.println(pyr);\r\n }\r\n\r\n System.out.println(\"How high a diamond would you like? Please enter a number:\");\r\n\r\n dHeight = scanner.nextInt();\r\n\r\n for (int i = 0; i < ((dHeight + 1) / 2); i++) {\r\n for (int j = 0; j < ((dHeight - 1) / 2) - i; j++) {\r\n System.out.print(\" \");\r\n }\r\n for (int k = 0; k < 2 * i + 1; k++) {\r\n System.out.print(\"*\");\r\n }\r\n System.out.println();\r\n }\r\n for (int i = 0; i < ((dHeight - 1) / 2); i++) {\r\n for (int j = 0; j < i + 1; j++) {\r\n System.out.print(\" \");\r\n }\r\n for (int k = 0; k < (dHeight - 2) - 2 * i; k++) {\r\n System.out.print(\"*\");\r\n }\r\n System.out.println();\r\n }\r\n }", "public boolean isAnimalFood(Material item){\r\n\t\tif(item == Material.HAY_BLOCK || item == Material.SEEDS || item == Material.ROTTEN_FLESH || item == Material.RAW_BEEF || item == Material.PORK\r\n\t\t\t\t|| item == Material.RAW_FISH){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public ArrayList<String> getDeterminers(HashMap<String, String> simplePOSTagged) {\n ArrayList det = new ArrayList();\n for(String word: simplePOSTagged.keySet()){\n if (simplePOSTagged.get(word).equals(\"det\")){\n det.add(word);\n }\n }\n return det;\n }", "public boolean foodDetection() {\n ArrayList<Creature> creatures = world.getCreatureList();\n for (Creature c : creatures) {\n if (c.creatureLocation().equals((x + 1) + \",\" + y) || c.creatureLocation().equals((x - 1) + \",\" + y) ||\n c.creatureLocation().equals(x + \",\" + (y + 1)) || c.creatureLocation().equals(x + \",\" + (y - 1))) {\n //System.out.println(\"Creature Found: \" + c.creatureLocation());\n return true;\n }\n }\n return false;\n }", "public static LinkedList<String> collectBeliefIdsInIntention(Intention it) {\n\t\tLinkedList<String> eos = new LinkedList<String>();\n\n\t\tfor (IntentionalContent itc : it.content) {\n\t\t\teos.addAll(collectBeliefIdsInDFormula(itc.preconditions));\n\t\t\teos.addAll(collectBeliefIdsInDFormula(itc.postconditions));\n\t\t}\n\t\treturn eos;\n\t}", "@Override\n public double[] find(BufferedImage image, boolean debug) throws IOException {\n\n ListDisplayPanel panel = debug ? new ListDisplayPanel() : null;\n\n List<Shape> shapes = ImageProcessingPipeline.fromBufferedImage(image, panel)\n .gray()\n .medianBlur(3) // this is fairly critical\n .edges()\n .dilate()\n .contours()\n .polygons(0.05, 0.05)\n .getExternalShapes();\n\n int expectedWidth = 40 * 3; // 40mm\n int expectedHeight = 20 * 3; // 20mm\n int tolerancePct = 40;\n List<Shape> filtered = GeometryUtils.filterByArea(shapes, expectedWidth, expectedHeight, tolerancePct);\n List<Shape> nonOverlapping = GeometryUtils.filterNonOverlappingBoundingBoxes(filtered);\n\n if (debug) {\n System.out.println(shapes);\n System.out.println(filtered);\n System.out.println(nonOverlapping);\n ShowImages.showWindow(panel, \"Binary Operations\", true);\n }\n return new double[] { nonOverlapping.size() % 3 }; // just return as an int mod 3\n }", "public abstract List<Direction> searchForCheese(Maze maze);", "public int[] findVerticalSeam() {\n checkTransposed();\n int[] seam = new int[height];\n if (height <= 2) return seam;\n\n int[] edgeTo = new int[width * height];\n double[] distTo = new double[width * height];\n\n // Initiate distTo to Infinity\n for (int x = 0; x < width; x++) {\n for (int y = 1; y < height; y++) {\n distTo[xyTo1D(x, y)] = Double.POSITIVE_INFINITY;\n }\n }\n // You should not need recursion. Note that the underlying DAG has such special structure\n // that you don’t need to compute its topological order explicitly\n // Run BFS (topological sort) for the implicit DAG to search energy and save at distTo[]\n // The row-major or column-major traverse order make a difference here\n for (int y = 1; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > 0 && distTo[xyTo1D(x - 1, y)] > energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x - 1, y)] = energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x - 1, y)] = x;\n }\n if (distTo[xyTo1D(x, y)] > energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x, y)] = energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x, y)] = x;\n }\n if (x < width - 1 && distTo[xyTo1D(x + 1, y)] > energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x + 1, y)] = energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x + 1, y)] = x;\n }\n }\n }\n // Find the seam endpoint of minimum energy at the last line\n for (int x = 1; x < width - 1; x++) {\n if (distTo[xyTo1D(seam[height - 2], height - 2)] > distTo[xyTo1D(x, height - 2)]) {\n seam[height - 2] = x;\n }\n }\n // Use edgeTo to backtrack the path of minimum energy\n for (int y = height - 2; y > 0; y--) {\n seam[y - 1] = edgeTo[xyTo1D(seam[y], y)];\n }\n // Follow set at border of test examples\n // helpful to reset energy when shifting array elements\n // cutoff to be 0\n seam[height - 1] = Math.max(seam[height - 2] - 1, 0);\n return seam;\n }", "public static List<Nutrient> getFoodNutrients(ItemStack eatingFood) {\n\t\tList<Nutrient> nutrientsFound = new ArrayList<>();\n\n\t\t// Loop through nutrients to look for food\n\t\tfoodSearch:\n\t\tfor (Nutrient nutrient : NutrientList.get()) { // All nutrients\n\t\t\t// Search foods\n\t\t\tfor (ItemStack listedFood : nutrient.foodItems) { // All foods in that category\n\t\t\t\tif (listedFood.isItemEqual(eatingFood)) {\n\t\t\t\t\tnutrientsFound.add(nutrient); // Add nutrient\n\t\t\t\t\tcontinue foodSearch; // Skip rest of search in this nutrient, try others\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Search ore dictionary\n\t\t\tfor (String listedOreDict : nutrient.foodOreDict) { // All ore dicts in that nutrient\n\t\t\t\tfor (ItemStack itemStack : OreDictionary.getOres(listedOreDict)) { // All items that match that oredict (eg. listAllmilk)\n\t\t\t\t\tif (itemStack.isItemEqual(eatingFood)) { // Our food matches oredict\n\t\t\t\t\t\tnutrientsFound.add(nutrient); // Add nutrient\n\t\t\t\t\t\tcontinue foodSearch; // Skip rest of search in this nutrient, try others\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn nutrientsFound;\n\t}", "static boolean goldInInnerBags(ArrayList<String> innerBags) {\n // if the inner bags are atleast 1, then check inner bags otherwise return false.\n if(innerBags.isEmpty()) {\n // if there is a bag that is shiny gold coloured then return true\n if(innerBags.contains(\"shiny gold\")) {\n return true;\n // else look through the second layer of inner bags\n } else {\n boolean goldBagFound = false;\n int iterator = 0;\n // recursively iterate through inner bags until reached the end\n // return if a gold bag is found.\n while (!goldBagFound && iterator < innerBags.size()) {\n goldBagFound = goldInInnerBags(colouredBags.get(innerBags.get(iterator)));\n iterator = iterator + 1;\n }\n return goldBagFound;\n }\n } else {\n return false;\n }\n }", "private List<Ingredient> fillFirstMeal(List<Ingredient> ingredients) throws Exception {\n List<Ingredient> availableIngredients = new ArrayList<Ingredient>(ingredients);\n mMeals.get(0).fillCarbs(ingredients);\n mMeals.get(0).fillSauce(ingredients);\n availableIngredients.removeAll(mMeals.get(0).getIngredients());\n return availableIngredients;\n }", "public static int[] allFoodIds() {\n return new int[]{\n Items.HERRING_347,\n Items.TUNA_361,\n Items.SALMON_329,\n Items.TROUT_333,\n Items.LOBSTER_379,\n Items.SWORDFISH_373,\n Items.MONKFISH_7946,\n Items.BASS_365,\n Items.SHARK_385,\n Items.MEAT_PIZZA_2293,\n 2295, // Half Meat Pizza\n Items.PEACH_6883,\n Items.CAKE_1891,\n 1893, // 2/3 Cake\n Items.SLICE_OF_CAKE_1895,\n Items.ANGLERFISH_13441,\n Items.JUG_OF_WINE_1993\n };\n }", "public static void findIngredient(String ingredient, ArrayList<Recipe> recipes) {\n System.out.println();\n System.out.println(\"Recipes:\");\n for (Recipe recipe: recipes) {\n if (recipe.getIngredients().contains(ingredient)) {\n System.out.println(recipe);\n }\n }\n System.out.println();\n }", "public List<Ingredient> findAllIngredients() {\n\t\treturn null;\n\t}", "public void printSpayedOrNeutered(){\n System.out.println(\"Spayed or Neutered Dogs:\");\n ArrayList<Dog> dogsSpayedOrNeutered = dogsSpayedOrNeutered();\n for(Dog d : dogsSpayedOrNeutered){\n d.printInfo();\n }\n }", "public void tagOnlyNomorDua() {\r\n Iterator<Kalimat> iterSatu = MarkovCore.TAG_ONLY.iterator();\r\n while (iterSatu.hasNext()) {\r\n Kalimat kalimat = iterSatu.next();\r\n System.out.println(kalimat.getRawKalimat());\r\n System.out.println(kalimat.getBigramProbability(Kalimat.TAG_ONLY));\r\n }\r\n }", "Map<String, Integer> getIngredients();", "public void createAnimals() {\n\t\tanimals = new Animal[noAnimals];\n\n\t\tfor (int i = 0; i < noAnimals; i++) {\n\t\t\tanimals[i] = new Animal(noAnimals);\n\t\t\tanimals[i].setDiffCo(diffCo[i]);\n\t\t\tanimals[i].setDiffusionRate(diffusionRate[i]);\n animals[i].initiateDensities(getIo().getNeighbours().length,getIo().getNeighbours()[0].length);\n\t\t}\n\t\n\t\t animals[0].setName(\"Hare\"); \n\t\t animals[1].setName(\"Puma\");\n\t}", "public int[] findHorizontalSeam() {\n Picture transposed = new Picture(this.height(), this.width());\n for (int i = 0; i < this.height(); i++) {\n for (int j = 0; j < this.width(); j++) {\n transposed.set(i, j, picture.get(j, i));\n }\n }\n SeamCarver s = new SeamCarver(transposed);\n return s.findVerticalSeam();\n }", "private static void registerCustomRecipes() {\n if(Configs.isEnabled(BloodContainerConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 0; i < BloodContainerConfig.getContainerLevels(); i++) {\n \tItemStack input = new ItemStack(BloodContainer.getInstance(), 1, i);\n if(!BloodContainer.getInstance().isCreativeItem(input)) {\n \tfinal int capacity = BloodContainer.getInstance().getCapacity(input);\n \tItemStack result = new ItemStack(DarkTank.getInstance());\n GameRegistry.addRecipe(new ObservableShapelessRecipe(result,\n new Object[]{\n \t\t\tinput,\n \t\t},\n new IRecipeOutputObserver() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic ItemStack getRecipeOutput(\n\t\t\t\t\t\t\t\t\t\tInventoryCrafting grid,\n\t\t\t\t\t\t\t\t\t\tItemStack output) {\n\t\t\t\t\t\t\t\t\tItemBlockFluidContainer container = (ItemBlockFluidContainer) output.getItem();\n\t\t\t\t \tcontainer.setCapacity(output, capacity);\n\t\t\t\t \tItemStack input = null;\n\t\t\t\t \tfor(int j = 0; j < grid.getSizeInventory(); j++) {\n\t\t\t\t \t\t\tItemStack element = grid.getStackInSlot(j);\n\t\t\t\t \t\t\tif(element != null && element.getItem() == BloodContainer.getInstance()) {\n\t\t\t\t \t\t\t\tinput = element;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t}\n\t\t\t\t \tif(input == null) {\n\t\t\t\t \t\treturn null;\n\t\t\t\t \t}\n\t\t\t\t \tFluidStack resource = BloodContainer.getInstance().getFluid(input);\n\t\t\t\t \tif(resource != null && resource.amount > 0) {\n\t\t\t\t \t\tcontainer.fill(output, resource, true);\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\treturn output;\n\t\t\t\t\t\t\t\t}\n \t\n }\n ));\n }\n }\n }\n\n // Entangled Chalice unique id\n if(Configs.isEnabled(EntangledChaliceConfig.class)\n && Configs.isEnabled(DarkGemConfig.class)\n && Configs.isEnabled(CorruptedTearConfig.class)) {\n Item tear = CorruptedTearConfig._instance.getItemInstance();\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Items.gold_ingot), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n item.setNextTankID(newStack);\n return newStack;\n }\n }));\n\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n String tankID = item.getTankID(craftingGrid.getStackInSlot(4));\n item.setTankID(newStack, tankID);\n return newStack;\n }\n }));\n }\n \n // Dark tank upgrades\n if(Configs.isEnabled(DarkTankConfig.class)) {\n \tfor(int i = 1; i < 9; i++) {\n \t\tItemBlockFluidContainer tankItem = (ItemBlockFluidContainer) Item.getItemFromBlock(DarkTank.getInstance());\n\t \tGameRegistry.addRecipe(new ItemBlockFluidContainerCombinationRecipe(i, tankItem));\n \t}\n }\n\n // Blood Extractor upgrades\n if(Configs.isEnabled(BloodExtractorConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 1; i < 9; i++) {\n GameRegistry.addRecipe(new BloodExtractorCombinationRecipe(i));\n }\n }\n \t\n if (Configs.isEnabled(EnvironmentalAccumulatorConfig.class)) {\n ItemStack outputStack = null;\n String recipeName = null;\n \n // Add the different weather container recipes\n if (Configs.isEnabled(WeatherContainerConfig.class)) {\n\t ItemStack emptyContainer = WeatherContainer.createItemStack(WeatherContainerTypes.EMPTY, 1);\n\t WeatherType[] weatherInputs = {WeatherType.CLEAR, WeatherType.LIGHTNING, WeatherType.RAIN};\n\t WeatherType[] weatherOutputs = {WeatherType.RAIN, WeatherType.RAIN, WeatherType.CLEAR};\n\t \n\t for (int i=0; i < weatherInputs.length; ++i) {\n recipeName = \"WeatherContainer\" + weatherInputs[i].getClass().getSimpleName();\n outputStack = WeatherContainer.createItemStack(\n WeatherContainerTypes.getWeatherContainerType(weatherInputs[i]), 1);\n\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n weatherInputs[i]\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n outputStack,\n weatherOutputs[i]\n ),\n new EnvironmentalAccumulatorRecipeProperties()\n );\n\t }\n }\n\n // Add biome extract recipes\n if(Configs.isEnabled(BiomeExtractConfig.class) && BiomeExtractConfig.hasRecipes) {\n ItemStack emptyContainer = new ItemStack(BiomeExtract.getInstance());\n ItemStack filledContainer = BiomeExtract.getInstance().createItemStack(null, 1); // Still dummy!\n filledContainer.setItemDamage(OreDictionary.WILDCARD_VALUE);\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n filledContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeProperties(1000, BiomeExtractConfig.envirAccCooldownTime, -1.0D, null, new EnvironmentalAccumulatorRecipeProperties.IEAResultOverride() {\n @Override\n public ItemStack getResult(IBlockAccess world, int x, int y, int z, ItemStack originalResult) {\n World worldSafe = (World) world;\n BiomeGenBase biome = worldSafe.getBiomeGenForCoords(x, z);\n if(BiomeExtractConfig._instance.isCraftingBlacklisted(biome.biomeID)) {\n return BiomeExtract.getInstance().createItemStack(null, 1);\n } else {\n return BiomeExtract.getInstance().createItemStack(biome, 1);\n }\n }\n })\n );\n }\n }\n }", "public ArrayList<Dog> dogsSpayedOrNeutered(){\n ArrayList<Dog> dogsSpayedOrNeutered = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.isSpayedOrNeutered()){\n dogsSpayedOrNeutered.add(d);\n }\n }\n\n return dogsSpayedOrNeutered;\n }", "boolean monkeyBusiness(Monkey[] monkeys) {\n boolean allSmiles;\n int smiles = 0;\n for(Monkey monkey: monkeys) {\n if(monkey.smile) {\n smiles++;\n }\n }\n allSmiles = smiles >= (double) monkeys.length / 2;\n return allSmiles;\n }", "private int countMaxAtropisomricBond(OEGraphMol in)\n { OEBondBaseIter bIt;\n Set<Integer> atropBondSet = new HashSet<Integer>();\n\n // find all bonds that could possbily be atropisomeric\n OEMatchBaseIter mIt = POSSIBLEAtropIsomer.Match(in);\n while( mIt.hasNext() )\n { OEMatchBase mb = mIt.next();\n\n bIt = mb.GetTargetBonds();\n atropBondSet.add(bIt.next().GetIdx());\n bIt.delete();\n }\n mIt.delete();\n\n return atropBondSet.size();\n }", "private static void drawNumDiamondIter(int h) {\n double hd = h;\r\n boolean odd = hd % 2 == 1;\r\n int middle = (int) Math.ceil(hd / 2);\r\n\r\n\r\n // initialize the printed counter and the loop.\r\n int c = 0;\r\n for(int i = 1; i <= h; i++) {\r\n\r\n if(i <= middle) {\r\n // we are in the top half\r\n c++;\r\n\r\n // how many whitespace prints? take the cut height middle and\r\n // subtract the amount of spaces characters will take up\r\n for(int j = h/2 -c +1; j > 0; j--)\r\n System.out.print(\" \");\r\n\r\n // print characters, always an odd number, so\r\n // double the c -1\r\n for(int j = c*2 -1; j > 0; j--)\r\n System.out.print(c);\r\n\r\n System.out.println(\"\");\r\n\r\n } else {\r\n // we are in the bottom half.\r\n // same as above, just the other direction.\r\n // if h is odd, subtract it at the beginning, so we do not get double middle lines\r\n if(odd)\r\n c--;\r\n\r\n for(int j = h/2 -c +1; j > 0; j--)\r\n System.out.print(\" \");\r\n\r\n for(int j = c*2 -1; j > 0; j--)\r\n System.out.print(c);\r\n\r\n // if h is even, subtract at the end, so we do get middle lines\r\n if(!odd)\r\n c--;\r\n\r\n System.out.println(\"\");\r\n }\r\n }\r\n\r\n }", "public HashSet<String> getAllDrugs(){\r\n\t\tlogger.info(\"* Get All PharmGKB Drugs... \");\t\t\r\n\t\tHashSet<String> drugList = new HashSet<String>();\r\n\t\tint nbAdded = 0;\r\n\t\ttry{\r\n\t\t\tGetPgkbDrugList myClientLauncher = new GetPgkbDrugList();\r\n\t\t\tdrugList = myClientLauncher.getList();\r\n\t\t}catch(Exception e){\r\n\t\t\tlogger.error(\"** PROBLEM ** Problem with PharmGKB web service specialSearch.pl 6\", e);\r\n\t\t}\r\n\t\tnbAdded = drugList.size();\r\n\t\tlogger.info((nbAdded)+\" drugs found.\");\r\n\t\treturn drugList;\r\n\t}", "private Colors ingameColor() {\n\t\tList<Colors> colors = new ArrayList<Colors>();\n\t\tIterator<Sphere> it = this.spheres.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSphere s = it.next();\n\t\t\tif (!colors.contains(s.color())) {\n\t\t\t\tcolors.add(s.color());\n\t\t\t}\n\t\t}\n\t\treturn colors.get(MathUtils.random(colors.size() - 1));\n\t}", "public IIcon getIconFromDamage(int par1)\n/* 54: */ {\n/* 55:53 */ if (this.isIron) {\n/* 56:54 */ return Items.iron_sword.getIconFromDamage(par1);\n/* 57: */ }\n/* 58:55 */ return Items.diamond_sword.getIconFromDamage(par1);\n/* 59: */ }", "public static void main(String args[])\n {\n // Let the given dictionary be following\n String dictionary[] = {\"hit\", \"hits\", \"kilts\", \"pEg\",\"peN\",\"pentAgon\",\"slit\",\"slits\",\"sTilts\"};\n\n\n\n char boggle[][] = {{'P','W','Y','R'},\n {'E','N','T','H'},\n {'G','S','I','Q'},\n {'O','L','S','A'}\n };\n\n String[] val=findWords(boggle,dictionary);\n\n System.out.println(Arrays.toString(val));\n\n\n }", "public boolean hasDog() {\n return dataBodyCase_ == 3;\n }", "static int gemstones(String[] arr) \r\n {\r\n int i,j,k,v=-1,l=arr[0].length(),g2[]=new int[26],c=0;\r\n char g1[]=new char[26];\r\n for(i=0;i<26;i++)\r\n {\r\n g1[i]=(char)(97+i);\r\n g2[i]=0;\r\n }\r\n for(i=0;i<l;i++)\r\n for(j=0;j<26;j++)\r\n if(g1[j]==arr[0].charAt(i)) g2[j]+=1;\r\n for(i=0;i<26;i++)\r\n if(g2[i]>0) ++c;\r\n char s[]=new char[c];\r\n for(i=0;i<26;i++)\r\n if(g2[i]>0) s[++v]=g1[i];\r\n \r\n int ci[]=new int[c];\r\n for(i=0;i<c;i++)\r\n ci[i]=0;\r\n v=0;\r\n \r\n for(i=1;i<arr.length;i++)\r\n {\r\n for(k=0;k<c;k++)\r\n for(j=0;j<arr[i].length();j++)\r\n if(arr[i].charAt(j)==s[k]) {++ci[k];break;}\r\n }\r\n for(i=0;i<c;i++)\r\n if(ci[i]==arr.length-1) ++v;\r\n return v;\r\n }", "@Override\n\tprotected void fallBeginInGrid(int j) {\n\t\tint i = 0;\n\t\tint empty = -1;\n\t\tIDiamond diamondCur = null;\n\t\tIDiamond diamondPre = null;\n\t\tIDiamond firstDiamond = null;\n\t\n\t\tif (screen.colHeight[j] < 8) {\n\t\t\tfirstDiamond = null;\n\t\t\tdiamondCur = null;\n\t\t\tdiamondPre = null;\n\t\t\tfor (i = 0 ; i < 8 ; i++) { // vong for danh cho grid\n\t\t\t\tint flag1 = screen.inGridFlag[i][j];\n\t\t\t\tint value = screen.grid[i][j];\n\t\t\t\tint dType = diamondType(value);\n\t\t\t\tif (flag1 == Effect.EMPTY) {\n\t\t\t\t\tif (empty == -1) empty = i; \n\t\t\t\t} \n\t\t\t\tif (empty > -1) {\n\t\t\t\t\tif (Operator.getBit(Effect.FIXED_POS, flag1) > 0 && screen.logic.grid[i][j] != -1 && dType != IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tdiamondCur = screen.logic.savedDiamonds.newObject(\n\t\t\t\t\t\t\t\tscreen.gridPos.x + j * screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + i\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_WIDTH,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_HEIGHT, screen);\n\t\t\t\t\t\tdiamondCur.setDestination(screen.gridPos.x + j\n\t\t\t\t\t\t\t\t* screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + empty\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2);\n\t\t\t\t\t\tfallDown = true;\n\t\t\t\t\t\tdiamondCur.setDiamondValue(screen.logic.grid[i][j]);\n//\t\t\t\t\t\tMyAnimation animation = gAssets.getDiamondAnimation(screen.logic.grid[i][j], screen.getGameID());\n//\t\t\t\t\t\tdiamondCur.setSprite(animation);\n\t\t\t\t\t\tdiamondCur.setAction(Diamond.FALL);\n\t\t\t\t\t\t\n\t\t\t\t\t\tchangeStatusBeforeFall(i, j);\n//\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.SOIL_DIAMOND) {\n//\t\t\t\t\t\t\tMissionDiamond lScreen = (MissionDiamond) screen;\n//\t\t\t\t\t\t\t((SharpenDiamond)lScreen.mission).remove(i, j);\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.BUTTERFLY_DIAMOND) {\n\t\t\t\t\t\t\tinstance.spider.removeButterfly(i * 8 + j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tscreen.inGridFlag[i][j] = 0;\n\t\t\t\t\t\tscreen.logic.grid[i][j] = -1;\n\t\t\t\t\t\tempty++;\n\t\t\t\t\t\t// phan xau chuoi\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (firstDiamond == null) firstDiamond = diamondCur;\n\t\t\t\t\t\tdiamondCur.setPreDiamond(diamondPre);\n\t\t\t\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondCur);\n\t\t\t\t\t\tdiamondPre = diamondCur;\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (flag1 > Effect.EMPTY || dType == IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tempty = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (inGridHead[j] == null) {// chua ton tai danh sach truoc do\n\t\t\t\tinGridHead[j] = firstDiamond;// dau danh sach hien tai la firstDiamond\n\t\t\t\tinGridTail[j] = diamondCur;// cuoi danh sach hien tai la diamondCur\n\t\t\t} else {// ton tai danh sach truoc do\n\t\t\t\tif (firstDiamond != null) {// phai ton tai danh sach hien tai\n\t\t\t\t\tif (firstDiamond.getPosY() < inGridHead[j].getPosY()) {// danh sach hien taio truoc\n\t\t\t\t\t\t// noi o dau danh sach cu\n\t\t\t\t\t\tinGridHead[j].setPreDiamond(diamondCur); \n\t\t\t\t\t\tdiamondCur.setNextDiamond(inGridHead[j]);\n\t\t\t\t\t\t// sua dau\n\t\t\t\t\t\tinGridHead[j] = firstDiamond;\n\t\t\t\t\t} else {// danh sach hien tai o sau\n\t\t\t\t\t\t// noi p duoi danh sach cu\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(firstDiamond);\n\t\t\t\t\t\tfirstDiamond.setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\t// sua duoi\n\t\t\t\t\t\tinGridTail[j] = diamondCur;\n\t\t\t\t\t}\n\t\t\t\t\t// moc noi roi trong vao danh sach roi ngoai\n\t\t\t\t\tif (outGridHead[j] != null) {// ton tai danh sach roi ngoai\n\t\t\t\t\t\toutGridHead[j].setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(outGridHead[j]);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public List<Ingrediente> verIngredientes(){\n\t\t// Implementar\n\t\treturn ingredientes;\n\t}", "public void calculateFullHouse(Die[] dice) {\n int occurrances = 0;\n for (int i = 1; i <= 6; i++) {\n for (Die d : dice) {\n if (d.getFace() == i) {\n occurrances++;\n }\n }\n if (occurrances == 3) {\n int newOccurrances = 0;\n for (int j = 1; j <= 6; j++) {\n for (Die d : dice) {\n if (d.getFace() == j) {\n newOccurrances++;\n }\n }\n if (newOccurrances == 2) {\n this.fullHouse = 25;\n return;\n }\n else newOccurrances = 0;\n }\n }\n else occurrances = 0;\n }\n this.fullHouse = 0;\n return;\n }", "public List<Piece> whitePieces();", "void pairDown() {\n\n Set<String> ingredientsToRemove = new HashSet<String>();\n Set<String> allergensToRemove = new HashSet<String>();\n\n do {\n\n ingredientsToRemove.clear();\n allergensToRemove.clear();\n\n // Iterate the dishes.\n for (Dish dish : dishes) {\n \n // Iterate the allergens.\n for (String allergen : dish.allergenNames) {\n\n Set<String> ingredientsInAll = new HashSet<String>();\n\n // Iterate the ingredients.\n for (String ingredient : dish.ingredientNames) {\n\n boolean inAll = true;\n\n // Iterate the dishes.\n for (Dish iDish : dishes) {\n\n // Check if this dish has the allergen.\n if (!iDish.allergenNames.contains(allergen))\n continue;\n\n // Check if this dish has the ingredient.\n if (!iDish.ingredientNames.contains(ingredient)) {\n inAll = false;\n break;\n }\n }\n\n if (inAll) {\n \n // This ingredient is in all.\n // It's a candidate for removal. But are there others?\n ingredientsInAll.add(ingredient);\n }\n }\n\n // If there's only one ingredient in all of the dishes with this allergen\n // then the ingredient and allergen can be removed from the entire menu and we can start over.\n if (ingredientsInAll.size() == 1) {\n ingredientsToRemove.add((String)ingredientsInAll.toArray()[0]);\n allergensToRemove.add(allergen);\n\n // For part 2, store the allergen and the food that contains it.\n allergensToIngredients.put(allergen, (String)ingredientsInAll.toArray()[0]);\n \n if (!allAllergens.contains(allergen))\n allAllergens.add(allergen);\n }\n }\n }\n\n // Remove identified ingredients and allergens from the menu.\n for (Dish dish : dishes) {\n\n for (String ingredient : ingredientsToRemove)\n dish.ingredientNames.remove(ingredient);\n \n for (String allergen : allergensToRemove)\n dish.allergenNames.remove(allergen); \n }\n\n } while (ingredientsToRemove.size() > 0);\n }", "@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }", "private static ArrayList<Integer> getInterestingHalPids() {\r\n try {\r\n IServiceManager serviceManager = IServiceManager.getService();\r\n ArrayList<IServiceManager.InstanceDebugInfo> dump =\r\n serviceManager.debugDump();\r\n HashSet<Integer> pids = new HashSet<>();\r\n for (IServiceManager.InstanceDebugInfo info : dump) {\r\n if (info.pid == IServiceManager.PidConstant.NO_PID) {\r\n continue;\r\n }\r\n\r\n if (Watchdog.HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName) ||\r\n CAR_HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName)) {\r\n pids.add(info.pid);\r\n }\r\n }\r\n\r\n return new ArrayList<Integer>(pids);\r\n } catch (RemoteException e) {\r\n return new ArrayList<Integer>();\r\n }\r\n }", "List<Map<String, Object>> searchIngredient(String name);", "public static Ally getRandomDem () {\n return democrat[(int) (Math.random() * democrat.length)];\n }", "@Override\n\tpublic String ingredients() {\n\t\treturn \"Chicken, Bread, seasoning , cheese\";\n\t}", "public int getDiscrepancyFound() {\n return _discrepancyFound;\n }", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "private int[] getNumOfBullsAndCows(String userString) {\n Matcher nonePattern = Pattern.compile(\"\\\\b[nN]one\\\\b\").matcher(userString);\n Matcher cowsPattern = Pattern.compile(\"\\\\b\\\\d [cC]ow\").matcher(userString);\n Matcher bullsPattern = Pattern.compile(\"\\\\b\\\\d [bB]ull\").matcher(userString);\n Pattern oneNumPattern = Pattern.compile(\"\\\\d\");\n\n if (nonePattern.find()) {\n return new int[]{0, 0};\n }\n\n int[] ans = {0, 0};\n boolean found = false;\n\n if (bullsPattern.find()) {\n String temp = bullsPattern.group();\n Matcher oneNumBulls = oneNumPattern.matcher(temp);\n oneNumBulls.find();\n ans[0] = Integer.parseInt(oneNumBulls.group());\n found = true;\n }\n\n if (cowsPattern.find()) {\n String temp = cowsPattern.group();\n Matcher oneNumCows = oneNumPattern.matcher(temp);\n oneNumCows.find();\n ans[1] = Integer.parseInt(oneNumCows.group());\n found = true;\n }\n\n if (!found) {\n Assertions.fail(\"Cannot find number of bulls or number of cows or None after the input.\");\n }\n\n return ans;\n }", "private static List<DataFlavor> whichOnesWork(Transferable t) {\n\t\tList<DataFlavor> worked = new ArrayList<DataFlavor>();\n\n\t\t// On OSX, any data flavor that uses java.nio.ByteBuffer or an array of bytes\n\t\t// appears to output the object to the console (via System.out?). Geez, can't\n\t\t// Apple even run a frakkin' grep against their code before releasing it?!\n//\t\tPrintStream old = null;\n//\t\tif (MapTool.MAC_OS_X) {\n//\t\t\told = System.out;\n//\t\t\tsetOnOff(null);\n//\t\t}\n\t\tfor (DataFlavor flavor : t.getTransferDataFlavors()) {\n\t\t\tObject result = null;\n\t\t\ttry {\n\t\t\t\tresult = t.getTransferData(flavor);\n\t\t\t} catch (UnsupportedFlavorException ufe) {\n\t\t\t\tif (log.isDebugEnabled())\n\t\t\t\t\tlog.debug(\"Failed (UFE): \" + flavor.toString()); //$NON-NLS-1$\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tif (log.isDebugEnabled())\n\t\t\t\t\tlog.debug(\"Failed (IOE): \" + flavor.toString()); //$NON-NLS-1$\n\t\t\t} catch (Exception e) {\n//\t\t\t\tSystem.err.println(e);\n\t\t\t}\n\t\t\tif (result != null) {\n\t\t\t\tfor (Class<?> type : validTypes) {\n\t\t\t\t\tif (type.equals(result.getClass())) {\n\t\t\t\t\t\tworked.add(flavor);\n\t\t\t\t\t\tif (log.isInfoEnabled())\n\t\t\t\t\t\t\tlog.info(\"Possible: \" + flavor.toString() + \" (\" + result + \")\"); //$NON-NLS-1$\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tif (MapTool.MAC_OS_X)\n//\t\t\tsetOnOff(old);\n\t\treturn worked;\n\t}", "public void addDiamond() {\r\n\t\tthis.diamondCount++;\r\n\t}", "public Set < NamespacedKey > getDiscoveredRecipes ( ) {\n\t\treturn extract ( handle -> handle.getDiscoveredRecipes ( ) );\n\t}", "Collection<String> getPossibleDefeatConditions();", "private static String[] MixedBowl() {\n\t\tString[] bowl = {\"Apples\",\"Oranges\",\"Bananas\"};\n\t\t\n\t\treturn bowl;\n\t}" ]
[ "0.5868833", "0.5177068", "0.5169519", "0.50071836", "0.49556643", "0.49242896", "0.4922945", "0.48821554", "0.48798606", "0.48675692", "0.48411974", "0.4840604", "0.47949663", "0.47708273", "0.4763066", "0.47385934", "0.47377756", "0.47281268", "0.47228196", "0.47191405", "0.4707034", "0.47008863", "0.46951154", "0.469371", "0.46853766", "0.46745268", "0.46744928", "0.4667512", "0.46552125", "0.4654713", "0.46383336", "0.46366054", "0.46340442", "0.463022", "0.46133238", "0.46069983", "0.4603174", "0.45938617", "0.4589017", "0.45837766", "0.45824674", "0.4565479", "0.45563948", "0.45484617", "0.45453358", "0.4535065", "0.45232415", "0.4519898", "0.45092458", "0.4505596", "0.45015034", "0.45006812", "0.4499679", "0.44984177", "0.44954664", "0.4492114", "0.44879305", "0.44820148", "0.44685897", "0.44634065", "0.44608596", "0.44603997", "0.445964", "0.44538048", "0.4449621", "0.44491807", "0.44412005", "0.44403177", "0.44402108", "0.4438346", "0.44258007", "0.44176117", "0.44128248", "0.4412791", "0.44109294", "0.44051543", "0.43998483", "0.43985716", "0.43965778", "0.43957055", "0.4393578", "0.43902525", "0.43887004", "0.43868303", "0.4386675", "0.4386293", "0.43804935", "0.4377325", "0.4376639", "0.43765047", "0.4373438", "0.43725976", "0.43698075", "0.43657216", "0.4363772", "0.43622875", "0.43603837", "0.4359216", "0.43570384", "0.43566802" ]
0.58300537
1
method that checks if a P3 is present in a graph and returns the vertices of the P3s
public List<Collection<Graph.Vertex<Integer>>> checkP3InComponent(UndirectedGraph<Integer,Integer> graph){ List<Collection<Graph.Vertex<Integer>>> p3s = new ArrayList<Collection<Graph.Vertex<Integer>>>(); //stores vertices of p3s found //if the no of vertices in graph is less than 3, then graph cannot have a p3 if(graph.size()<3){ return p3s; } Set<Set<Integer>> marked = new HashSet<Set<Integer>>(); //to prevent creating the same p3 more than once //create mapping between matrix indices and vertex List<Graph.Vertex<Integer>> vertexIndexMap = new ArrayList<Graph.Vertex<Integer>>(); Iterator<Graph.Vertex<Integer>> vIt = graph.vertices(); //gets the vertex iterator while(vIt.hasNext()){ vertexIndexMap.add(vIt.next()); } int[][] A = graph.getAdjacencyMatrix(); int[][] A2; try { A2 = Utility.multiplyMatrix(A, A); } catch (MatrixException e) { return null; } //look for a path of length 2 in A2 for(int i=0; i<A2.length;i++){ for(int j=i+1; j<A2.length;j++){ if((int)A2[i][j]>0 && (int)A[i][j]==0){ //then a P3 is found //look for third vertex for(int k=0; k<A.length;k++){ if(k!=i && k!= j && ((int)A[k][i] == 1) && ((int)A[k][j] == 1)){ List<Graph.Vertex<Integer>> vert = new ArrayList<Graph.Vertex<Integer>>(); Set<Integer> hh = new HashSet<Integer>(); Graph.Vertex<Integer> u = vertexIndexMap.get(i); Graph.Vertex<Integer> v = vertexIndexMap.get(j); Graph.Vertex<Integer> w = vertexIndexMap.get(k); vert.add(u); vert.add(v); vert.add(w); hh.add(u.getElement()); hh.add(v.getElement()); hh.add(w.getElement()); if(marked.add(hh)){ p3s.add(vert); } } } } } } return p3s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasIsVertexOf();", "Set<Set<V>> routine3(Graph<V, E> g)\n {\n Set<Set<V>> NuvList = new HashSet<>();\n for (V u : g.vertexSet()) {\n for (V v : g.vertexSet()) {\n if (u == v || !g.containsEdge(u, v))\n continue;\n NuvList.add(N(g, u, v));\n }\n }\n\n Set<Set<V>> tripleList = new HashSet<>();\n for (V a : g.vertexSet()) {\n for (V b : g.vertexSet()) {\n if (a == b || g.containsEdge(a, b))\n continue;\n Set<V> Nab = N(g, a, b);\n for (V c : g.vertexSet()) {\n if (isTripleRelevant(g, a, b, c)) {\n tripleList.add(X(g, Nab, c));\n }\n }\n }\n }\n Set<Set<V>> res = new HashSet<>();\n for (Set<V> Nuv : NuvList) {\n for (Set<V> triple : tripleList) {\n Set<V> temp = new HashSet<>();\n temp.addAll(Nuv);\n temp.addAll(triple);\n res.add(temp);\n }\n }\n return res;\n }", "public static int P3Score (Graph<Integer,String> g) {\n\t\tint totalP3s = 0;\r\n\t\t\r\n\t\tfor (Integer a: g.getVertices()) {\r\n\t\t\tfor (Integer b: g.getVertices()) {\r\n\t\t\t\tif (b <= a) continue;\r\n\t\t\t\tfor (Integer c: g.getVertices()) {\r\n\t\t\t\t\tif (c <= a) continue;\r\n\t\t\t\t\tif (c <= b) continue;\r\n\t\t\t\t\ttotalP3s += IsA.isP3(g, a, b, c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn totalP3s;\r\n\t}", "boolean containsVertex(V v);", "public interface VertexCoverAlgorithm {\n\n\t/**\n\t * Finds a <code>Collection</code> of vertices such that for every \n\t * {@link org._3pq.jgrapht.Edge} in the {@link org._3pq.jgrapht.UnirectedGraph},\n\t * at least one of its two vertices is in the<code>Collection</code>}.\n\t * \n\t * @return a <code>Collection</code> representing the Vertex Cover \n\t * of the <code>UnirectedGraph</code>.\n\t */\n\tpublic Collection vertexCover();\n}", "Set<Vertex> getVertices();", "@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}", "boolean contains(Vertex vertex);", "boolean contains(int vertex);", "public boolean isVertex( VKeyT key );", "public boolean hasVertex(T vert);", "Collection<? extends Subdomain_group> getIsVertexOf();", "public boolean insideTriangle(Node p1, Node p2, Node p3) {\n\t\tboolean b1, b2, b3;\n\n\t\tb1 = sign(this, p1, p2) < 0.0f;\n\t\tb2 = sign(this, p2, p3) < 0.0f;\n\t\tb3 = sign(this, p3, p1) < 0.0f;\n\n\t\treturn ((b1 == b2) && (b2 == b3));\n\n\t}", "boolean ignoreExistingVertices();", "public boolean hasVertex(String name) {\n return mVertices.containsKey(name);\n }", "public void testContainsVertex() {\n System.out.println(\"containsVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Assert.assertTrue(graph.containsVertex(new Integer(i)));\n }\n }", "@Override\r\n\tpublic boolean containsVertex(E key) {\r\n\t\treturn vertices.containsKey(key);\r\n\t}", "public E3DTexturedVertex getVertex(int index){\r\n if(index >= 0 && index < 3)\r\n return vertices[index];\r\n else\r\n return null;\r\n }", "@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }", "public boolean hasVertices() {\n if (vertices != null) {\n return vertices.length > 0;\n }\n return false;\n }", "public boolean containsVertex(V vertex);", "public boolean containsVertex(V vertex);", "public boolean containsVertex(String node) {\n\t\treturn adj_list.containsKey(node);\n\t}", "public Vertex getAnyVertex()\n {\n for (GraphElement element : elements) {\n if(element instanceof Vertex) {\n return (Vertex) element;\n }\n }\n return null;\n }", "Vertex getVertex();", "public Vector3f[] getVertices() {\n return vertices;\n }", "void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}", "@Override\n\tpublic boolean contains(Object vertex) {\n\t\treturn vertices.contains(vertex);\n\t}", "public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to the interals of this class\n Collection<Vertex> copyOfVertices = new ArrayList<Vertex>();\n copyOfVertices.addAll(myGraph.keySet());\n return copyOfVertices;\n }", "public ArrayList<Point3D> getVertex(Block bl) {\r\n\t\tArrayList<Point3D> pivot = new ArrayList<Point3D>();\r\n\t\tpivot.add(bl.getpoint_BlockTopLeft());\r\n\t\tpivot.add(bl.getpoint_BlockTopRight());\r\n\t\tpivot.add(bl.getPoint_BlockDownRight());\r\n\t\tpivot.add(bl.getpoint_BlockDownleft());\r\n\t\treturn pivot;\r\n\t}", "@Override\n public boolean contains(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n return graph.containsKey(vertex);\n }", "public Vertex getVertex(String place)\n\t{\n\t\treturn vertices.get(place);\n\t}", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "public Vertex[] Vertices (TrianglePair pair)\n\t{\n\t\tFace tri1 = trimesh.faces[pair.face1];\n\t\tFace tri2 = trimesh.faces[pair.face2];\n\t\tVertex[] verts1 = new Vertex[3];\n\t\tVertex[] verts2 = new Vertex[3];\n\t\tverts1[0] = trimesh.vertices[tri1.fvlist[0]];\n\t\tverts1[1] = trimesh.vertices[tri1.fvlist[1]];\n\t\tverts1[2] = trimesh.vertices[tri1.fvlist[2]];\n\t\tverts2[0] = trimesh.vertices[tri2.fvlist[0]];\n\t\tverts2[1] = trimesh.vertices[tri2.fvlist[1]];\n\t\tverts2[2] = trimesh.vertices[tri2.fvlist[2]];\n\t\tboolean[] equalVerts = new boolean[9];\n\t\tVertex[] retverts = new Vertex[4];\n\t\tequalVerts[0] = (verts1[0] == verts2[0]);\n\t\tequalVerts[1] = (verts1[0] == verts2[1]);\n\t\tequalVerts[2] = (verts1[0] == verts2[2]);\n\t\tequalVerts[3] = (verts1[1] == verts2[0]);\n\t\tequalVerts[4] = (verts1[1] == verts2[1]);\n\t\tequalVerts[5] = (verts1[1] == verts2[2]);\n\t\tequalVerts[6] = (verts1[2] == verts2[0]);\n\t\tequalVerts[7] = (verts1[2] == verts2[1]);\n\t\tequalVerts[8] = (verts1[2] == verts2[2]);\n\t\tint eqto1in1 = 0, eqto1in2 = 0, eqto2in1 = 0, eqto2in2 = 0;\n\t\tint i;\n\t\tfor (i = 0; i < 9; i++)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto1in1 = i / 3;\n\t\t\t\teqto1in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (i = 8; i >= 0; i--)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto2in1 = i / 3;\n\t\t\t\teqto2in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tretverts[0] = verts1[eqto1in1];\n\t\tretverts[1] = verts1[eqto2in1];\n\t\tint lone1, lone2;\n\t\tif (eqto1in1 == 0)\n\t\t{\n\t\t\tif (eqto2in1 == 1)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 1;\n\t\t}\n\t\telse if (eqto1in1 == 1)\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\telse // eqto1in1 == 2\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 1;\n\t\t\telse // eqto2in1 == 1\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\tif (eqto1in2 == 0)\n\t\t{\n\t\t\tif (eqto2in2 == 1)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 1;\n\t\t}\n\t\telse if (eqto1in2 == 1)\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\telse // eqto1in2 == 2\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 1;\n\t\t\telse // eqto2in2 == 1\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\tretverts[2] = verts1[lone1];\n\t\tretverts[3] = verts2[lone2];\n\t\treturn retverts;\n\t}", "public Set<V> getVertices();", "public Set<V> getVertices();", "public TransactionBuilder checkInternalVertexExistence();", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "List<V> getVertexList();", "public boolean hasVertex(String label)\n\t{\n\t\tboolean sucess = false;\n\t\ttry {\n\t\t\tgetVertex(label);\n\t\t\tsucess = true;\n\t\t} catch (NoSuchElementException e) {\n\t\t\tsucess = false;\n\t\t}\n\t\treturn sucess;\n\t}", "public abstract Graph getParents(String childVertexHash);", "@Override\r\n\tpublic List<Integer> getReachableVertices(GraphStructure graph,int vertex) {\r\n\t\tadjacencyList=graph.getAdjacencyList();\r\n\t\tpathList=new ArrayList<Integer>();\r\n\t\tisVisited=new boolean [graph.getNumberOfVertices()];\r\n\t\ttraverseRecursively(graph, vertex);\r\n\t\treturn pathList;\r\n\t}", "@Test\r\n void test_insert_1_vertex_check() {\r\n graph.addVertex(\"1\");\r\n vertices = graph.getAllVertices();\r\n if (!vertices.contains(\"1\"))\r\n fail(\"Insert not working!!\");\r\n }", "public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\r\n void remove_nonexistent_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.removeVertex(\"D\");\r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\"))\r\n fail();\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\"))\r\n fail();\r\n \r\n }", "@Test\n public void testVertices() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n Vertex v4id = new Vertex (4, \"E\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 5);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 7);\n Edge<Vertex> e3 = new Edge<>(v1, v4, 9);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n assertFalse(g.addVertex(v4id));\n\n Set<Vertex> expectedVertices = new HashSet<>();\n expectedVertices.add(v1);\n expectedVertices.add(v2);\n expectedVertices.add(v3);\n expectedVertices.add(v4);\n\n assertEquals(expectedVertices, g.allVertices());\n\n Assert.assertTrue(g.remove(v1));\n\n }", "public java.util.List<V> getVertices();", "private List<V> getNewVertexOrderIfAcyclic () {\n Map<V, Integer> indegree = inDegree();\n // Determine all vertices with zero in-degree\n Stack<V> zeroIncomingVertex = new Stack<V>(); \n for (V v: indegree.keySet()) {\n if (indegree.get(v) == 0) zeroIncomingVertex.push(v);\n }\n \n // Determine the vertex order\n List<V> result = new ArrayList<V>();\n while (!zeroIncomingVertex.isEmpty()) {\n V v = zeroIncomingVertex.pop(); // Choose a vertex with zero in-degree\n result.add(v); // Vertex v is next in vertex ordering\n // \"Remove\" vertex v by updating its neighbors\n for (V neighbor: dag.get(v)) {\n indegree.put(neighbor, indegree.get(neighbor) - 1);\n // Remember any vertices that now have zero in-degree\n if (indegree.get(neighbor) == 0) zeroIncomingVertex.push(neighbor);\n }\n }\n // Check that we have used the entire graph. If not then there was a cycle.\n if (result.size() != dag.size()) return null;\n return result;\n }", "@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }", "public boolean containsVertex (E vertex)\n {\n return this.indexOf(vertex) != -1;\n }", "public Vertex[] getVertices() {\n return arrayOfVertices;\n }", "public List<Vertex> findAllVertices() throws SQLException {\n\t\treturn rDb.findAllVertices();\n\t}", "public boolean containsVertex(String id) {\n\t\treturn hitVertices.containsKey(id);\n\t}", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "public Collection<V> getOtherVertices(V v);", "public static Set<List<Vertex>> depthFirstSearch(Graph graph) {\n Set<List<Vertex>> arrayListHashSet=new HashSet<>();\n\n for(int i=0;i<graph.getVertices().size();i++){\n ArrayList<Vertex> visitedArrayList=new ArrayList<>();\n for(int j=0;j<graph.getVertices().size();j++){\n if(visitedArrayList.size()==0){\n if(!visitedArrayList.contains(graph.getVertices().get(i))){\n depthFirstSearch(graph.getVertices().get(i),visitedArrayList,graph);\n }\n }\n else{\n if(!visitedArrayList.contains(graph.getVertices().get(j))){\n depthFirstSearch(graph.getVertices().get(j),visitedArrayList,graph);\n }\n }\n }\n arrayListHashSet.add(visitedArrayList);\n }\n return arrayListHashSet; // this should be changed\n }", "public ArrayList<Triangle> getOccluderVertexData();", "public IPoint getThirdPoint()\n {\n\n Set<IPoint> vertices = this.getVertices();\n Object[] verticesArray = vertices.toArray();\n IPoint thirdPoint = (IPoint)verticesArray[2];\n\n return thirdPoint;\n }", "private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}", "public boolean containsVertex(Vertex vertex)\n\t{\n\t\treturn this.vertices.get(vertex.getLabel()) != null;\n\t}", "public Set<String> getVertices() {\n\t\treturn vertices;\n\t}", "public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}", "public static boolean isAllVertexConnected(ArrayList<Edge>[] graph)\n {\n int count = 0;\n int n = graph.length;\n boolean[] vis = new boolean[n];\n\n for(int v = 0; v < n; v++) {\n if(vis[v] == false) {\n count++;\n\n //if number of connected components is greater than 1 then graph is not connected\n if(count > 1) {\n return false;\n }\n gcc(graph, v, vis);\n }\n }\n return true;\n\n }", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "private List<V> intersectGraphPaths(GraphPath<V, E> p1, GraphPath<V, E> p2)\n {\n List<V> res = new LinkedList<>();\n res.addAll(p1.getVertexList());\n res.retainAll(p2.getVertexList());\n return res;\n }", "@Test(expected = NoVertexException.class)\n\tpublic void testNoVertexException() throws Exception {\n\t\tGraphPoetFactory graph = new GraphPoetFactory();\n\t\tgraph.parse(\"GraphName=PoetGraph\");\n\t\tgraph.parse(\"EdgeType=WordNeighborhood\");\n\t\tgraph.parse(\"GraphType=GraphPoet\");\n\t\tgraph.parse(\"VertexType=Word\");\n\t\tgraph.parse(\"Vertex=<a,Word>\");\n\t\tgraph.parse(\"Vertex=<b,Word>\");\n\t\tgraph.parse(\"Edge=<ab,WordNeighborhood,1,a,b,Yes>\");\n\t\tgraph.parse(\"Edge=<ac,WordNeighborhood,1,a,c,Yes>\");\n\t}", "public Collection<V> getOtherVertices(Collection<V> vs);", "@Test\n void test04_checkOrder() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addVertex(\"d\");\n graph.addVertex(\"e\");\n graph.addVertex(\"f\"); // added 6 items\n if (graph.order() != 6) {\n fail(\"graph has counted incorrect number of vertices\");\n }\n }", "public Set<GeographicPoint> getVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\tSet<GeographicPoint> ans = new HashSet<GeographicPoint> ();\n\t\tfor (GeographicPoint curr : map.keySet()) {\n\t\t\tif (!ans.contains(curr)) {\n\t\t\t\tans.add(curr);\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}", "boolean containsJewel(Graph<V, E> g)\n {\n for (V v2 : g.vertexSet()) {\n for (V v3 : g.vertexSet()) {\n if (v2 == v3 || !g.containsEdge(v2, v3))\n continue;\n for (V v5 : g.vertexSet()) {\n if (v2 == v5 || v3 == v5)\n continue;\n\n Set<V> F = new HashSet<>();\n for (V f : g.vertexSet()) {\n if (f == v2 || f == v3 || f == v5 || g.containsEdge(f, v2)\n || g.containsEdge(f, v3) || g.containsEdge(f, v5))\n continue;\n F.add(f);\n }\n\n List<Set<V>> componentsOfF = findAllComponents(g, F);\n\n Set<V> X1 = new HashSet<>();\n for (V x1 : g.vertexSet()) {\n if (x1 == v2 || x1 == v3 || x1 == v5 || !g.containsEdge(x1, v2)\n || !g.containsEdge(x1, v5) || g.containsEdge(x1, v3))\n continue;\n X1.add(x1);\n }\n Set<V> X2 = new HashSet<>();\n for (V x2 : g.vertexSet()) {\n if (x2 == v2 || x2 == v3 || x2 == v5 || g.containsEdge(x2, v2)\n || !g.containsEdge(x2, v5) || !g.containsEdge(x2, v3))\n continue;\n X2.add(x2);\n }\n\n for (V v1 : X1) {\n if (g.containsEdge(v1, v3))\n continue;\n for (V v4 : X2) {\n if (v1 == v4 || g.containsEdge(v1, v4) || g.containsEdge(v2, v4))\n continue;\n for (Set<V> FPrime : componentsOfF) {\n if (hasANeighbour(g, FPrime, v1) && hasANeighbour(g, FPrime, v4)) {\n if (certify) {\n Set<V> validSet = new HashSet<>();\n validSet.addAll(FPrime);\n validSet.add(v1);\n validSet.add(v4);\n GraphPath<V, E> p = new DijkstraShortestPath<>(\n new AsSubgraph<>(g, validSet)).getPath(v1, v4);\n List<E> edgeList = new LinkedList<>();\n edgeList.addAll(p.getEdgeList());\n if (p.getLength() % 2 == 1) {\n edgeList.add(g.getEdge(v4, v5));\n edgeList.add(g.getEdge(v5, v1));\n\n } else {\n edgeList.add(g.getEdge(v4, v3));\n edgeList.add(g.getEdge(v3, v2));\n edgeList.add(g.getEdge(v2, v1));\n\n }\n\n double weight =\n edgeList.stream().mapToDouble(g::getEdgeWeight).sum();\n certificate = new GraphWalk<>(g, v1, v1, edgeList, weight);\n }\n return true;\n }\n }\n }\n }\n }\n }\n }\n\n return false;\n }", "@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }", "boolean hasC3();", "public Collection<V> getVertices();", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "Vertex findVertexInTree(Tree t, ArrayList<Integer> vars) {\n\t\tfor(Vertex v : t._vertices.values()) {\n\t\t\tboolean containsAll = true;\n\t\t\tfor(int i : vars) {\n\t\t\t\tif(!v._variables.contains(i)) {\n\t\t\t\t\tcontainsAll = false;\n\t\t\t\t\t//continue; // skip.\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(containsAll) return v;\n\t\t}\n\t\treturn null;\n\t}", "public boolean pathExists(int startVertex, int stopVertex) {\n// your code here\n ArrayList<Integer> fetch_result = visitAll(startVertex);\n if(fetch_result.contains(stopVertex)){\n return true;\n }\n return false;\n }", "@Test\n void test01_addVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two vertices\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\"); // creates a check list to compare with\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't add the vertices correctly\");\n }\n }", "Vertex getVertex(int index);", "public boolean isVertex(T vertex) {\n return vertexIndex(vertex) != -1;\n }", "@Test\n\tvoid testVerticesExist() {\n\t\tLinkedHashSet<String> edges = new LinkedHashSet<String>();\n\n\t\tedges.add(\"Newark\");\n\t\tedges.add(\"New York\");\n\t\tmap.put(\"Boston\", edges);\n\t\tedges = map.get(\"Boston\");\n\t\tString[] edgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Boston\"));\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Philadelphia\");\n\t\tmap.put(\"Newark\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Newark\"));\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Albany\");\n\t\tmap.put(\"Trenton\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertTrue(map.containsKey(\"Trenton\"));\n\t}", "@Test\n public void getGraph1() throws Exception {\n try (final Graph g1 = dataset.getGraph(graph1).get()) {\n assertEquals(4, g1.size());\n\n assertTrue(g1.contains(alice, name, aliceName));\n assertTrue(g1.contains(alice, knows, bob));\n assertTrue(g1.contains(alice, member, null));\n assertTrue(g1.contains(null, name, secretClubName));\n }\n }", "public Point getP3(){\n return this.p3;\n }", "public Set<String> getVertices()\r\n\t{\r\n\t\treturn this.dataMap.keySet();\r\n\t}", "public boolean isCyclic() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}", "public boolean is3G() {\r\n return is3G;\r\n }", "public boolean connectsVertices(Collection<V> vs);", "Vertex findVertexInTree(Tree t, int... vars) {\n\t\tfor(Vertex v : t._vertices.values()) {\n\t\t\tboolean containsAll = true;\n\t\t\tfor(int i : vars) {\n\t\t\t\tif(!v._variables.contains(i)) {\n\t\t\t\t\tcontainsAll = false;\n\t\t\t\t\t//continue; // skip.\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(containsAll) return v;\n\t\t}\n\t\treturn null;\n\t}", "public ProcessVertex getInVertex() {\n\t\treturn this.inVertex;\n\t}", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "private Queue<Vertex> findZeroIndegrees(Graph graph) {\n\t\tQueue<Vertex> vertices = new LinkedList<Vertex>();\n\n\t\tfor (Vertex v : graph) {\n\t\t\tif (v.indegree == 0) {\n\t\t\t\tvertices.add(v);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If there is no vertices in the queue then the\n\t\t//graph has cycles. So no topological ordering is possible\n\t\tif(vertices.size() == Globals.ZERO) {\n\t\t\tthrow new UnsupportedOperationException(\"Graph has cycles\");\n\t\t}\n\t\t\n\t\treturn vertices;\n\t}", "public VDataT getVertexData( VKeyT key ) throws NoSuchVertexException;", "public V getParent(V vertex);", "public static int loadAllVertices(String filePath) throws IOException{\r\n\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = bufferedReader.readLine();\r\n\t\tint index = 0;\r\n\t\twhile((line = bufferedReader.readLine()) != null){\r\n\t\t\tString[] details = line.split(\" \");\r\n\t\t\tVertex vertex = new Vertex(details[1],index,CONSTGREYCOL); // grey color\r\n\t\t\tallVertices.put(Integer.parseInt(details[1]), vertex);\r\n\t\t\tif(!allSC.containsKey(Integer.parseInt(details[1]))){\r\n\t\t\t\tdemandVertices.put(Integer.parseInt(details[1]),vertex);\r\n\t\t\t\tdnIDs.add(Integer.parseInt(details[1]));\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is demand node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t} else {\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is service node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"Total no of all vertices are \"+allVertices.size());\r\n\t\tSystem.out.println(\"Total no of demand vertices are \"+demandVertices.size());\r\n\t\tbufferedReader.close();\r\n\t\treturn allVertices.size();\r\n\t}", "public List<Point3D> FindIntersections(Ray ray) throws Exception\n {\n List<Point3D> ListInter = new LinkedList<Point3D>();\n\n //find P0\n Point3D P0 = new Point3D(ray.getPOO());\n\n //find the triangle's Normal\n Vector N = this.getNormal(this.getP1());\n\n //find Plane\n Plane plane = new Plane(N, this.getP3());\n\n //if the intersection between the ray and plane\n List<Point3D> ListIntersectionPlane = plane.FindIntersections(ray);\n\n if(ListIntersectionPlane.isEmpty())\n return ListInter;\n\n Point3D intersectionPlane = ListIntersectionPlane.get(0);\n\n //defin Vector P_P0\n Vector P_P0 = new Vector(P0, intersectionPlane);\n\n //checking side 1-2\n Vector V1_1 = new Vector(P0, this._p1);\n Vector V2_1 = new Vector(P0, this._p2);\n Vector N1 = new Vector(V1_1.crossProduct(V2_1));\n N1.normalize();\n double S1 = -P_P0.dotProduct(N1);\n\n //checking side 2-3\n Vector V1_2 = new Vector(P0, this._p2);\n Vector V2_2 = new Vector(P0, this._p3);\n Vector N2 = new Vector(V1_2.crossProduct(V2_2));\n N2.normalize();\n double S2 = -P_P0.dotProduct(N2);\n\n //checking side 3-1\n Vector V1_3 = new Vector(P0, this._p3);\n Vector V2_3 = new Vector(P0, this._p1);\n Vector N3 = new Vector(V1_3.crossProduct(V2_3));\n N3.normalize();\n double S3 = -P_P0.dotProduct(N3);\n\n if (((S1 > 0) && (S2 > 0) && (S3 > 0)) || ((S1 < 0) && (S2 < 0) && (S3 < 0)))\n ListInter.add(intersectionPlane);\n return ListInter;\n\n }", "@Override\n public boolean isVertex()\n {\n return getAngle() > Math.PI && getAngle() < 2 * Math.PI;\n }", "public Collection< VKeyT > vertexKeys();", "private boolean v3Ok(final Property prop) {\n final Id id = prop.getId();\n\n if (notV3Ok.contains(id)) {\n return false;\n }\n\n /* altid and pid parameters were added in v.4 */\n\n Parameter par = prop.getParameter(Parameter.Id.ALTID);\n if (par != null) {\n return false;\n }\n\n par = prop.getParameter(Parameter.Id.PID);\n return par == null;\n }", "public static Set<List<Vertex>> breadthFirstSearch(Graph graph) {\n\n Set<List<Vertex>> arrayListHashSet=new HashSet<>();\n\n for(Vertex v : graph.getVertices()){\n ArrayList<Vertex> visitedArrayList=new ArrayList<>();\n Queue<Vertex> vertexQueue=new ArrayDeque<>();\n visitedArrayList.add(v);\n vertexQueue.offer(v);\n while (!vertexQueue.isEmpty()){\n for(Vertex v1:graph.getNeighbors(vertexQueue.poll())){\n if(!visitedArrayList.contains(v1)){\n visitedArrayList.add(v1);\n vertexQueue.offer(v1);\n }\n }\n }\n arrayListHashSet.add(visitedArrayList);\n }\n return arrayListHashSet; // this should be changed\n }" ]
[ "0.64387107", "0.60489875", "0.60084647", "0.5837258", "0.5810786", "0.571991", "0.570506", "0.56914645", "0.5691339", "0.5658362", "0.56141114", "0.5609157", "0.55925965", "0.5591741", "0.5579876", "0.5559179", "0.55580175", "0.55247", "0.54999846", "0.5492466", "0.5480416", "0.5480416", "0.54581", "0.54435515", "0.54331434", "0.54159814", "0.54121614", "0.53583366", "0.53504956", "0.5340622", "0.53381854", "0.5336678", "0.53322524", "0.53047806", "0.5303573", "0.5303573", "0.52985126", "0.5276541", "0.5269099", "0.52611417", "0.5240776", "0.5222905", "0.5209526", "0.52028006", "0.5197548", "0.51910704", "0.51858425", "0.5185268", "0.51768106", "0.5167602", "0.51505804", "0.5146821", "0.51235735", "0.51223147", "0.51129466", "0.5100848", "0.5100005", "0.5096669", "0.50960976", "0.5084814", "0.5082054", "0.508197", "0.5079217", "0.507825", "0.5070847", "0.50708383", "0.5069365", "0.504912", "0.5047659", "0.5044726", "0.50421286", "0.5031952", "0.50170696", "0.501126", "0.5010988", "0.5009833", "0.5005361", "0.4999836", "0.49996075", "0.49994758", "0.4990851", "0.49882475", "0.49778372", "0.49755177", "0.49747592", "0.49720344", "0.49678034", "0.49665636", "0.49580577", "0.49579388", "0.49573827", "0.49469805", "0.49443933", "0.49329862", "0.49325153", "0.4930371", "0.4928652", "0.49229777", "0.49210986", "0.49032903" ]
0.8250618
0
method to return the time taken to run the listing and the number of diamonds found
public String getResult(){ String result = String.format("%-10s%10d", p1time,found); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalTime() {\n int time = 0;\n for (List l : lists.getList()) time += l.obtainTotalTime();\n return time;\n }", "public int totalTime(){\n\t\t\n\t\tint time=0;\n\t\t\n\t\n\t\tfor(int i=0; (i<songList.length);i++){\n\t\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\n\t\t\ttime+= songList[i].getDuration();\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn time;\n\t\t\n\t}", "public long getTimeTaken();", "@Test\n void should_ReturnRunWithIn500Ms_when_1000ListItemsIsGiven(){\n //given\n List<Apartment> apartments = new ArrayList<>();\n for (int i = 0; i < 1000; i++) {\n apartments.add(ApartmentRaterTest.this.randomApartmentGenerator.generate());\n }\n\n //when\n Executable executable = () -> ApartmentRater.calculateAverageRating(apartments);\n\n assertTimeout(Duration.ofMillis(500), executable);\n\n }", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "public static void main(String[] args) {\n double SumOfTimes = 0;\n for(int j=0; j<100; j++) {\n\n TimeCounter timer = new TimeCounter();\n timer.StartToCount();\n\n for (int i = 1; i <= 100000; i++) {\n if (i % 3 == 0) {\n System.out.print(\"fizz \");\n }\n if (i % 5 == 0) {\n System.out.print(\"buzz\");\n }\n if (i % 3 != 0 && i % 5 != 0) {\n System.out.print(i);\n }\n System.out.println();\n }\n\n timer.FinishToCount();\n SumOfTimes+=timer.GetCountedTime();\n\n }\n System.out.println(\"Average time = \"+SumOfTimes/100); // Average time = 0.318....... (in my processor)\n }", "long getRecipesCount();", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "long getHits();", "public int getTimeTaken() {\n return this.getTreeNode().getBuilding().getTotalTimeTaken();\n }", "public double timeAllPath(Packman p)\r\n\t{\r\n\t\tdouble sum = 0;\r\n\t\tfor(int i = 0 ; i < FruitList.size() ; i++)\r\n\t\t{\r\n\t\t\tsum+=time(p , FruitList.get(i).location);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public String getStats() {\n String stats = \"Total running time: \" + runtime + \"\\\\\\\\\";\n int totalit = 0;\n int largestit = 0;\n int averageit = 0;\n for (Integer i : recGraphs) {\n totalit += i;\n averageit += i;\n if (i > largestit) {\n largestit = i;\n }\n }\n averageit /= recGraphs.size();\n double totalhit = 0;\n double longesthit = 0;\n double averagehit = 0;\n for (Double i : recHitTimes) {\n totalhit += i;\n averagehit += i / recHitTimes.size();\n if (i > longesthit) {\n longesthit = i;\n }\n }\n stats += \"Total iterations in step 3: \" + totalit + \"\\\\\\\\\";\n stats += \"Largest set of iterations in step 3: \" + largestit + \"\\\\\\\\\";\n stats += \"Average iterations set in step 3: \" + averageit + \"\\\\\\\\\";\n stats += \"Total hitting sets calculation time: \" + totalhit + \"\\\\\\\\\";\n stats += \"Average hitting set calculation time: \" + averagehit + \"\\\\\\\\\";\n stats += \"Longest hitting set calculation time: \" + longesthit + \"\\\\\\\\\";\n return stats;\n }", "public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}", "public void show() {\n\t\t\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}", "public List<String> getRuntime() {\n double totalhit = 0;\n double longesthit = 0;\n double averagehit = 0;\n for (Double i : recHitTimes) {\n totalhit += i;\n averagehit += i / recHitTimes.size();\n if (i > longesthit) {\n longesthit = i;\n }\n }\n List<String> list = new ArrayList<>();\n list.add(Double.toString(runtime));\n list.add(Double.toString(totalhit));\n list.add(Double.toString(longesthit));\n list.add(Double.toString(averagehit));\n return list;\n }", "long getElapsedTime();", "public static long getTotalHitTime() {\r\n return _time;\r\n }", "@Override\n public long getTotalHarvestingTime()\n {\n return 0;\n }", "public double getElapsedTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs && (( SpObs )child).isOptional() )\n\t\t\t\t\telapsedTime += ( ( SpObs )child ).getElapsedTime() ;\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t\telapsedTime += (( SpMSB )child).getElapsedTime() ;\n\t\t}\n\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\treturn elapsedTime ;\n\t}", "private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}", "long getCount();", "long getCount();", "private static int benchmarkedMethod() {\n return 3;\n }", "@Override\n public int count() {\n return this.bench.size();\n }", "public static void doFor(){\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n int ans = 0;\n for (Person p: personCopy){\n if (p.getHeight() > 180){\n ans++;\n }\n }\n System.out.println(\"doFor(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public double getTotalTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\t\tboolean hasObsChild = false ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs )\n\t\t\t{\n\t\t\t\thasObsChild = true ;\n\t\t\t\telapsedTime += (( SpObs )child).getElapsedTime() ;\n\t\t\t}\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t{\n\t\t\t\telapsedTime += (( SpMSB )child).getTotalTime() ;\n\t\t\t}\n\t\t}\n\n\t\t// If there is an Obs child, we should add a slew time as well,\n\t\t// which is just the instrument slew time times the number of\n\t\t// targets. We don't do this if the child is an MSB since this\n\t\t// already adds a slew time\n\t\tdouble slewTime = 0. ;\n\t\tif( hasObsChild )\n\t\t{\n\t\t\tSpInstObsComp inst = SpTreeMan.findInstrument( this ) ;\n\t\t\tif( inst != null )\n\t\t\t\tslewTime = inst.getSlewTime() * size() ;\n\t\t}\n\n\t\t// Get the total number of repeats for each target\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\telapsedTime += slewTime ;\n\n\t\treturn elapsedTime ;\n\t}", "public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}", "public static void main(String[] args) {\n\n\n carsDAO carsDAO = new carsDAO();\n\n carsDAO.find2ndWatch();\n\n System.out.println(carsDAO.find2ndWatch().size());\n\n List<Car> aa = carsDAO.find2ndWatch();\n\n System.out.println();\n\n\n\n\n\n\n\n }", "private static void getStatistics() {\r\n\r\n\t\tfloat totalWaitTime = 0;\r\n\t\tfloat totalRideTime = 0;\r\n\r\n\t\t// generate info about min wait time\r\n\t\tfloat minWaitTime = people.get(0).getWaitTime();\r\n\t\tString minWaitPerson = \"\";\r\n\t\ttotalWaitTime += minWaitTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() < minWaitTime){\r\n\t\t\t\tminWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tminWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalWaitTime += people.get(i).getWaitTime();\r\n\t\t}\r\n\r\n\t\t// generate info about min ride time\r\n\t\tfloat minRideTime = people.get(0).getRideTime();\r\n\t\tString minRidePerson = \"\";\r\n\t\ttotalRideTime += minRideTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() < minRideTime){\r\n\t\t\t\tminRideTime = people.get(i).getRideTime();\r\n\t\t\t\tminRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalRideTime += people.get(i).getRideTime();\r\n\t\t}\r\n\r\n\t\t// generate info about max wait time\r\n\t\tfloat maxWaitTime = people.get(0).getWaitTime();\r\n\t\tString maxWaitPerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() > maxWaitTime){\r\n\t\t\t\tmaxWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tmaxWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// generate info about max ride time\r\n\t\tfloat maxRideTime = people.get(0).getRideTime();\r\n\t\tString maxRidePerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() > maxRideTime){\r\n\t\t\t\tmaxRideTime = people.get(i).getRideTime();\r\n\t\t\t\tmaxRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"Avg Wait Time: %.1f sec\\n\", totalWaitTime/people.size());\r\n\t\tSystem.out.printf(\"Avg Ride Time: %.1f sec\\n\\n\", totalRideTime/people.size());\r\n\r\n\t\tSystem.out.printf(\"Min Wait Time: %.1f sec (%s)\\n\", minWaitTime, minWaitPerson);\r\n\t\tSystem.out.printf(\"Min Ride Time: %.1f sec (%s)\\n\\n\", minRideTime, minRidePerson);\r\n\r\n\t\tSystem.out.printf(\"Max Wait Time: %.1f sec (%s)\\n\", maxWaitTime, maxWaitPerson);\r\n\t\tSystem.out.printf(\"Max Ride Time: %.1f sec (%s)\\n\\n\", maxRideTime, maxRidePerson);\r\n\r\n\t}", "private static void printCloudletList(List<Cloudlet> list) {\n\t\tint size = list.size();\n\t\tCloudlet cloudlet;\n List<Double> CPUtime = new ArrayList<Double>();\n List <Double> cputime = new ArrayList<Double>();\n List <Double> start_time = new ArrayList<Double>();\n List<Double> starttime = new ArrayList<Double>();\n List<Double> endtime = new ArrayList<Double>();\n\t\tString indent = \" \";\n\t\tLog.printLine();\n\t\tLog.printLine(\"========== OUTPUT ==========\");\n\t\tDecimalFormat dft = new DecimalFormat(\"###.##\");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tcloudlet = list.get(i);\n\t\t if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){\n\t\t\t\tcputime.add(cloudlet.getActualCPUTime());\n\t\t\t\tstart_time.add(cloudlet.getExecStartTime());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tcloudlet = list.get(i);\n\t\t\tif (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){\n\t\t if(!CPUtime.contains(cloudlet.getActualCPUTime())) {\n\t\t \t CPUtime.add(cloudlet.getActualCPUTime());\n\t\t \t }\n\t\t if(!starttime.contains(cloudlet.getExecStartTime())) {\n\t\t \t starttime.add(cloudlet.getExecStartTime());\n\t\t \t}\n\t\t if(!endtime.contains(cloudlet.getFinishTime())) {\n\t\t \t endtime.add(cloudlet.getFinishTime());\n\t\t \t }\n\t\t\t}\n\t\t}\n\t\t\n int n=0;\n\t\tfor (int i=0; i< CPUtime.size();i++) {\n\t\t\t\n n= Collections.frequency(cputime,CPUtime.get(i));\n Log.printLine(dft.format(n)+\" \"+\"Cloudlets finish in \"+ dft.format(CPUtime.get(i))+\"s\" );\n\t\t}\n\t\tLog.printLine();\n\t\tfor (int i=0; i< starttime.size();i++) {\n\t\t\t n= Collections.frequency(start_time,starttime.get(i));\n\t\t\t Log.printLine(dft.format(n)+\" \"+\"Cloudlets executes in time \"+ dft.format(starttime.get(i))+\"~\" + dft.format(endtime.get(i))+\"s\");\n\t\t }\n\t}", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }", "public static void main(String[] args) {\n int listSize = 100000;\n\n // Randomly generates and assigns number quantity to an array\n double[] numbers = new double[listSize];\n for(int i = 0; i < numbers.length; i++){\n numbers[i] = Math.random() * numbers.length;\n }\n // Initial the stop watch method, start clock and start sorting the array then stop clock\n StopWatch StopWatch = new StopWatch();\n StopWatch stopWatchPrinter = new StopWatch();\n Arrays.sort(numbers);\n stopWatchPrinter.stop();\n\n // Print time elapsed from StopWatch class values\n System.out.print(\"The time elapsed is \" + stopWatchPrinter.getElapsedTime());\n\n }", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "long count();", "private double getReadTime(int wordCount) {\n return wordCount / 130.0;\n }", "public int getTotalTime();", "public long timeAlg(){\n long startTime = System.nanoTime();\n \n this.doTheAlgorithm();\n \n long endTime = System.nanoTime();\n long elapsedTime = endTime - startTime;\n \n return elapsedTime;\n }", "protected long time(LuaTable table) {\n\t\t//TODO allow table argument to work\n\t\treturn System.currentTimeMillis(); //TODO change this to be something minecraft related\n\t}", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public static void main(String[] args) {\r\n\t\ttry {\r\n\r\n\t\t\tint loop = 300;\r\n\r\n\t\t\tlong start = System.currentTimeMillis();\r\n\r\n\t\t\tfor (int i = 0; i < loop; i++ )\r\n\t\t\t\tbyList();\r\n\r\n\t\t\tlong t1 = System.currentTimeMillis();\r\n\r\n\t\t\tfor (int i = 0; i < loop; i++ )\r\n\t\t\t\tbyStream();\r\n\r\n\t\t\tlong t2 = System.currentTimeMillis();\r\n\r\n\t\t\tSystem.out.println(\"byList: \" + (t1 - start) + \"ms\");\r\n\t\t\tSystem.out.println(\"byStream: \" + (t2 - t1) + \"ms\");\r\n\r\n\t\t} catch(FileTreatmentException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "int getTimesPlayed (String song_id);", "public long count() ;", "public static int performanceCountGet() { return 0; }", "long elapsedTime();", "@Step(\"Method 'getCountOfPetsWithName' calculates the total number of pets with name 'doggie'\")\n\tpublic void getCountOfPetsWithName() {\n\t\tresponse = restClient.doGetRequest(\"/pet/findByStatus\", property.getProperty(\"status\"));\n\t\t\n\t\t//This step gets the name of all the pets in the list\n\t\tList<String> petsNames=response.then()\n\t\t\t\t\t\t\t\t\t .extract()\n\t\t\t\t\t\t\t\t\t .path(\"name\");\n\n\t\t//For each is used to iterate over the list of names and verify with name- doggie and gets the total count\n\t\tfor(String petsName:petsNames) {\n\t\t\ttry {\n\t\t\t\tif(petsName.equalsIgnoreCase(petDoggie)) {\n\t\t\t\t\tpetCount = petCount+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//This is to handle the exception when Pet has No Name\n\t\t\tcatch(NullPointerException e) {\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Pet Count is- \"+petCount);\n\t}", "public int countResults() \n {\n return itsResults_size;\n }", "long countAll();", "long countAll();", "@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}", "public long timesExecuted(jaba.graph.StatementNode stNode) {\r\n\t\r\n\t\t// Extract information from node\r\n\t\tjaba.sym.Class nodeClass =\r\n\t\t\t(jaba.sym.Class) stNode.getContainingMethod().getContainingType();\r\n\t\tString className = nodeClass.getName().replaceAll(\"[/]\", \".\");\r\n\t\tjaba.sym.Method nodeMethod = stNode.getContainingMethod();\r\n\t\tString methodSig = nodeMethod.getName() + nodeMethod.getDescriptor();\r\n\t\tint lineNum = stNode.getSourceLineNumber();\r\n\r\n\t\treturn profiling.timesStatementExecuted(className, methodSig, lineNum);\t\r\n\t}", "public int getTotalRunTime() {\n return totalRunTime;\n }", "public static void main(String[] args) {\n\t\tList<Integer> arrayList = new ArrayList<Integer>();\r\n\t\tList<Integer> linkedList = new LinkedList<Integer>();\r\n\t\t\r\n\t\tdoTimings(\"ArrayList\",arrayList);\r\n\t\tdoTimings(\"LinkedList\",linkedList);\r\n\t}", "public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }", "public int updateDuration(){\n int newSecondsTotal = 0;\n for(int i = 0; i < MAX_SONGS_PLAYLIST; i++){\n if(playSongs[i] != null){\n newSecondsTotal += playSongs[i].songDurationSong();\n }\n }\n return newSecondsTotal;\n }", "public void measureRuntime() throws IOException {\n int[] ns = new int[]{10, 100, 1000};\n for (int i : ns) {\n System.out.println(String.format(\"%d times input read took %fms\", i, (float) measureReadInput(i)));\n }\n for (int i : ns) {\n System.out.println(String.format(\"%d times pca took %fms\", i, (float) measurePCA(i)));\n }\n for (int i : ns) { // all cubes\n System.out.println(String.format(\"%d skeleton generations all cubes took %fms\", i, (float) measureAlgorithmWithoutPCA(i, true, true)));\n }\n for (int i : ns) { // low res\n System.out.println(String.format(\"%d skeleton generations low res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, true)));\n }\n for (int i : ns) { // high res\n System.out.println(String.format(\"%d skeleton generations high res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, false)));\n }\n }", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "public static long getAverageHitTime() {\r\n if (_count == 0)\r\n return 0L;\r\n return _time / _count;\r\n }", "public double DiskServiceTime()\r\n\t{\r\n\t\tdouble rand = 0.0;\r\n\t\tdouble sum = 0.0;\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tsum += Math.random();\r\n\t\t}\r\n\t\tsum = (sum - 10.0/2.0) / Math.sqrt(10.0/12.0);\r\n\t\trand = 20.0 * sum - 100.0;\r\n\t\trand = Math.abs(rand);\r\n\t\treturn rand;\r\n\t}", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "public static void main(String[] args) {\n System.out.println(System.nanoTime());\n }", "public int getNumTimes();", "private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }", "public static void main(String[] args) {\n long startTime = System.currentTimeMillis();\n // to HERE \n ArraysOnly nuts = new ArraysOnly();\n nuts.doThings();\n nuts.printTiers();\n // or HERE \n long endTime = System.currentTimeMillis();\n long duration = endTime - startTime;\n System.out.println(\"\\n\" + (nuts.tiers_num - 1) + \" tiers took \" + duration + \" milliseconds\");\n // to HERE\n }", "@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();", "int steamPerDurability();", "long getCacheHits();", "public int getDimes()\n {\n\treturn dimes;\n }", "long getNumberOfComparisons();", "public static void main(String[] args) {\n\t\tFile dir = new File(\"H:\");\r\n\t\tString[] filelist = dir.list();\r\n\t\tlong total = 0;\r\n\t\tlong t = 0;\r\n\t\tfor(int i=0;i<filelist.length;i++){\r\n\t\t\t File readfile = new File(\"H:\" + \"\\\\\" + filelist[i]);\r\n\t\t\t t = readFile(readfile)/1024/1024;\r\n\t\t\t System.out.println(\"name=\" + readfile.getName() + \" size:=\" + t + \"MB\");\r\n\t\t\t total += t;\r\n\t\t}\r\n\t\tSystem.out.println(\"OK,all the files is list over,the number is \" + filelist.length + \"the total size is \" + total); \r\n\t}", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "public String getSearchTime(String path) {\n LinkedList<String> keysList = UsefulFunctions.createStringListFromFile(path);\n double startTime = System.nanoTime();\n if (keysList != null) {\n for (String key : keysList) {\n search(key);\n }\n }\n double endTime = System.nanoTime();\n return Double.toString((endTime - startTime) / 1000000.0).substring(0, 6);\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public long startTime();", "long duration();", "public static int computeTimeFinish(ArrayList<Integer> l) {\n\n int sum = 0;\n Collections.sort(l);\n int[] peoples = new int[3];\n peoples[0] = l.size() / 3;\n peoples[1] = (l.size() - peoples[0]) / 2;\n peoples[2] = (l.size() - peoples[0]) / 2;\n int position = 0;\n\n while (l.size() > 0){\n int count = 0;\n int total = 0;\n\n while (peoples[position] > 0){\n\n if (l.size() == 0){\n break;\n }\n\n if (count % 2 == 0) {\n total += l.get(l.size() - 1);\n l.remove(l.size() - 1);\n } else {\n total += l.get(0);\n l.remove(0);\n }\n peoples[position]--;\n count++;\n }\n if (total > sum){\n sum = total;\n }\n position++;\n }\n\n return sum;\n }", "private static int runBenchmark(int n) {\n int result = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result = benchmarkedMethod();\n }\n }\n return result;\n }", "private static String elapsed(long start) {\r\n\treturn \": elapsed : \" + (System.currentTimeMillis() - start) + \" ms \";\r\n }", "public void start() {\n try {\n long start = System.currentTimeMillis();\n readFile();\n result = wordStorage.getTopNWords(3);\n long end = System.currentTimeMillis();\n long timeTaken = ((end - start) / 1000);\n logger.info(\"time taken to run program: \" + timeTaken);\n display.displayTimeTaken(timeTaken);\n display.displayTopNWords(result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void printRuntimes() {\n\t\tfor(long x: runtimes){\n\t\t\tSystem.out.println(\"run with time \"+x+\" nanoseconds\");\n\t\t}\t\n\t}", "private static double pythonTime() {\n return System.currentTimeMillis() / 1000;\n }", "int getResultsCount();", "int getResultsCount();", "public double showHarvestTime(){\r\n\t\tSystem.out.println(\"The average harvest time is \" + averageHarvestTime + \" \" + timeUnit);\r\n\t\treturn averageHarvestTime;}", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "static long GetCycleCount() {\n\t\treturn System.currentTimeMillis();\n\t}", "void statistics();", "public long countAll();", "public long getLoopTime();" ]
[ "0.63004416", "0.6129069", "0.6084026", "0.58468634", "0.5740664", "0.56945294", "0.56517863", "0.5640977", "0.56198806", "0.561341", "0.5612704", "0.5585624", "0.5570607", "0.5566763", "0.55531085", "0.5544904", "0.5535228", "0.5521889", "0.55147606", "0.5513508", "0.5498648", "0.5480819", "0.5480819", "0.5472725", "0.54720277", "0.5459611", "0.54539394", "0.5438543", "0.5430122", "0.54164374", "0.5405098", "0.5398249", "0.5397405", "0.53928185", "0.5379346", "0.5379346", "0.5379346", "0.5379346", "0.5379346", "0.5379346", "0.5379346", "0.53742033", "0.53611124", "0.53564197", "0.5349381", "0.53413177", "0.53375596", "0.53361195", "0.5333272", "0.5316621", "0.530756", "0.52957493", "0.5290553", "0.5289913", "0.5289913", "0.5285464", "0.5268309", "0.52673453", "0.52668333", "0.52537805", "0.52537626", "0.52515346", "0.5250385", "0.52343744", "0.5233725", "0.52323693", "0.5230645", "0.52305716", "0.52261645", "0.5222199", "0.52190673", "0.5214714", "0.5207225", "0.520622", "0.5204728", "0.52005684", "0.51944095", "0.5193238", "0.51915556", "0.51915556", "0.51915556", "0.51895493", "0.51835454", "0.51757014", "0.51741534", "0.51667684", "0.51665455", "0.51618737", "0.5158267", "0.5154901", "0.5154901", "0.514578", "0.51437616", "0.51437616", "0.51437616", "0.51437616", "0.51437616", "0.51408887", "0.5140352", "0.5137304", "0.5135399" ]
0.0
-1
Construct a new simple results uploader with the given configuration for the entries and table.
public SimpleResultsUploader(SQLAdapter adapter, String table, String algorithmName, int experimentId) { this.adapter = adapter; this.table = table; this.algorithmName = algorithmName; this.experimentId = experimentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void generateFiles(File config, File destination, int entryCount, int entryFieldSize) throws Exception {\n String parentDirectory = config.getParent();\n JsonParser parser = new JsonParser();\n JsonObject configJson = parser.parse(new FileReader(config)).getAsJsonObject();\n\n // Generate the signing keys.\n File keyManifest = Paths.get(parentDirectory, configJson.getAsJsonPrimitive(\"key-manifest\").getAsString()).toFile();\n GenerateKeys.generateKeys(keyManifest, destination, false, true);\n\n // Generate the data and write it to a file.\n byte[] visibility = new ColumnVisibility(configJson.getAsJsonPrimitive(\"visibility\").getAsString()).getExpression();\n SortedMap<Key,Value> data = GenerateRandomEntries.getRandomData(entryCount, entryFieldSize, visibility);\n\n LocalFileSystem fs = FileSystem.getLocal(new Configuration());\n RFileWriter writer = RFile.newWriter().to(Paths.get(parentDirectory, configJson.getAsJsonPrimitive(\"data-table\").getAsString()).toString())\n .withFileSystem(fs).build();\n writer.append(data.entrySet());\n writer.close();\n\n // Generate the files for each configuration.\n for (JsonElement testElem : configJson.getAsJsonArray(\"tests\")) {\n JsonObject test = testElem.getAsJsonObject();\n SignatureConfig signatureConfig = new SignatureConfigBuilder().readFromFile(\n new FileReader(Paths.get(parentDirectory, test.getAsJsonPrimitive(\"config\").getAsString()).toFile())).build();\n SignatureKeyContainer keyContainer = LocalSignatureKeyContainer.read(new FileReader(Paths.get(parentDirectory,\n test.getAsJsonPrimitive(\"keys\").getAsString()).toFile()));\n\n EntrySigner signer = new EntrySigner(signatureConfig, keyContainer);\n RFileWriter signedWriter = RFile.newWriter().to(Paths.get(parentDirectory, test.getAsJsonPrimitive(\"table\").getAsString()).toString()).withFileSystem(fs)\n .build();\n\n for (Entry<Key,Value> entry : data.entrySet()) {\n Entry<Key,Value> signedEntry = signer.sign(entry, true);\n signedWriter.append(signedEntry.getKey(), signedEntry.getValue());\n }\n\n signedWriter.close();\n }\n }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "public ResultFile(String jobId) {\n file = new File(directory, jobId + \".vot\");\n if (file.exists()) {\n mimeType = \"application/x-votable+xml\";\n }\n else {\n file = new File(directory, jobId + \".csv\");\n if (file.exists()) {\n mimeType = \"text/csv\";\n }\n else {\n file = new File(directory, jobId + \".html\");\n if (file.exists()) {\n mimeType = \"text/html\";\n }\n else {\n throw new IllegalArgumentException(\"Job \" + jobId + \" has no results file\");\n }\n }\n }\n }", "public Results(FilterSpecifier filter) {\r\n this.ctypes = new ArrayList<ColumnType>();\r\n if (filter.getColumnTypes() != null) {\r\n for (ColumnType ctype : filter.getColumnTypes()) {\r\n if (ctype.isPicked()) {\r\n ctypes.add(ctype);\r\n }\r\n }\r\n }\r\n this.listBy = filter.getListBy();\r\n this.geneList = filter.getGeneList();\r\n this.patientList = filter.getPatientList();\r\n this.disease = filter.getDisease();\r\n this.chromRegions = filter.getChromRegions();\r\n this.geneListOptions = filter.getGeneListOptions();\r\n this.patientListOptions = filter.getPatientListOptions();\r\n }", "public JDBCUpsertOutputFormat build() {\n checkNotNull(options, \"No options supplied.\");\n checkNotNull(fieldNames, \"No fieldNames supplied.\");\n return new JDBCUpsertOutputFormat(\n name, options, fieldNames, keyFields, partitionFields, fieldTypes, flushMaxSize, flushIntervalMills, allReplace, updateMode, jdbcWriter, errorLimit);\n }", "public ResultFile(String jobId, String format) {\n if (\"VOTABLE\".equals(format)) {\n file = new File(directory, jobId + \".vot\");\n mimeType = \"application/x-votable+xml\";\n }\n else if (\"CSV\".equals(format)) {\n file = new File(directory, jobId + \".csv\");\n mimeType = \"text/csv\";\n }\n else if (\"HTML\".equals(format)) {\n file = new File(directory, jobId + \".html\");\n mimeType = \"text/html\";\n }\n else {\n throw new IllegalArgumentException(\"Format must be VOTABLE, CSV or HTML\");\n }\n }", "public ResultFile(String jobId) {\n super(SimpleConfig.getProperty(\"datacenter.cache.directory\"), jobId);\n }", "public void createTable(double pixelSize, String unit) {\r\n\r\n ResultsTable table = new ResultsTable();\r\n for (Cell cell : cells) {\r\n table.incrementCounter();\r\n table.addValue(\"Cell #\", cell.cellNum);\r\n table.addValue(\"Area (square \" + unit + \")\", cell.getArea() * pixelSize * pixelSize);\r\n }\r\n String title = \"Results\";\r\n table.show(title);\r\n }", "public PublishQueryResultsTask(ApplicationService applicationService, Collection<ClinicalEntry> entries) {\r\n super(applicationService.getActiveApplication());\r\n this.entries = entries;\r\n }", "public void createTapTable(TableConfig tableConfig) throws ConfigurationException;", "public GenericEntry toGenericEntry() {\n GenericEntry entry = new GenericEntry();\n entry.addProperty(\"requestId\", requestId);\n if (completedDate != null) {\n entry.addProperty(\"completedDate\", DATE_FORMAT.format(completedDate));\n }\n if (requestDate != null) {\n entry.addProperty(\"beginDate\", DATE_FORMAT.format(requestDate));\n }\n if (numberOfFiles != 0) {\n entry.addProperty(\"numberOfFiles\", String.valueOf(numberOfFiles));\n }\n entry.addProperty(\"userEmailAddress\", userEmailAddress);\n entry.addProperty(\"adminEmailAddress\", adminEmailAddress);\n entry.addProperty(\"status\", status);\n return entry;\n }", "@Override\r\n public void init() throws HarvesterException {\r\n JsonSimple options = new JsonSimple(getJsonConfig().getObject(\"harvester\", \"csv\"));\r\n \r\n String filePath = options.getString(null, \"fileLocation\");\r\n if (filePath == null) {\r\n throw new HarvesterException(\"No data file provided!\");\r\n }\r\n File csvDataFile = new File(filePath);\r\n if (csvDataFile == null || !csvDataFile.exists()) {\r\n throw new HarvesterException(\"Could not find CSV file '\" + filePath + \"'\");\r\n }\r\n filename = csvDataFile.getName();\r\n \r\n idPrefix = options.getString(\"\", \"recordIDPrefix\");\r\n maxRows = options.getInteger(-1, \"maxRows\");\r\n ignoredFields = getStringList(options, \"ignoreFields\");\r\n includedFields = getStringList(options, \"includedFields\");\r\n payloadId = options.getString(DEFAULT_PAYLOAD_ID, \"payloadId\");\r\n batchSize = options.getInteger(DEFAULT_BATCH_SIZE, \"batchSize\");\r\n hasMore = true;\r\n \r\n try {\r\n // open the CSV file for reading\r\n Reader fileReader = new InputStreamReader(new FileInputStream(csvDataFile), \"UTF-8\");\r\n char delimiter = options.getString(String.valueOf(DEFAULT_DELIMITER), \"delimiter\").charAt(0);\r\n csvReader = new CSVReader(fileReader, delimiter);\r\n \r\n // configure the data fields\r\n if (options.getBoolean(true, \"headerRow\")) {\r\n dataFields = Arrays.asList(csvReader.readNext());\r\n } else {\r\n dataFields = getStringList(options, \"headerList\");\r\n }\r\n \r\n // check that the specified id column is valid\r\n idColumn = options.getString(null, \"idColumn\");\r\n if (idColumn != null && !dataFields.contains(idColumn)) {\r\n throw new HarvesterException(\"'\" + idColumn + \"' is invalid!\");\r\n }\r\n } catch (IOException ioe) {\r\n throw new HarvesterException(ioe);\r\n }\r\n }", "public AccountInfo(GenericEntry entry) { \n completedDate = checkDateAndParse(entry.getProperty(\"completedDate\"));\n requestDate = checkDateAndParse(entry.getProperty(\"requestDate\"));\n expiredDate = checkDateAndParse(entry.getProperty(\"expiredDate\"));\n requestId = entry.getProperty(\"requestId\");\n userEmailAddress = entry.getProperty(\"userEmailAddress\");\n adminEmailAddress = entry.getProperty(\"adminEmailAddress\");\n status = entry.getProperty(\"status\");\n \n numberOfFiles =\n entry.getProperty(\"numberOfFiles\") != null ? Integer.parseInt(entry\n .getProperty(\"numberOfFiles\")) : numberOfFiles;\n\n if (numberOfFiles > 0) {\n fileUrls = new String[numberOfFiles];\n for (int fileIndex = 0; fileIndex < numberOfFiles; fileIndex++) {\n fileUrls[fileIndex] = entry.getProperty(\"fileUrl\" + fileIndex);\n }\n }\n }", "protected IndexedContainer buildResultTableFromSaHPOutput(List<SAResultTableBean> resultTableBeans) {\n\t \n\t\tString[] propertyIds = null; String[] fields = null; \n\t\tIndexedContainer container = new IndexedContainer();\n\t \n\t addColumHeaders(container, RESULT_HEADER);\n\t \n\t propertyIds = new String[3];\n\t fields = new String [propertyIds.length];\n\t \n\t for(SAResultTableBean inputBean: resultTableBeans){\n\t \tint i = 0;\n\t \t\n\t \tpropertyIds[i] = RESULT_HEADER[i];\n\t \tfields[i] = inputBean.getUserName();\n\t \ti++;\n\t \t\n\t \tpropertyIds[i] = RESULT_HEADER[i];\n\t \tfields[i] = String.valueOf(inputBean.getOverallSentimentScore());;\n\t \ti++;\n\t \t\n\t \tpropertyIds[i] = RESULT_HEADER[i];\n\t \tfields[i] = inputBean.getTweetText();\n\t \ti++;\n\t \t\n\t \taddItem(container, propertyIds, fields);\n\t }\n\t \n\t return container;\n\t }", "ExpRunTable createRunTable(String name, UserSchema schema, ContainerFilter cf);", "public Results() {\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}", "FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);", "private void constructRecord(List<String> values, Table table) {\n // Add the table name to the record\n builder.append(\"{\\\"\").append(TABLE_NAME_FIELD_NAME).append(\"\\\":\\\"\").append(table.getName()).append(\"\\\"\");\n\n // Build the record data\n for (int counter = 0; counter < values.size(); counter++) {\n\n // If the value is null, no need to check for the column type\n if (values.get(counter) == null) {\n builder.append(\",\\\"\");\n builder.append(table.getColumns()[counter].getName());\n builder.append(\"\\\":\");\n builder.append(values.get(counter));\n continue;\n }\n\n String fieldName = table.getColumns()[counter].getName();\n String stringValue = values.get(counter);\n\n // Convert the value to the appropriate type based on the column type\n switch (table.getColumns()[counter].getType().getBase()) {\n case INTEGER:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\").append(Integer.valueOf(stringValue));\n break;\n case DECIMAL:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\").append(Double.valueOf(stringValue));\n break;\n // IDENTIFIER type could be any value, so we're taking it as a string\n // DATE and TIME are not supported, they are stored as strings and can be modified with date functions\n // CHAR and VARCHAR are handled as strings\n // any other type (default case) is handled as a string value\n case IDENTIFIER:\n case DATE:\n case TIME:\n case CHAR:\n case VARCHAR:\n default:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\\\"\").append(stringValue).append(\"\\\"\");\n break;\n }\n }\n\n builder.append(\"}\");\n }", "public CreateTableExternalRequest() {\n tableName = \"\";\n filepaths = new ArrayList<>();\n modifyColumns = new LinkedHashMap<>();\n createTableOptions = new LinkedHashMap<>();\n options = new LinkedHashMap<>();\n }", "public DriverConfig(String tableName) {\n this.tableName = tableName;\n }", "public Spectrumfile(ResultSet aRS) throws SQLException {\r\n super(aRS);\r\n filename = aRS.getString(\"filename\");\r\n }", "public PQEntry() {}", "public void initializeTree(List<FilePlanEntry> entries) {\n\t\t\n\t\tList<FilePlan> fileList = creatingFilesPlan(entries);\n\t\tSystem.out.println(fileList);\n\t\t\n\t}", "private TestsResultQueueEntry() {\n\t\t}", "public DummyDataMaker(int entries)\n\t{\n\t\tint total = (entries < 1) ? 20 : entries;\n\n\t\tfor (int entry = 0; entry < total; entry++)\n\t\t{\n\t\t\tdevices.add(new Device());\n\t\t}\n\t}", "public AllFieldsTableHandler(){}", "public FilesystemEntryBean(String artist, String album, String song){\n this.artist = artist;\n this.album = album;\n this.song = song;\n\n isSong = (song != null && !song.trim().isEmpty());\n isAlbum = !isSong && (album != null && !album.trim().isEmpty());\n isArtist = !isSong && !isAlbum && (artist != null && !artist.trim().isEmpty());\n\n if (isArtist) {\n playActionUrl = null;\n listActionUrl = LIST_BASE_URL + \"/\" + artist;\n name = artist;\n }\n if (isAlbum) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album;\n listActionUrl = LIST_BASE_URL + \"/\" +artist + \"/\" + album;\n name = album;\n }\n if (isSong) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album + \"/\" + song;\n listActionUrl = null;\n name = song;\n }\n }", "@DataBoundConstructor\n public KlarosTestResultPublisher(final String config, final String iteration, final String env,\n final String sut, final boolean createTestSuite, final String type, final String pathTestResults,\n final ResultSet[] resultSets, final String url, final String username, final String password) {\n\n this.config = config;\n this.iteration = iteration;\n this.env = env;\n this.sut = sut;\n this.createTestSuite = createTestSuite;\n this.resultSets = resultSets != null ? resultSets.clone() : null;\n migratePathTestResults();\n this.url = url;\n this.username = username;\n this.password = Secret.fromString(password);\n this.types = null;\n }", "public Uploader() {\n super();\n }", "public SingleUploader() {\n this(null);\n }", "StreamTable()\n {\n }", "FromTable createFromTable();", "public MiniEventTimetableConfigDao(Configuration configuration) {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class, configuration);\n\t}", "static JarCollectorConfigImpl createJarCollectorConfig(Map<String, Object> settings) {\n if (settings == null) {\n settings = Collections.emptyMap();\n }\n return new JarCollectorConfigImpl(settings);\n }", "public UIBuilder getNewInstance(Map<String, Object> entries);", "public TableProducer createProducer( Environment env )\n throws TaskException {\n String raString = raParam_.stringValue( env );\n String decString = decParam_.stringValue( env );\n double sr = srParam_.doubleValue( env );\n String cdsName = cdstableParam_.stringValue( env );\n String cdsId = CdsUploadMatcher.toCdsId( cdsName );\n if ( cdsId == null ) {\n throw new ParameterValueException( cdstableParam_,\n \"Bad value \" + cdsName );\n }\n double srDeg = sr / 3600.;\n final QuerySequenceFactory qsFact0 =\n new JELQuerySequenceFactory( raString, decString,\n Double.toString( srDeg ) );\n UserFindMode userMode = findParam_.objectValue( env );\n ServiceFindMode serviceMode = userMode.getServiceMode();\n boolean oneToOne = userMode.isOneToOne();\n int blocksize = chunkParam_.intValue( env );\n long maxrec = maxrecParam_.intValue( env );\n ContentCoding coding = codingParam_.codingValue( env );\n URL url = urlParam_.objectValue( env );\n final Coverage coverage = usemocParam_.booleanValue( env )\n ? UrlMocCoverage.getVizierMoc( cdsName, -1 )\n : null;\n final boolean presort = presortParam_.booleanValue( env );\n UploadMatcher umatcher =\n new CdsUploadMatcher( url, cdsId, sr, serviceMode, coding );\n String tableName = \"xmatch(\" + cdsIdToTableName( cdsId ) + \")\";\n JoinFixAction inFixAct =\n fixcolsParam_.getJoinFixAction( env, insuffixParam_ );\n JoinFixAction cdsFixAct =\n fixcolsParam_.getJoinFixAction( env, cdssuffixParam_ );\n final TableProducer inProd = createInputProducer( env );\n final StoragePolicy storage =\n LineTableEnvironment.getStoragePolicy( env );\n boolean uploadEmpty = CdsUploadMatcher.UPLOAD_EMPTY;\n final BlockUploader blocker =\n new BlockUploader( umatcher, blocksize, maxrec, tableName,\n inFixAct, cdsFixAct, serviceMode, oneToOne,\n uploadEmpty );\n\n /* Create and return an object which will produce the result. */\n return new TableProducer() {\n public StarTable getTable() throws IOException, TaskException {\n StarTable inTable = Tables.randomTable( inProd.getTable() );\n Coverage cov;\n if ( coverage != null ) {\n try {\n coverage.initCoverage();\n cov = coverage;\n }\n catch ( IOException e ) {\n logger_.log( Level.WARNING,\n \"Failed to read coverage\", e );\n cov = null;\n }\n }\n else {\n cov = null;\n }\n QuerySequenceFactory qsFact1 = qsFact0;\n if ( cov != null ) {\n qsFact1 = new CoverageQuerySequenceFactory( qsFact1, cov );\n }\n if ( presort ) {\n qsFact1 = new HealpixSortedQuerySequenceFactory( qsFact1 );\n }\n return blocker.runMatch( inTable, qsFact1, storage );\n }\n };\n }", "public sub_Form(HashMap<String, ReturnedValue> entry, int index){\n this.form_ID = entry.get(\"formID\").to_string();\n this.repID = entry.get(\"repID\").to_string();\n this.plantRegistry = entry.get(\"plantRegistry\").to_string();\n this.domesticOrImported = entry.get(\"domesticOrImported\").to_string();\n this.serialNumber = entry.get(\"serialNumber\").to_string();\n this.beverageType = entry.get(\"beverageType\").to_string();\n this.brandName = entry.get(\"brandName\").to_string();\n this.fancifulName = entry.get(\"fancifulName\").to_string();\n this.vintage = entry.get(\"vintage\").to_string();\n this.grapeVarietals = entry.get(\"grapeVarietals\").to_string();\n this.pHValue = entry.get(\"pHValue\").to_string();\n this.wineAppellation = entry.get(\"wineAppellation\").to_string();\n this.alcoholContent = entry.get(\"alcoholContent\").to_string();\n this.phoneNumber = entry.get(\"phoneNumber\").to_string();\n this.email = entry.get(\"email\").to_string();\n this.index = index;\n }", "public FileTable( Directory directory )\n { // constructor\n table = new Vector( ); // instantiate a file (structure) table\n this.directory = directory; // receive a reference to the Director\n }", "public void construct(){\n\t\tbuilder.buildPart1();\n\t\tbuilder.buildPart2();\n\t\tbuilder.retrieveResult();\n\t}", "public SimilarResultList(int maxSize, SimilarResult... results) {\n this(maxSize, 0, results);\n }", "DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);", "@Override\n protected void initResultTable() {\n }", "private void createEventFilesTable(Composite parent, FormToolkit formToolkit,\n final String defaultEventFileName) {\n final Table table = new Table(parent, SWT.BORDER);\n table.setLinesVisible(true);\n table.setHeaderVisible(true);\n\n String[] titles = { \"File\", \"\" };\n int[] widths = { 500, 100 };\n createTableColumns(table, titles, widths);\n\n final TableItem tableItem = new TableItem(table, SWT.NONE);\n tableItem.setText(0, defaultEventFileName);\n\n TableEditor editor = new TableEditor(table);\n Button button = new Button(table, SWT.NONE);\n button.setText(Messages.OPEN_LABEL);\n button.pack();\n editor.minimumWidth = button.getSize().x;\n editor.horizontalAlignment = SWT.LEFT;\n editor.setEditor(button, tableItem, 1);\n\n button.addSelectionListener(new SelectionListener() {\n\n @Override\n public void widgetSelected(SelectionEvent arg0) {\n traceEditor.createEventTab(defaultEventFileName);\n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent arg0) {\n traceEditor.createEventTab(defaultEventFileName);\n }\n });\n\n FormData formData = new FormData();\n formData.left = new FormAttachment(0);\n formData.top = new FormAttachment(0);\n formData.right = new FormAttachment(100);\n formData.bottom = new FormAttachment(100);\n table.setLayoutData(formData);\n }", "public CreateTable(Object result) {\r\n this.result = result;\r\n columnNames = new String[1];\r\n columnNames[0] = \"Result\";\r\n tableData = new Object[1][1];\r\n tableData[0][0] = this.result;\r\n }", "public TableDefinition(Class<T> model){\n this.singleton = this;\n this.model = model;\n try {\n OBJECT = Class.forName(model.getName());\n createTableDefinition();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public SingleUploader(IUploadStatus status) {\n this(status, new Button());\n }", "public CSVHarvester() {\r\n super(\"csv\", \"CSV Harvester\");\r\n }", "public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }", "public FilePlugin()\n {\n super();\n \n //create the data directory if it doesn't exist\n File dataDir = new File(FilenameUtils.dataDir);\n if(!dataDir.exists()) FilePersistenceUtils.makeDirs(dataDir);\n }", "public SQLManager(FileConfiguration config) {\n ConfigurationSection sql = config.getConfigurationSection(\"sql\");\n if (sql == null) {\n Logger.log(LogType.ERROR, \"No SQL Section in \" + config.getName());\n return;\n }\n\n String host = sql.getString(\"host\");\n int port = sql.getInt(\"port\", 3306);\n String database = sql.getString(\"database\");\n String user = sql.getString(\"user\");\n String password = sql.getString(\"password\");\n\n HikariConfig hikariConfig = new HikariConfig();\n hikariConfig.setJdbcUrl(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + database);\n hikariConfig.setDriverClassName(\"com.mysql.jdbc.Driver\");\n hikariConfig.setUsername(user);\n hikariConfig.setPassword(password);\n hikariConfig.setMinimumIdle(1);\n hikariConfig.setMaximumPoolSize(10);\n hikariConfig.setConnectionTimeout(10000);\n\n this.dataSource = new HikariDataSource(hikariConfig);\n this.queryThread = new QueryThread(this);\n\n initTables();\n }", "public FileTable(Directory directory) {\n\t\ttable = new Vector();//set struture table \n\t\tdir = directory;//set director for receive a reference\n\t}", "public AccumuloBulkIngester(AccumuloGraphConfiguration config) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,\n TableExistsException, IOException, InterruptedException {\n this.config = config;\n connector = config.getConnector();\n\n AccumuloGraphUtils.handleCreateAndClear(config);\n\n mtbw = connector.createMultiTableBatchWriter(config.getBatchWriterConfig());\n vertexWriter = mtbw.getBatchWriter(config.getVertexTableName());\n edgeWriter = mtbw.getBatchWriter(config.getEdgeTableName());\n }", "public qEntry() { }", "private void createQueryEntryServer(final int q, final SeqIter res,\r\n final int k) throws IOException {\r\n \r\n xml.openElement(token(\"topic\"), token(\"topic-id\"), token(tid.get(q)),\r\n token(\"total_time_ms\"), token(qtimes[q])\r\n );\r\n \r\n Item a;\r\n int r = 1;\r\n while(res != null && (a = res.next()) != null && r <= k) {\r\n final byte[] s = a.str();\r\n final int i = indexOf(s, ';');\r\n xml.openElement(token(\"result\"));\r\n xml.openElement(token(\"file\"));\r\n xml.text(substring(s, 0, i));\r\n xml.closeElement();\r\n xml.openElement(token(\"path\"));\r\n xml.text(substring(s, i + 1));\r\n xml.closeElement();\r\n xml.openElement(token(\"rank\"));\r\n xml.text(token(r++));\r\n xml.closeElement();\r\n xml.openElement(token(\"rsv\"));\r\n xml.text(token(a.score));\r\n xml.closeElement();\r\n xml.closeElement();\r\n }\r\n xml.closeElement();\r\n }", "public MySQLIngestTable(String dbname, String tblname) {\n db = dbname;\n tbl = tblname;\n }", "public SimpleDirectory() {\n this.container = new Entry[SimpleDirectory.DEFAULT_SIZE];\n this.loadFactor = SimpleDirectory.DEFAULT_LOAD_FACTOR;\n }", "public SimilarResultList(int maxSize, Collection<SimilarResult<T>> results) {\n this(maxSize, 0, results);\n }", "public SingleUploader(IUploadStatus status, Button button) {\n this(status, button, null);\n }", "private void createConfigTable(String table) throws SQLException {\n String s = new String(\"CREATE TABLE \"+table+\" ( \\nconfigName TEXT,\\nimageName TEXT,\\n imageWidth INT, \\n imageHeight INT, \\n minPixelX INT, \\n minPixelY INT, \\n maxPixelX INT, \\n maxPixelY INT, \\n minX INT,\\n minY INT,\\n maxX INT,\\n maxY INT)\");\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n stmt.executeUpdate(s);\n stmt.close();\n con.close();\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "public TableCreation(Table table) {\n this.table = table;\n }", "public interface SettingsEventQuery {\r\n public static final String[] COLUMNS = {\"keyField\", \"keyValue\"};\r\n public static final String CREATE_TABLE = (\"CREATE TABLE IF NOT EXISTS Settings(\" + COLUMNS[0] + \" TEXT, \" + COLUMNS[1] + \" TEXT )\");\r\n public static final String DROP_TABLE = \"DROP TABLE IF EXISTS Settings\";\r\n public static final int KEY_FIELD = 0;\r\n public static final int KEY_VALUE = 1;\r\n public static final String TABLE = \"Settings\";\r\n }", "public void constructWith(LzzFileInfo pro) {\n\t\tthis.id = pro.getId ();\n\n\t\tthis.fname = pro.getFname ();\n\n\t\tthis.ftype = pro.getFtype ();\n\n\t\tthis.fsavepath = pro.getFsavepath ();\n\n\t\tthis.furlpath = pro.getFurlpath ();\n\n\t\tthis.createTime = pro.getCreateTime ();\n\n\t\tthis.modifyTime = pro.getModifyTime ();\n\n\t\tthis.def1 = pro.getDef1 ();\n\n\t\tthis.def2 = pro.getDef2 ();\n\n\t\tthis.def3 = pro.getDef3 ();\n\n\t\tthis.def4 = pro.getDef4 ();\n\n\t\tthis.def5 = pro.getDef5 ();\n\n\t\tthis.def6 = pro.getDef6 ();\n\n\t\tthis.def7 = pro.getDef7 ();\n\n\t\tthis.def8 = pro.getDef8 ();\n\n\t\tthis.def9 = pro.getDef9 ();\n\n\t\tthis.def10 = pro.getDef10 ();\n\n\t\tthis.dr = pro.getDr ();\n\n\t}", "public TranscriptionIndexer() throws SQLException, CorruptIndexException, IOException\r\n {\r\n\r\n\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterized location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n PreparedStatement stmt=null;\r\n Connection j = null;\r\n try {\r\n j=DatabaseWrapper.getConnection();\r\n String query=\"select * from transcription where text!='' and creator>0 order by folio, line\";\r\n stmt=j.prepareStatement(query);\r\n ResultSet rs=stmt.executeQuery();\r\n while(rs.next())\r\n {\r\n int folio=rs.getInt(\"folio\");\r\n int line=rs.getInt(\"line\");\r\n int UID=rs.getInt(\"creator\");\r\n int id=rs.getInt(\"id\");\r\n Transcription t=new Transcription(id);\r\n Document doc = new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n if(writer!=null)\r\n {\r\n writer.commit();\r\n \twriter.close();\r\n return;\r\n }\r\n ex.printStackTrace();\r\n }\r\n finally{\r\n DatabaseWrapper.closeDBConnection(j);\r\n DatabaseWrapper.closePreparedStatement(stmt);\r\n }\r\n\r\n writer.commit();\r\n \twriter.close();\r\n}", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "void buildDataTable(SearchResults<ManageUsersSearchModel.Result> results);", "TarEntry CreateEntry(String name);", "protected void initializeEntry(final IRasterModelEntry entry) {\n\n\t\t// make sure we have an entry\n\t\tif (entry == null) {\n\t\t\t// nothing to do\n\t\t} else if (entry.getEntryType().equals(RasterModelEntryType.VALUE)) {\n\t\t\tfinal int bucketStart = configuration.getGranularity().getMin();\n\t\t\tfinal int bucketEnd = configuration.getGranularity().getMax();\n\t\t\tfinal int step = configuration.getGranularity().getBucketSize();\n\n\t\t\tif (addedModelData > 0) {\n\t\t\t\tthrow new IllegalStateException(\"The RasterModelEntry '\"\n\t\t\t\t\t\t+ entry.getName() + \"' was added to the RasterModel '\"\n\t\t\t\t\t\t+ modelId + \"' after ModelData was added.\");\n\t\t\t}\n\n\t\t\t// create the granularity raster data\n\t\t\tfor (int i = bucketStart; i <= bucketEnd; i += step) {\n\n\t\t\t\t// create the key for this row\n\t\t\t\tfinal RasterBucket bucket = new RasterBucket(i);\n\n\t\t\t\t/*\n\t\t\t\t * now lets create the array for the data of the BaseRaster. We\n\t\t\t\t * can calculate some values for the RasterFunctions already\n\t\t\t\t * (i.e. the static once).\n\t\t\t\t */\n\t\t\t\tfinal IRasterModelData bucketData = new BaseRasterModelData();\n\n\t\t\t\t/*\n\t\t\t\t * Now we will add a the data of the init RasterFunction which\n\t\t\t\t * is used by this BaseRaster\n\t\t\t\t */\n\t\t\t\tentry.initTo(bucketData);\n\n\t\t\t\t// add the value for the bucket\n\t\t\t\tdataCollection.put(bucket, bucketData);\n\t\t\t}\n\t\t}\n\t}", "private FileEntry() {\n // intentionally empty\n }", "public void storeTable(Table table) {\n Entity tableEntity = new Entity(\"Table\");\n tableEntity.setProperty(\"firstName\", table.getFirstName());\n tableEntity.setProperty(\"lastName\", table.getLastName());\n tableEntity.setProperty(\"email\", table.getEmail());\n tableEntity.setProperty(\"phoneNumber\", table.getPhoneNumber());\n tableEntity.setProperty(\"restName\", table.getRestName());\n tableEntity.setProperty(\"restAdd\", table.getRestAdd());\n tableEntity.setProperty(\"restDescrip\", table.getRestDescrip());\n tableEntity.setProperty(\"dateTime\", table.getDateTime());\n tableEntity.setProperty(\"maxSize\", table.getMaxSize());\n tableEntity.setProperty(\"otherNotes\", table.getOtherNotes());\n tableEntity.setProperty(\"members\", table.getMembers());\n tableEntity.setProperty(\"lat\", table.getLat());\n tableEntity.setProperty(\"lng\", table.getLng());\n \n DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n datastore.put(tableEntity);\n}", "@Override\n\tpublic Response execute() {\n\n\t\tDatabaseAccessor db = null;\n\t\tint filetype;\n\t\tif(type.equalsIgnoreCase(\"raw\")) {\n\t\t\tfiletype = FileTuple.RAW;\n\t\t} else if(type.equalsIgnoreCase(\"profile\")) {\n\t\t\tfiletype = FileTuple.PROFILE;\n\t\t} else if(type.equalsIgnoreCase(\"region\")) {\n\t\t\tfiletype = FileTuple.REGION;\n\t\t} else {\n\t\t\tfiletype = FileTuple.OTHER;\n\t\t}\n\t\ttry {\n\t\t\tdb = initDB();\n\t\t\tFileTuple ft = db.addNewFile(experimentID, filetype, fileName, null, metaData, author, uploader, isPrivate, grVersion);\n\t\t\treturn new AddFileToExperimentResponse(StatusCode.OK, ft.getUploadURL());\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.BAD_REQUEST, e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.SERVICE_UNAVAILABLE, e.getMessage());\n\t\t} finally{\n\t\t\tdb.close();\n\t\t}\n\t}", "public static void main(String[] args) {\n if (args.length < 1) \n fail(\"Missing db name, table name, table description, & data file\", 1);\n if (args.length < 2) \n fail(\"Missing table name, table description, & data file\", 1);\n if (args.length < 3) \n fail(\"Missing table description, & data file\", 1);\n if (args.length < 4) \n fail(\"Missing data file\", 1);\n\n String user = null, pass = null, host = null;\n if (args.length > 4) user = args[4];\n if (args.length > 5) pass = args[5];\n if (args.length > 6) host = args[6];\n\n MySQLIngestTable ingester = new MySQLIngestTable(args[0], args[1],\n user, pass, host);\n File coldesc = new File(args[2]);\n if (! coldesc.exists()) \n fail(\"File not found: \" + args[2], 2);\n File datacsv = new File(args[3]);\n if (! datacsv.exists()) \n fail(\"File not found: \" + args[3], 2);\n\n int exval = 0;\n try {\n /*\n KeywordFactory kwf = new XMLConfiguredKeywordFactory(coldesc);\n exval = ingester.createTable(kwf);\n */\n exval = ingester.initDb(coldesc, datacsv);\n }\n catch (IOException ex) {\n fail(ex.getMessage(), 3);\n }\n catch (Exception ex) {\n ex.printStackTrace();\n System.exit(4);\n }\n if (exval > 0) exval += 10;\n System.exit(exval);\n }", "public com.google.devtools.kythe.proto.Analysis.FileInfo.Builder getEntryBuilder(\n int index) {\n return getEntryFieldBuilder().getBuilder(index);\n }", "private DatabaseWriteResult(UploadStrategy strategy) {\n savedEntries = new ArrayList<>(1000);\n databaseSize = -1L;\n error = null;\n uploadStrategy = strategy;\n }", "public StorageConfig() {\n }", "public SimilarResultList(int maxSize) {\n this(maxSize, 0);\n }", "private OSHImageQuerier createQuerier(EasyMockSupport support, DataTypeInfo videoLayer, int times)\r\n throws QueryException, IOException\r\n {\r\n OSHImageQuerier querier = support.createMock(OSHImageQuerier.class);\r\n\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n ImageIO.write(ImageUtil.LOADING_IMAGE, \"png\", out);\r\n EasyMock.expect(querier.queryImage(EasyMock.cmpEq(ourTypeKey), EasyMock.isA(TimeSpan.class)))\r\n .andAnswer(this::queryImageAnswer).times(times);\r\n\r\n return querier;\r\n }", "SQLFormater(String tableName, String idField) {\n this.tableName = tableName;\n this.idFieldName = idField;\n mapFieldsTypes = new HashMap<>();\n mapFieldsStrings = new HashMap<>();\n mapFieldsIntegers = new HashMap<>();\n mapFieldsConstraints = new HashMap<>();\n }", "public void createFullListing(HashMap<String,String> values) throws Exception\n\t {\n\t \tString getIDs = \"SELECT MAX(make_id), MAX(powertrain_id), MAX(engine_id), MAX(listing_id) FROM listing, powertrainhasengine\";\n\t \tStatement statement = connection.createStatement();\n\t \tResultSet ids = statement.executeQuery(getIDs);\n\t \tids.first();\n\t \tint newListing_id = ids.getInt(\"MAX(listing_id)\") + 1;\n\t \tint newMake_id = ids.getInt(\"MAX(make_id)\") + 1;\n\t \tint newPowerTrain_id = ids.getInt(\"MAX(powertrain_id)\") + 1;\n\t\tint newEngine_id = ids.getInt(\"MAX(engine_id)\") + 1;\n\t\tids.close();\n\n\t\t//Quickly add the new ids to the HashTable\n\t\tvalues.put(\"listing_id\", Integer.toString(newListing_id));\n\t\t values.put(\"make_id\", Integer.toString(newMake_id));\n\t\t values.put(\"powertrain_id\", Integer.toString(newPowerTrain_id));\n\t\t values.put(\"engine_id\", Integer.toString(newEngine_id));\n\n\t\t//Now check if the entered data exists.\n\t\tboolean makeExists = true, powertrainExists = true, engineExists = true;\n\t\tint makeID, powertrainID, engineID;\n\n\t\tString makeExistsString = \"SELECT make_id FROM make WHERE make = \" + values.get(\"make\") + \" AND model =\"\n\t\t\t\t+ values.get(\"model\") + \" AND type = \" + values.get(\"type\") + \" AND year = \" + values.get(\"year\");\n\t\tResultSet makeRS = statement.executeQuery(makeExistsString);\n\t\tif(!makeRS.next()) {\n\t\t\tmakeExists = false; //insert if does not exist\n\t\t} else {\n\t\t\tmakeID = makeRS.getInt(\"make_id\");\n\t\t\tvalues.put(\"make_id\", Integer.toString(makeID));\n\t\t}\n\t\tmakeRS.close();\n\n\t\tString powerTrainExistsString = \"SELECT powertrain_id FROM powertrain WHERE drive_type = \"\n\t\t\t\t+ values.get(\"drive_type\") + \" AND transmition = \" + values.get(\"transmition\");\n\t\tResultSet powertrainRS = statement.executeQuery(powerTrainExistsString);\n\t\tif(!powertrainRS.next()){\n\t\t\tpowertrainExists = false;\n\t\t} else {\n\t\t\tpowertrainID = powertrainRS.getInt(\"powertrain_id\");\n\t\t\tvalues.put(\"powertrain_id\", Integer.toString(powertrainID));\n\t\t}\n\t\tpowertrainRS.close();\n\n\t\tString engineExistsString = \"SELECT engine_id FROM engine WHERE size = \" + values.get(\"size\")\n\t\t\t\t+ \" AND fuel_type = \" + values.get(\"fuel_type\") + \" AND cylinders = \" + values.get(\"cylinders\");\n\t\tResultSet engineRS = statement.executeQuery(engineExistsString);\n\t\tif(!engineRS.next()){\n\t\t\tengineExists = false;\n\t\t} else {\n\t\t\tengineID = engineRS.getInt(\"engine_id\");\n\t\t\tvalues.put(\"engine_id\", Integer.toString(engineID));\n\t\t}\n\t\tengineRS.close();\n\n\t\t//in table\n\t\t if(makeExists == true && powertrainExists == true && engineExists == true) {\n\t\t\t addListing(Integer.parseInt(values.get(\"listing_id\")),Integer.parseInt(values.get(\"make_id\")),\n\t\t\t\t\t Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\t Double.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t }\n\n\t\t //not in table\n\t\t if(engineExists == false){\n\t\t \taddEngine(newEngine_id,Integer.parseInt(values.get(\"size\")),values.get(\"fuel_type\"),\n\t\t\t\t\tInteger.parseInt(values.get(\" cylinder\")));\n\t\t }\n\t\t if(powertrainExists == false){\n\t\t \taddPowertrain(newPowerTrain_id,values.get(\"drive_type\"),\n\t\t\t\t\tvalues.get(\"transmition\"));\n\n\t\t\tif(makeExists == true) {\n\t\t\t\t//if Make is true, powertrain is false\n\t\t\t\taddMake(newMake_id, values.get(\"make\"), values.get(\"model\"), values.get(\"type\"),\n\t\t\t\t\t\tnewPowerTrain_id, Integer.parseInt(values.get(\"year\")));\n\n\t\t\t\taddMakeHasPowertrain(newMake_id, newPowerTrain_id);\n\n\t\t\t\taddListing(newListing_id,newMake_id,Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\t\tDouble.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t\t}\n\n\t\t }\n\t\t if(engineExists == false || powertrainExists == false) {\n\t\t \taddPowertrainHasEngine(Integer.parseInt(values.get(\"powertrain_id\")),\n\t\t\t\t\tInteger.parseInt(values.get(\"engine_id\")));\n\t\t }\n\t\t if(makeExists == false) {\n\t\t \t//if make is false but powertrain is true\n\t\t \taddMake(newMake_id,values.get(\"make\"),values.get(\"model\"),values.get(\"type\"),\n\t\t\t\t\tInteger.parseInt(values.get(\"powertrain_id\")), Integer.parseInt(values.get(\"year\")));\n\n\t\t \taddMakeHasPowertrain(newMake_id,Integer.parseInt(values.get(\"powertrain_id\")));\n\n\t\t \taddListing(newListing_id,newMake_id,Integer.parseInt(values.get(\"mileage\")),values.get(\"color\"),\n\t\t\t\t\tDouble.parseDouble(values.get(\"price\")),values.get(\"description\"));\n\t\t }\n\n\t \t//use fns: addListing, addengine, addmake, addpowertrain, addmakehaspowertrain, addpowertrainhasengine\n\n\t }", "public static Table buildTableFromCSV(String filePath,String tableName){\n\t\treturn new Table(tableName);\n\t}", "public static QueryResult fromIndexerResult(Document document) {\n return new QueryResult.Builder()\n .content(document.get(LuceneFieldConstants.CONTENT.getText()))\n .filename(document.get(LuceneFieldConstants.FILE_NAME.getText()))\n .build();\n\n }", "private void addTable()\r\n {\r\n // Create the table\r\n table = new JTable();\r\n table.setAutoCreateRowSorter(true);\r\n table.setColumnSelectionAllowed(false);\r\n table.getTableHeader().setReorderingAllowed(false);\r\n table.setModel(new JarModel());\r\n \r\n // Center the column headings\r\n ((DefaultTableCellRenderer) table.getTableHeader().\r\n getDefaultRenderer()).setHorizontalAlignment(SwingConstants.CENTER);\r\n \r\n // Set the column widths\r\n table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\r\n table.getColumnModel().getColumn(0).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(0).setMaxWidth(250);\r\n table.getColumnModel().getColumn(2).setPreferredWidth(140);\r\n table.getColumnModel().getColumn(2).setMaxWidth(250);\r\n table.getColumnModel().getColumn(3).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(3).setMaxWidth(250);\r\n table.getColumnModel().getColumn(4).setPreferredWidth(100);\r\n table.getColumnModel().getColumn(4).setMaxWidth(250);\r\n \r\n // Sort on the first column\r\n table.getRowSorter().toggleSortOrder(0);\r\n \r\n table.getColumnModel().getColumn(0).setCellRenderer(new BooleanColorCellRenderer());\r\n table.getColumnModel().getColumn(2).setCellRenderer(new DateCellRenderer());\r\n \r\n // Add the table to the panel\r\n add(new JScrollPane(table), BorderLayout.CENTER);\r\n }", "protected StandardEntrySet() {}", "public Table buildNewAssetTable(ManufacturingOrder dto) {\n\n\t\tTable table = new Table();\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 500px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\tTableRow row = new TableRow();\n\n\t\tInputField assetNumberText = new InputField(\"assetNumber\", \"\",\n\t\t\t\tInputType.TEXT);\n\t\tassetNumberText.addAttribute(\"maxlength\", \"6\");\n\t\tassetNumberText.addAttribute(\"size\", \"10\");\n\t\tTableData asset = null;\n\t\tif (dto.getEditFlag()) {\n\t\t\tasset = new TableData(new SimpleText(dto.getAssetNumber()));\n\t\t\tasset.addAttribute(\"style\", \"width: 10% ; vertical-align: middle\");\n\n\t\t} else {\n\t\t\tasset = new TableData(assetNumberText);\n\t\t\tasset.addAttribute(\"style\", \"width: 30%\");\n\t\t}\n\t\tString desc = \"\";\n\n\t\tif (dto.getEditFlag()) {\n\t\t\tdesc = dto.getDescription();\n\t\t}\n\n\t\tInputField description = new InputField(\"descrip\", desc, InputType.TEXT);\n\t\tdescription.addAttribute(\"maxlength\", \"100\");\n\t\tdescription.addAttribute(\"size\", \"30\");\n\t\tTableData descriptionText = new TableData(description);\n\t\tdescriptionText.addAttribute(\"style\", \"width: 40%\");\n\n\t\tTableData status = null;\n\t\tif (dto.getEditFlag()) {\n\n\t\t\tif (dto.getStatus() == null || !(\"A\".equals(dto.getStatus()))) {\n\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\"/>\"));\n\t\t\t} else {\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\t}\n\n\t\t\tTableData facility = new TableData(new SimpleText(dto\n\t\t\t\t\t.getSelectedFacility()));\n\t\t\tfacility.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\n\t\t\tTableData workCenter = new TableData(new SimpleText(dto\n\t\t\t\t\t.getWorkCenterCode()));\n\t\t\tworkCenter.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\t\t\trow.addTableData(facility);\n\t\t\trow.addTableData(workCenter);\n\t\t\tstatus.addAttribute(\"style\", \"width: 10%\");\n\t\t\tdescriptionText.addAttribute(\"style\", \"width: 30%\");\n\n\t\t} else {\n\t\t\tstatus = new TableData(\n\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\tstatus.addAttribute(\"style\", \"width: 20%\");\n\t\t}\n\t\trow.addTableData(asset);\n\t\trow.addTableData(descriptionText);\n\t\trow.addTableData(status);\n\n\t\trow.addAttribute(\"class\", \"normalRow\");\n\n\t\ttable.addTableRow(row);\n\n\t\treturn table;\n\t}", "public LuceneLocalInputComponent(LuceneSearchConfig settings)\n {\n this.luceneSettings = settings;\n }", "public Builder mainFormatType(Class<?> mainFormatType) {\n this.mainFormatTypeClass = mainFormatType;\n return this;\n }", "public TranscriptEntry(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (FileReader reader = new FileReader(filename)){\n Object obj = jsonParser.parse(reader);\n\n JSONObject entry = (JSONObject) obj;\n JSONObject myCourse = (JSONObject) entry.get(\"course\");\n course = parseCourse(myCourse);\n grade = (String) entry.get(\"grade\");\n inProgress = (boolean) entry.get(\"inProgress\");\n courseComplete = (boolean) entry.get(\"courseComplete\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void initResultStorage() {\n\t\tstorage = new ResultStorage();\n\t\t\n\t\tfinal String geom = GeometryNames.RECT;\n\t\tfinal String mix = \"Default\";\n\t\tfinal int steps = 20;\n\t\tfinal double[] segr = new double[] { 0.1, 0.2, 0.3, 0.7, 0.6, 0.8, 0.8,\n\t\t\t\t0.4, 0.9, 0.4, 0.8, 0.2, 0.6, 0.3, 0.7, 0.5, 0.9, 0.4, 0.8, 0.1 };\n\n\t\tfor (int i = startIndex; i < endIndex; i++) {\n\t\t\tdistribution[i] = 255;\n\t\t}\n\t\t\n\t\tstorage.setDistribution(distribution);\n\t\tstorage.setGeometry(geom);\n\t\tstorage.setMixer(mix);\n\t\tstorage.setNrSteps(steps);\n\t\tstorage.setMixingProtocol(protocol);\n\t\tstorage.setSegregation(segr);\n\t}", "public static void main(String[] args) {\n File f = new File(args[0]);\r\n String name = args[1];\r\n kelondroRow row = new kelondroRow(\"Cardinal key-4 {b256}, byte[] x-64\", kelondroNaturalOrder.naturalOrder, 0);\r\n try {\r\n kelondroFlexTable t = new kelondroFlexTable(f, name, 0, row, 0, true);\r\n kelondroRow.Entry entry = row.newEntry();\r\n entry.setCol(0, System.currentTimeMillis());\r\n entry.setCol(1, \"dummy\".getBytes());\r\n t.put(entry);\r\n t.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public ResultHandlerDaoFactory(DataSource datasource, ItemWriter itemWriter, String outputFilePath) {\n setDatasource(datasource);\n setItemWriter(itemWriter);\n setOutputFilePath(outputFilePath);\n }", "private void setUpTable() {\n setSizeFull();\n // expand the table\n table.setSizeFull();\n\n // Allow selecting items from the table.\n table.setSelectionMode(SelectionMode.SINGLE);\n\n // set custom style\n table.addStyleName(\"example-queries-table\");\n\n // configure columns\n Column<Entry, ?> corpusBrowserColumn = table.addComponentColumn(e -> {\n return getOpenCorpusPanel(e.corpus);\n });\n corpusBrowserColumn.setId(COLUMN_OPEN_CORPUS_BROWSER);\n corpusBrowserColumn.setCaption(\"open corpus browser\");\n\n Column<Entry, ?> exampleQueryColumn = table.addComponentColumn(e -> {\n Button btn = new Button();\n btn.setDescription(\"show corpus browser for \" + e.corpus);\n btn.addStyleName(ValoTheme.BUTTON_LINK);\n btn.setIcon(SEARCH_ICON);\n btn.setCaption(e.example.getQuery());\n btn.setDescription(\"show results for \\\"\" + e.example.getQuery() + \"\\\" in \" + e.corpus);\n btn.addStyleName(Helper.CORPUS_FONT_FORCE);\n\n btn.addClickListener(event -> {\n if (ui != null) {\n ControlPanel controlPanel = ui.getSearchView().getControlPanel();\n QueryPanel queryPanel;\n\n if (controlPanel == null) {\n log.error(\"controlPanel is not initialized\");\n return;\n }\n\n queryPanel = controlPanel.getQueryPanel();\n if (queryPanel == null) {\n log.error(\"queryPanel is not initialized\");\n return;\n }\n\n Set<String> corpusNameSet = new HashSet<>();\n corpusNameSet.add(e.corpus);\n if (ui.getQueryController() != null) {\n QueryLanguage ql = QueryLanguage.AQL;\n if (e.example\n .getQueryLanguage() == org.corpus_tools.annis.api.model.QueryLanguage.AQLQUIRKSV3) {\n ql = QueryLanguage.AQL_QUIRKS_V3;\n }\n ui.getQueryController()\n .setQuery(new Query(e.example.getQuery(), ql, corpusNameSet));\n // execute query\n ui.getQueryController().executeSearch(true, true);\n }\n }\n });\n return btn;\n });\n exampleQueryColumn.setId(COLUMN_EXAMPLE_QUERY);\n exampleQueryColumn.setCaption(\"Example Query\");\n\n Column<Entry, ?> descriptionColumn = table.addComponentColumn(e -> {\n Label l = new Label(e.example.getDescription());\n l.setContentMode(ContentMode.TEXT);\n l.addStyleName(Helper.CORPUS_FONT_FORCE);\n return l;\n });\n descriptionColumn.setCaption(\"Description\");\n descriptionColumn.setId(COLUMN_DESCRIPTION);\n\n table.setColumns(COLUMN_EXAMPLE_QUERY, COLUMN_DESCRIPTION, COLUMN_OPEN_CORPUS_BROWSER);\n\n exampleQueryColumn.setExpandRatio(1);\n descriptionColumn.setExpandRatio(1);\n\n }", "@Override\r\n public void build() throws IOException, TwitterException {\r\n // Read the csv file\r\n CSVReader csvr = new CSVReader(\";\", sourcePath);\r\n // Will contains the csv file rows\r\n ArrayList<String[]> rows;\r\n // Set builder params\r\n setBuilderParams(indexPath);\r\n // Get the whole CSV rows\r\n rows = csvr.readCSV();\r\n \r\n TweetsIndexManager tim = new TweetsIndexManager(\"index/AllTweetsIndex\");\r\n\r\n // Mantain the id of a user\r\n String id;\r\n // Manatain the id and the number of the followers of the user\r\n String[] result;\r\n // Mantain the number of followers of that user\r\n int followers;\r\n \r\n int tNotFound = 0;\r\n int tFound = 0;\r\n \r\n // For each politicians in the file read\r\n for (String[] row : rows) {\r\n // Get the politician name\r\n String name = row[0];\r\n // Get the politician surname\r\n //String surname = row[1];\r\n // Get all users that have the same name of the politician\r\n result = findUserTwitterId(name, tim);\r\n // Get the userId\r\n id = result[0]; // row[1]; \r\n // Get the number of followers\r\n followers = Integer.parseInt(result[1]);\r\n \r\n //System.out.println(\"Current twitter ID: \" + id);\r\n \r\n if(id.equals(\"\")) {\r\n tNotFound++;\r\n id= row[1];\r\n followers = 800;\r\n } else {\r\n tFound++;\r\n }\r\n \r\n //System.out.println(\"Politicians Builder index path: \" + this.indexPath);\r\n \r\n //System.out.println(\"Search for : \" + name + \", followers: \" + followers);\r\n // If a user was found and it has at list a certain value of followers\r\n if (!id.equals(\"\") && followers >= 800) {\r\n // Create a new document for the index\r\n this.name.setStringValue((name).toLowerCase());\r\n this.screenName.setStringValue(id);\r\n\r\n //System.out.println(\"\");\r\n //System.out.println(this.politician.get(\"name\"));\r\n //System.out.println(this.politician.get(\"screenName\"));\r\n\r\n // Define the politician vote\r\n // If the pol vote is equal to his group vote\r\n /*if (row[2].equals(groupVote.get(row[3]))) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is defined in the csv file\r\n } else if (row[2].equals(\"si\") || row[2].equals(\"no\")) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is not defined in the csv file\r\n } else if (row[2].equals(\"-\") && !row[3].equals(\"MISTO\")) {\r\n // Return his group vote and write the document\r\n this.vote.setStringValue(groupVote.get(row[3]));\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n }*/\r\n \r\n \r\n this.vote.setStringValue(groupVote.get(row[2]));\r\n \r\n //this.vote.setStringValue(\"si\");\r\n \r\n //System.out.println(this.politician.get(\"vote\"));\r\n \r\n this.writer.addDocument(this.politician);\r\n }\r\n \r\n //System.out.println(\"Party: \" + row[2]);\r\n //System.out.println(\"----------------\");\r\n \r\n this.writer.commit();\r\n \r\n }\r\n \r\n System.out.println(\"Twitter IDs not found: \" + tNotFound);\r\n \r\n System.out.println(\"Twitter IDs found: \" + tFound);\r\n \r\n this.writer.close();\r\n }", "public LogEmailSendrecordDao(Configuration configuration) {\n super(LogEmailSendrecord.LOG_EMAIL_SENDRECORD, com.moseeker.baseorm.db.logdb.tables.pojos.LogEmailSendrecord.class, configuration);\n }", "private Job newJob(Path dir, Configuration configuration,\n String taskAttemptId) throws IOException {\n Job job = Job.getInstance(configuration);\n Configuration conf = job.getConfiguration();\n conf.set(MRJobConfig.TASK_ATTEMPT_ID, taskAttemptId);\n enableManifestCommitter(conf);\n FileOutputFormat.setOutputPath(job, dir);\n return job;\n }", "public SearchResultEditorContentProvider( SearchResultEditorWidget mainWidget,\n SearchResultEditorConfiguration configuration )\n {\n this.mainWidget = mainWidget;\n this.configuration = configuration;\n\n this.configuration.getFilter().connect( this );\n this.configuration.getSorter().connect( this );\n }", "public void initialize(IConfiguration config) {\n\t\tprescaleTable = new PrescaleTable(config);\n\t\tfireTableDataChanged();\n\t}", "public DataEntry createEntry(String tableName, DataEntry entry) {\n\t\tDataEntry oldEntry = null;\n\t\tif (tables.containsKey(tableName)) {\n\t\t\tTable table = tables.get(tableName);\n\t\t\toldEntry = table.create(entry.getProductId(), entry);\n\t\t\tdataToHistory(oldEntry);\n\t\t}\n\t\treturn oldEntry;\n\t}", "public RecipeData(LuaTable t) {\n this.ingredients = LuaUtil.getList(t, \"ingredients\", Ingredient::new);\n if (this.ingredients.isEmpty()) {\n throw new RuntimeException();\n }\n\n LuaValue result = t.rawget(\"result\");\n LuaValue results = t.rawget(\"results\");\n if (result.isnil() && results.istable()) {\n this.results = LuaUtil.getList(t, \"results\", Product::new);\n } else if (result.isstring() && results.isnil()) {\n this.results = List.of(new Product(result.checkjstring(), LuaUtil.getInt(t, \"result_count\", 1)));\n } else {\n throw new RuntimeException();\n }\n if (this.results.isEmpty()) {\n throw new RuntimeException();\n }\n\n this.time = LuaUtil.getBigRational(t, \"energy_required\", BigRationalConstants.ONE_OVER_TWO);\n this.allowDecomposition = LuaUtil.getBoolean(t, \"allow_decomposition\", true);\n }" ]
[ "0.48782587", "0.483144", "0.48172864", "0.48160365", "0.47901988", "0.4761263", "0.47143927", "0.4648399", "0.463112", "0.4611645", "0.46096575", "0.4601092", "0.45925155", "0.4579794", "0.4565521", "0.45601556", "0.4546335", "0.45218208", "0.44446695", "0.4434659", "0.44223532", "0.4419844", "0.44194233", "0.44060555", "0.44039872", "0.4396991", "0.43930018", "0.4385715", "0.4381852", "0.43551219", "0.43532708", "0.434415", "0.4336943", "0.43339065", "0.43336585", "0.43272042", "0.4315366", "0.43067145", "0.42877194", "0.4266787", "0.42570832", "0.42478153", "0.42380577", "0.42348588", "0.42332754", "0.4227226", "0.4218015", "0.42165062", "0.42085382", "0.42052245", "0.4205188", "0.42009875", "0.4195485", "0.41870072", "0.4184978", "0.41825777", "0.41775075", "0.4176739", "0.41710547", "0.4170917", "0.41660857", "0.41604102", "0.4152785", "0.41518947", "0.41394305", "0.4137062", "0.41331708", "0.41248018", "0.41239795", "0.41196197", "0.41102555", "0.41041502", "0.40964922", "0.40941507", "0.40799665", "0.40762863", "0.4065089", "0.4056626", "0.40483186", "0.4044905", "0.40437636", "0.40421185", "0.40381438", "0.40374026", "0.40370613", "0.4034679", "0.4033274", "0.40294605", "0.40255538", "0.40250918", "0.4024434", "0.40219706", "0.40001345", "0.39951116", "0.39822316", "0.39713937", "0.3971193", "0.39691028", "0.39667612", "0.39630783" ]
0.61444676
0
Uploads the given intermediate results
public void uploadResult(MLPipeline classifier, long evaluationTime, double solutionQuality, String phase) throws SQLException { String solutionString = getSolutionString(classifier); if (adapter == null) { logger.warn("Not uploading result after {}ms with value {}. Solution: {}", evaluationTime, solutionQuality, solutionString); } else { Map<String, Object> map = new HashMap<>(); map.put("classifier", solutionString); map.put("phase", phase); map.put("loss", solutionQuality); map.put("time", evaluationTime); map.put("found", System.currentTimeMillis() - timeStart); map.put("algorithm", algorithmName); map.put("experiment_id", experimentId); adapter.insert(table, map); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doUploadResult(String json) throws Exception {\n\n\t}", "public uploadFileForExperiment_result(uploadFileForExperiment_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n }", "@Override\n\t\t\tpublic void uploadSuccess(DefaultPutRet ret) {\n\t\t\t\tSystem.out.println(ret.key+\" uoload sucess!!!\");\n\t\t\t\tsynchronized (this) {\n int row = fileKeys.indexOf(ret.key);\n resultTable.setValueAt(\"finish\", row, 2);\n\t\t\t\t}\n\t\t\t}", "@Override\n protected void upload(X x) {\n }", "public synchronized void upload(){\n\t}", "List<UploadInfo> simpleUploadAll(List<SimpleFile> files);", "void uploadSuccessful(long bytes);", "@Override\n\t\t\tpublic void call(int id, String result) {\n\t\t\t\tafterUpload(id, result);\n\t\t\t}", "public void saveResults();", "@Override\n\tpublic Response execute() {\n\n\t\tDatabaseAccessor db = null;\n\t\tint filetype;\n\t\tif(type.equalsIgnoreCase(\"raw\")) {\n\t\t\tfiletype = FileTuple.RAW;\n\t\t} else if(type.equalsIgnoreCase(\"profile\")) {\n\t\t\tfiletype = FileTuple.PROFILE;\n\t\t} else if(type.equalsIgnoreCase(\"region\")) {\n\t\t\tfiletype = FileTuple.REGION;\n\t\t} else {\n\t\t\tfiletype = FileTuple.OTHER;\n\t\t}\n\t\ttry {\n\t\t\tdb = initDB();\n\t\t\tFileTuple ft = db.addNewFile(experimentID, filetype, fileName, null, metaData, author, uploader, isPrivate, grVersion);\n\t\t\treturn new AddFileToExperimentResponse(StatusCode.OK, ft.getUploadURL());\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.BAD_REQUEST, e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.SERVICE_UNAVAILABLE, e.getMessage());\n\t\t} finally{\n\t\t\tdb.close();\n\t\t}\n\t}", "void uploaded(long timeTaken, TimeUnit unit, long size);", "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 uploadObject() {\n\n\t}", "public filesToHdfs_result(filesToHdfs_result other) {\n if (other.isSetSuccess()) {\n this.success = new ResultEntity(other.success);\n }\n }", "private File processMultipartForm() {\n\n File storeDirectory = Configuration\n .getParameterValueAsFile(PENDING_DIR);\n\n int fileSizeLimit = Configuration\n .getParameterValueAsInt(METADATA_MAX_BYTES);\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(fileSizeLimit);\n\n RestletFileUpload upload = new RestletFileUpload(factory);\n\n List<FileItem> items;\n\n try {\n Request request = getRequest();\n items = upload.parseRequest(request);\n } catch (FileUploadException e) {\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e\n .getMessage(), e);\n }\n\n for (FileItem fi : items) {\n if (fi.getName() != null) {\n String uuid = UUID.randomUUID().toString();\n File file = new File(storeDirectory, uuid);\n try {\n fi.write(file);\n return file;\n } catch (Exception consumed) {\n }\n }\n }\n\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,\n \"no valid file uploaded\");\n }", "public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }", "@Override\r\n public void run() {\n upload();\r\n }", "protected String createBatchAndUpload() throws IOException {\n String batchId;\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload\")) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n batchId = node.get(\"batchId\").asText();\n assertNotNull(batchId);\n }\n\n // fist file\n \n String data = \"SomeDataExtractedFromNuxeoDBToFeedTensorFlow\";\n String fileSize = String.valueOf(data.getBytes(UTF_8).length);\n Map<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidata.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/0\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"0\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n\n // second file\n data = \"SomeDataExtractedFromNuxeoDBToValidateTensorFlow\";\n fileSize = String.valueOf(data.getBytes(UTF_8).length);\n headers.clear();\n headers.put(\"Content-Type\", \"text/plain\");\n headers.put(\"X-Upload-Type\", \"normal\");\n headers.put(\"X-File-Name\", \"aidatacheck.bin\");\n headers.put(\"X-File-Size\", fileSize);\n headers.put(\"X-File-Type\", \"application/octet-stream\");\n\n try (CloseableClientResponse response = getResponse(RequestType.POST, \"upload/\" + batchId + \"/1\", data,\n headers)) {\n assertEquals(Status.CREATED.getStatusCode(), response.getStatus());\n JsonNode node = mapper.readTree(response.getEntityInputStream());\n assertEquals(\"true\", node.get(\"uploaded\").asText());\n assertEquals(batchId, node.get(\"batchId\").asText());\n assertEquals(\"1\", node.get(\"fileIdx\").asText());\n assertEquals(\"normal\", node.get(\"uploadType\").asText());\n } \n \n return batchId;\n }", "@Override\n\t\t\t\t\t\t\tpublic void success(Collection<Photo> result) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "private void uploadFromDataStorage() {\n }", "@RequestMapping(value=\"/upload_result\", method=RequestMethod.POST)\n\tpublic @ResponseBody ResultSnapshot handleResultUpload(\n\t\t\t@RequestParam(value=\"name\", required=false) String name,\n\t\t\t@RequestParam(value=\"file\", required=false) MultipartFile file) throws IOException, ParserException{\n\t\t\n\t\tResultSnapshot resultSnapshot = null;\n\t\t\n\t\tif (file != null && !file.isEmpty()){\n\t\t\n\t\t\tbyte[] bytes = file.getBytes();\n\t\t\tBufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(new File(C_RESULT_FILE_PATH + name)));\n\t\t\tstream.write(bytes);\n\t\t\tstream.close();\n\t\t\n\t\t\tresultSnapshot = parserService.parseResultsFromFile(C_RESULT_FILE_PATH + name);\n\t\t}\n\t\t\n\t\tresultService.saveResultSnapshot(resultSnapshot);\n\t\t\n\t\treturn resultSnapshot;\n\t}", "public void submit() {\n fileUploadContainer.upload.submit();\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n int geekid = Integer.parseInt(request.getParameter(\"geekid\"));\n if (ServletFileUpload.isMultipartContent(request)) {\n try {\n\n List<FileItem> multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\n\n for (FileItem item : multiparts) {\n\n if (!item.isFormField()) {\n item.write(new File(UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\"));\n\n }\n \n String fileName = UPLOAD_DIRECTORY + File.separator + \"image\" + geekid + \".jpg\";\n\n }\n\n //File uploaded successfully\n request.setAttribute(\"message\", \"File Uploaded Successfully\");\n\n } catch (Exception ex) {\n\n request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\n\n }\n\n } else {\n\n request.setAttribute(\"message\",\n \"Sorry this Servlet only handles file upload request\");\n\n }\n\n request.getRequestDispatcher(\"/result.jsp\").forward(request, response);\n\n }", "protected void onPostExecute(UploadInfo result) {\n numPending--;\n if(result.success) {\n UploadDataSetSucceeded(result.mediaId);\n } else {\n //TODO: Make these error messages kid friendly\n //UploadDataSetFailed(result.errorMessage);\n if(result.errorMessage.equals(\"[\\\"Duplicate media object detected\\\"]\")) {\n UploadDataSetFailed(\"Image already exists on server\");\n } else {\n UploadDataSetFailed(result.errorMessage);\n }\n }\n }", "@RequestMapping(value=\"/upload\", method = RequestMethod.POST)\r\n public String processUploadFileForm(UploadFileForm uploadFileForm, BindingResult result, Locale locale, Model model, HttpServletRequest request) {\r\n\t\t\r\n // Redirect to the page with any errors\r\n if (result.hasErrors()) {\r\n \treturn manageTestFiles(locale, model, request.getSession());\r\n }\r\n MultipartFile[] uploadedFiles = uploadFileForm.getPath();\r\n logger.info(\"Loading \" + uploadedFiles.length + \" files...\");\r\n for (MultipartFile uploadedFile : uploadedFiles) {\r\n\t\t\tlogger.info(\" Loading data file: \" + uploadedFile.getOriginalFilename());\r\n\t \t\tfileService.uploadFile(uploadedFile, QRDA_URIResolver.REPOSITORY_TESTFILES, uploadFileForm.getSubDir(), uploadFileForm.getName());\r\n\r\n\t\t}\r\n\r\n \t\t//fileService.uploadFile(uploadFileForm.getPath(), QRDA_URIResolver.REPOSITORY_TESTFILES, uploadFileForm.getSubDir(), uploadFileForm.getName());\r\n\t\treturn \"redirect:/testFiles\";\r\n\t}", "@Override\n public void onSuccess(List<ResponseWrapper<MediaUploadResponse>> result) {\n log.debug(\"Uploading task group {}\", id);\n ProcessingParameters params = taskService.createProcessingParameters();\n if (workforceId != null)\n params.requireWorkforce(workforceId);\n ListenableFuture<ResponseWrapper<TaskUploadResponse>> response = taskService.uploadTasks(params, taskGroup);\n // wait for the upload to complete\n try {\n ResponseWrapper<TaskUploadResponse> r = response.get();\n if (r.success()) {\n log.debug(\"Task group {} uploaded\", id);\n } else {\n log.error(\"Failed uploading task group: {}\", r.getError());\n }\n } catch (InterruptedException e) {\n log.error(\"Failed uploading task group\", e);\n } catch (ExecutionException e) {\n log.error(\"Failed uploading task group\", e);\n }\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String codeLabWorker1 = \"\";\n if (!ServletFileUpload.isMultipartContent(request)) {\n\t\t PrintWriter writer = response.getWriter();\n\t\t writer.println(\"Error: enctype=multipart/form-data\");\n\t\t writer.flush();\n\t\t return;\n\t\t}\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(MEMORY_THRESHOLD);\n factory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\n \n ServletFileUpload upload = new ServletFileUpload(factory); \n upload.setFileSizeMax(MAX_FILE_SIZE);\n upload.setSizeMax(MAX_REQUEST_SIZE);\n String uploadPath = getServletContext().getRealPath(\"./\") + File.separator + UPLOAD_DIRECTORY;\n \n File uploadDir = new File(uploadPath);\n if (!uploadDir.exists()) {\n uploadDir.mkdir();\n }\n try {\n @SuppressWarnings(\"unchecked\")\n List<FileItem> formItems = upload.parseRequest(request);\n if (formItems != null && formItems.size() > 0) {\n File storeFile = null;\n String codeResult = \"\";\n String codeLabWorker = \"\"; \n String dateToday = getDateToday();\n String time = getTime();\n for (FileItem item : formItems) { \n if (!item.isFormField()) {\n String fileName = new File(item.getName()).getName();\n String filePath = uploadPath + File.separator + fileName;\n storeFile = new File(filePath);\n System.out.println(filePath);\n item.write(storeFile); \n }else{\n String fieldName = item.getFieldName();\n String fieldValue = item.getString();\n if (fieldName.equals(\"codeLabWorker\")) {\n codeLabWorker = fieldValue;\n codeLabWorker1=codeLabWorker;\n }else if (fieldName.equals(\"codeResult\")) {\n codeResult = fieldValue;\n }\n } \n }\n //Enviar a guardar\n LabWorkerDB labDB = new LabWorkerDB();\n labDB.updateResult(codeLabWorker, storeFile, dateToday, time, codeResult);\n JOptionPane.showMessageDialog(null,\"Se guardo con exito\");\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null,ex);\n } \n request.setAttribute(\"username\", codeLabWorker1);\n \n request.getRequestDispatcher(\"/labWorkerGUI/principallabWorker.jsp\").forward(request, response);\n }", "public void testUploadSubmission() throws Exception {\r\n FileDataSource dataSource = new FileDataSource(\"test_files/stress.jar\");\r\n DataHandler dataHandler = new DataHandler(dataSource);\r\n\r\n Date startTime = new Date();\r\n for (int i = 0; i < 10; ++i) {\r\n services.uploadSubmission(StressTestHelper.PROJECT_ID, StressTestHelper.USER_ID, \"submission.jar\", dataHandler);\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing uploadSubmission for 10 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n Upload upload = uploadManager.getCreatedUpload();\r\n\r\n assertEquals(\"Wrong type\", \"Submission\", upload.getUploadType().getName());\r\n assertEquals(\"Wrong status\", \"Active\", upload.getUploadStatus().getName());\r\n assertEquals(\"Wrong project id\", StressTestHelper.PROJECT_ID, upload.getProject());\r\n assertTrue(\"Wrong file name\", upload.getParameter().startsWith(\"submission\"));\r\n assertTrue(\"Wrong file name\", upload.getParameter().endsWith(\"jar\"));\r\n assertEquals(\"Wrong user id\", String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedUploadUserId());\r\n\r\n // check the submission\r\n Submission submission = uploadManager.getCreatedSubmission();\r\n assertEquals(\"Wrong type\", submission.getSubmissionType().getName(), \"Contest Submission\");\r\n assertEquals(\"Wrong status\", submission.getSubmissionStatus().getName(), \"Active\");\r\n assertEquals(\"Wrong user id\",\r\n String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedSubmissionUserId());\r\n\r\n File uploadedDir = new File(\"test_files/upload/\");\r\n File uploaded = uploadedDir.listFiles()[0];\r\n assertEquals(\"Failed to upload submission\", new File(\"test_files/stress.jar\").length(), uploaded.length());\r\n }", "@Test\r\n public void test_performLogic_Accuracy4() throws Exception {\r\n UploadedDocument doc = new UploadedDocument();\r\n doc.setDocumentId(500);\r\n doc.setContestId(1);\r\n doc.setFileName(\"test.txt\");\r\n doc.setPath(\"test_files\");\r\n doc.setMimeTypeId(new MimeTypeRetriever().getMimeTypeIdFromFileName(\"test_files/test.txt\"));\r\n List<UploadedDocument> docUploads = new ArrayList<UploadedDocument>();\r\n docUploads.add(doc);\r\n\r\n instance.performLogic(docUploads);\r\n }", "public UploadHandle upload(List<File> files) throws Exception {\n \tMetadata md = new Metadata();\n \tfinal FileCollection fcol = new FileCollection(md);\n \tfor(File f: files) {\n \t\tFileMetaData mf = new FileMetaData(f.getName(), f.getLocalName(), \"\", null);\n \t\tmf.setGroups(f.getGroups());\n \t\tmd.md.file.add(mf);\n \t}\n NullOutputStream ostream = new NullOutputStream();\n fcol.tarit(ostream);\n long length = ostream.getLength();\n\n HttpResponse response = client.get(new URI(config.preallocurl()));\n String prealloc_file = this.read_http_entity(response.getEntity());\n String ingestServer = prealloc_file.split(\"\\n\")[0];\n String location = prealloc_file.split(\"\\n\")[1];\n ingestServer = ingestServer.split(\": \")[1];\n location = location.split(\": \")[1];\n \n PipedInputStream in = new PipedInputStream();\n final PipedOutputStream out = new PipedOutputStream(in);\n new Thread(\n new Runnable(){\n @Override\n public void run(){\n try {\n fcol.tarit(out);\n } catch (Exception ex) {\n Logger.getLogger(Connect.class.getName()).log(Level.SEVERE, null, ex);\n \n }\n }\n }\n ).start();\n \n InputStreamEntity entity = new InputStreamEntity(in, length);\n response = client.put(entity, new URI(\"https://\"+ingestServer+location));\n this.read_http_entity(response.getEntity());\n\n response = client.get(new URI(\"https://\"+ingestServer+config.finishurl()+location));\n String status_url = this.read_http_entity(response.getEntity());\n for(String line:status_url.split(\"\\n\")) {\n System.out.println(line);\n if(line.startsWith(\"Status: \"))\n status_url = line.split(\": \")[1];\n }\n System.out.println(status_url+\"/xml\");\n StatusHandler sturl = new StatusHandler();\n sturl.status_url = status_url+\"/xml\";\n sturl.timeout = 30;\n sturl.step = 5;\n UploadHandle ret = sturl;\n return ret;\n }", "@Override\n public List<Result> storeResults(List<Result> results, String homeworkId) {\n\n // added all results and got the ids backs with the results\n List<Result> allResults = addAllResults(results);\n\n // Getting the assignmentCollection to update assignment\n MongoCollection<Assignment> assignmentMongoCollection = mongoDatabase.getCollection(\"assignment\", Assignment.class);\n\n\n // gets the assignment\n Assignment assignment1 = assignmentMongoCollection.find(eq(\"_id\", new ObjectId(homeworkId)), Assignment.class).first();\n\n\n List<String> allResultsIds = assignment1.getResultsId();\n for (Result result : allResults) {\n allResultsIds.add(result.getHexId());\n }\n assignment1.setResultsId(allResultsIds);\n // add all results to table\n MongoCollection<Document> collectionAssignment = mongoDatabase.getCollection(\"assignment\");\n Bson updateOperationDocument = new Document(\"$set\", assignment1);\n collectionAssignment.updateOne(eq(\"_id\", new ObjectId(homeworkId)), updateOperationDocument);\n\n return allResults;\n }", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "@Override\n public void run() {\n long[] saved = AppDatabase.getInstance().modelByName(name).insertAll((List) response);\n updateProgressDownload(1, name);\n }", "@Override\n public void onTaskSubmit() {\n TaskInput taskInput = new TaskInput();\n taskInput.setTaskId(mTaskId);\n taskInput.setRatings(ratings);\n\n Callback<TaskInputResponse> taskInputCallback = new Callback<TaskInputResponse>() {\n @Override\n public void success(TaskInputResponse taskInputResponse, Response response) {\n ((GameActivity)mCtx).hideProgress();\n ((GameActivity) mCtx).finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n ((GameActivity)mCtx).hideProgress();\n ((GameActivity) mCtx).finish();\n }\n };\n\n // The multipart content that will be sent to server when the task is submitted\n MultipartTypedOutput attachments = new MultipartTypedOutput();\n\n // Populate a TypedFile list with all the recordings made during the current task\n ArrayList<TypedFile> typedFiles = new ArrayList<>();\n for(TaskInputAnswer answer : answers) {\n ArrayList<String> fileNames = answer.getFileNames();\n for(String fileName : fileNames) {\n typedFiles.add(new TypedFile(\"multipart/form-data\", new File(fileName)));\n }\n }\n\n // Get rid of the absolute path and keep only the file name for the recorded files list that\n //will be stored in the json\n for(int i = 0; i < answers.size(); ++i) {\n ArrayList<String> newFileNames = new ArrayList<>();\n for(int j = 0; j < answers.get(i).getFileNames().size(); ++j) {\n File file = new File(answers.get(i).getFileNames().get(j));\n newFileNames.add(file.getName());\n }\n answers.get(i).setFileNames(newFileNames);\n }\n taskInput.setAnswers(answers);\n\n // Convert TaskInput into JSON using Gson library\n Gson gson = new Gson();\n String taskInputJson = gson.toJson(taskInput);\n TypedString inputs = new TypedString(taskInputJson);\n\n // Add the json to the multipart objects as text/plain using the key \"Inputs\"\n attachments.addPart(\"Inputs\", inputs);\n\n // Add each file to the multipart object using the key \"file\"\n for(TypedFile typedFile : typedFiles) {\n attachments.addPart(\"file\", typedFile);\n }\n\n ((GameActivity)mCtx).showProgress();\n // Execute the POST request\n ((GameApi) SpeechApp.getApiOfType(ApiTypes.GAME_API)).taskInput(attachments, taskInputCallback);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n\n }", "@Test\n public void bulkUploadTest() throws IOException {\n\n JsonArray result = searchService.matchAllQuery(getIndexes(), 10);\n assertEquals(6, result.size());\n }", "@Override\n\tpublic String execute() throws Exception {\n\t\tUser user = (User)session.getAttribute(\"user\");\n\t\tif(user != null) {\n\t\t\tif(!sd.checkData()) {\n\t\t\t\tthis.addFieldError(\"error\", \"请按要求填写数据!\");\n\t\t\t\treturn INPUT;\n\t\t\t} else {\n\t\t\t\tFile cover = img[0];\n\t\t\t\tFile photo1 = img[1];\n\t\t\t\tFile photo2 = img[2];\n\t\t\t\tFile photo3 = img[3];\n\t\t\t\t\n\t\t\t\tStartups startups = sd.toStartups();\n\t\t\t\t\n\t\t\t\tif(imgCanUse(cover, photo1, photo2, photo3)) {\n\t\t\t\t\t/**\n\t\t\t\t\t * 自定义上传的图像名\n\t\t\t\t\t */\n\t\t\t\t\tString imgCover = UUID.randomUUID().toString().replace(\"-\", \"\") + \".jpg\";\n\t\t\t\t\tString imgPhoto1 = UUID.randomUUID().toString().replace(\"-\", \"\") + \".jpg\";\n\t\t\t\t\tString imgPhoto2 = UUID.randomUUID().toString().replace(\"-\", \"\") + \".jpg\";\n\t\t\t\t\tString imgPhoto3 = UUID.randomUUID().toString().replace(\"-\", \"\") + \".jpg\";\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * 获取存入硬盘的具体地址\n\t\t\t\t\t */\n\t\t\t\t\tString coverUrl = DISK_COVER + imgCover;\n\t\t\t\t\tString photo1Url = DISK_PHOTO + imgPhoto1;\n\t\t\t\t\tString photo2Url = DISK_PHOTO + imgPhoto2;\n\t\t\t\t\tString photo3Url = DISK_PHOTO + imgPhoto3;\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * 根据全路径,将文件创建出来。\n\t\t\t\t\t */\n\t\t\t\t\tFile fileCover = new File(coverUrl);\n\t\t\t\t\tFile filePhoto1 = new File(photo1Url);\n\t\t\t\t\tFile filePhoto2 = new File(photo2Url);\n\t\t\t\t\tFile filePhoto3 = new File(photo3Url);\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * 标识,创建文件是否成功\n\t\t\t\t\t * 使用上传文件工具类\n\t\t\t\t\t */\n\t\t\t\t\tboolean create_cover = UploadFileUtil.justDoIt(cover, fileCover);\n\t\t\t\t\tboolean create_photo1 = UploadFileUtil.justDoIt(photo1, filePhoto1);\n\t\t\t\t\tboolean create_photo2 = UploadFileUtil.justDoIt(photo2, filePhoto2);\n\t\t\t\t\tboolean create_photo3 = UploadFileUtil.justDoIt(photo3, filePhoto3);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * 如果创建成功,则进行往数据库用户表中更新\n\t\t\t\t\t */\n\t\t\t\t\tif(create_cover && create_photo1 && create_photo2 && create_photo3) {\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\tString db_cover = DB_COVER + imgCover;\n\t\t\t\t\t\tString db_photo1 = DB_PHOTO + imgPhoto1;\n\t\t\t\t\t\tString db_photo2 = DB_PHOTO + imgPhoto2;\n\t\t\t\t\t\tString db_photo3 = DB_PHOTO + imgPhoto3;\n\t\t\t\t\t\t\n\t\t\t\t\t\tstartups.setStartupsCover(db_cover);\n\t\t\t\t\t\tstartups.setStartupsPhoto1(db_photo1);\n\t\t\t\t\t\tstartups.setStartupsPhoto2(db_photo2);\n\t\t\t\t\t\tstartups.setStartupsPhoto3(db_photo3);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * 将用户user对象传入\n\t\t\t\t\t\t */\n\t\t\t\t\t\tstartups.setStartupsLeader(user);\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\tIStartupsService ss = ServiceFactory.createStartupsService();\n\t\t\t\t\t\tif(ss.saveStartups(startups)) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tstartupsId = startups.getStartupsId();\n\t\t\t\t\t\t\treturn SUCCESS;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.addFieldError(\"error\", \"创建失败!请刷新重试\");\n\t\t\t\t\t\t\tremoveImg(fileCover, filePhoto1, filePhoto2, filePhoto3);\n\t\t\t\t\t\t\treturn INPUT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.addFieldError(\"error\", \"图片上传出错!请刷新重试\");\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\tremoveImg(fileCover, filePhoto1, filePhoto2, filePhoto3);\n\t\t\t\t\t\treturn INPUT;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tthis.addFieldError(\"error\", \"图片输入错误!请换张图片\");\n\t\t\t\t\treturn INPUT;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.addFieldError(\"error\", \"请登录后再进行创建!\");\n\t\t\treturn INPUT;\n\t\t}\n\t\t\t\n\t}", "@Override\n public List<Integer> invoke(final File baseDir, final VirtualChannel channel) throws IOException,\n InterruptedException {\n\n List<Integer> results = new ArrayList<Integer>();\n\n FileSet src = Util.createFileSet(baseDir, resultSet.getSpec());\n DirectoryScanner ds = src.getDirectoryScanner();\n ds.scan();\n if (ds.getIncludedFilesCount() == 0) {\n listener.getLogger().println(\"No exportable files found\");\n return results;\n }\n\n // Get target URL\n String targetUrl = klarosUrl;\n\n if (targetUrl != null) {\n String strURL = buildServletURL(targetUrl);\n\n // Get HTTP client\n HttpClient httpclient = new HttpClient();\n\n // Prepare HTTP PUT\n for (String f : ds.getIncludedFiles()) {\n final PutMethod put = new PutMethod(strURL);\n final StringBuilder query =\n new StringBuilder(\"config=\").append(expandVariables(config, environment,\n buildVariables));\n if (StringUtils.isNotBlank(iteration)) {\n query.append(\"&iteration=\").append(\n expandVariables(iteration, environment, buildVariables));\n }\n query.append(\"&env=\").append(expandVariables(env, environment, buildVariables)).append(\n \"&sut=\").append(expandVariables(sut, environment, buildVariables)).append(\"&type=\")\n .append(expandVariables(resultSet.getFormat(), environment, buildVariables));\n if (createTestSuite) {\n query.append(\"&createTestSuiteResults=true\");\n }\n\n query.append(\"&buildServerUrl=\").append(buildServerUrl);\n query.append(\"&buildJobId=\").append(buildJobId);\n query.append(\"&buildId=\").append(buildId);\n\n if (StringUtils.isNotBlank(username)) {\n query.append(\"&username=\").append(\n expandVariables(username, environment, buildVariables)).append(\"&password=\")\n .append(expandVariables(password.getPlainText(), environment, buildVariables));\n }\n put.setQueryString(query.toString());\n\n File file = new File(baseDir, f);\n int result;\n\n RequestEntity entity = new FileRequestEntity(file, \"text/xml; charset=ISO-8859-1\");\n put.setRequestEntity(entity);\n\n // Execute request\n try {\n result = httpclient.executeMethod(put);\n\n if (result != HttpServletResponse.SC_OK) {\n StringBuilder msg =\n new StringBuilder().append(\"Export of \").append(file.getName()).append(\n \" failed - Response status code: \").append(result).append(\n \" for request URL: \").append(strURL).append(\"?\").append(query);\n String response = put.getResponseBodyAsString();\n if (response != null && response.length() > 0) {\n msg.append(\"\\nReason: \").append(response);\n }\n listener.getLogger().println(msg.toString());\n } else {\n results.add(result);\n listener.getLogger().println(\n \"Test result file \" + file.getName() + \" has been successfully exported.\");\n }\n } catch (Exception e) {\n e.printStackTrace(listener.getLogger());\n } finally {\n // Release current connection to the connection pool once you are done\n put.releaseConnection();\n }\n }\n } else {\n listener.getLogger().println(klarosUrl + \": unable to locate this Klaros URL\");\n }\n return results;\n }", "public uploadFileForPath_result(uploadFileForPath_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n }", "@Override\r\n protected void executeAction() throws Exception {\r\n // get the submission of the project\r\n Submission[] submissions = getContestServiceFacade().getSoftwareProjectSubmissions(getCurrentUser(), projectId);\r\n // check whether the project contains the submission the user want to download\r\n for (Submission sub : submissions) {\r\n if (sub.getUpload() != null && sub.getId() == submissionId) {\r\n submission = sub;\r\n break;\r\n }\r\n }\r\n\r\n if (submission == null) {\r\n // the user can't download the upload which is not belongs to the project\r\n throw new Exception(\"Cannot find submission \" + submissionId + \" in project \" + projectId);\r\n }\r\n\r\n contest = getContestServiceFacade().getSoftwareContestByProjectId(getCurrentUser(), projectId);\r\n\r\n if (submission.getUpload().getUrl() == null) {\r\n if (DirectUtils.isStudio(contest)) {\r\n Long userId = null;\r\n String handle = null;\r\n for (Resource r : contest.getResources()) {\r\n if (r.getId() == submission.getUpload().getOwner()) {\r\n userId = r.getUserId();\r\n handle = r.getProperty(RESOURCE_PROPERTY_HANDLE);\r\n }\r\n }\r\n\r\n uploadedFile = studioFileUpload.getUploadedFile(DirectUtils.createStudioLocalFilePath(contest.getId(), userId, handle,\r\n submission.getUpload().getParameter()));\r\n } else {\r\n uploadedFile = fileUpload.getUploadedFile(submission.getUpload().getParameter());\r\n }\r\n } else {\r\n externalUrl = submission.getUpload().getUrl();\r\n }\r\n\r\n }", "public void run() {\n\t\t\t\t\tString resultString = upload(url, formParameters, datas);\n\t\t\t\t\tif (null != resultString) {\n\t\t\t\t\t\tMessage message = handler.obtainMessage(MessageWhat.UPLOADRESP, resultString);\n\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t}\n\t\t\t\t}", "@NonNull\n @Override\n public PutResults<T> executeAsBlocking() {\n final Map<T, PutResult> putResults = new HashMap<T, PutResult>();\n\n for (T object : objects) {\n final PutResult putResult = putResolver.performPut(storIOContentResolver, object);\n putResults.put(object, putResult);\n }\n\n return PutResults.newInstance(putResults);\n }", "public void postRequestUploadProgress(Request<?> request, long transferredBytesSize, long totalSize, int currentFileIndex, File currentFile);", "void uploadFinished(StreamingEndEvent event, File uploadedTemporaryFile);", "private static void Worker(Connection con, String d1, String d2) throws SQLException, IOException {\n var id = 0;\n var CREATE_USER_ID = 0;\n long CREATE_USER_DATE = 0;\n var url = \"\";\n\n Path path = Paths.get(userHome + \"/photos.txt\");\n var content = \"\";\n\n PreparedStatement ps = con.prepareStatement(\"select id, url, foto, CREATE_USER_ID, CREATE_USER_DATE from lksz.fotok where CREATE_USER_DATE>='\" + d1 + \"' and CREATE_USER_DATE<'\" + d2 + \"' order by id\");\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n id = rs.getInt(1);\n url = rs.getString(2);\n CREATE_USER_ID = rs.getInt(4);\n CREATE_USER_DATE = rs.getLong(5);\n\n try {\n Blob b = rs.getBlob(3); //2 means 2nd column data\n if (b != null) {\n byte barr[] = b.getBytes(1, (int) b.length()); //1 means first image\n\n FileOutputStream fout = new FileOutputStream(\"/export/exp/\" + url);\n fout.write(barr);\n\n fout.close();\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n System.out.println(ind + \": \" + \"/export/exp/\" + url);\n ind++;\n content = id + \"|\" + url + \"|\" + CREATE_USER_ID + \"|\" + CREATE_USER_DATE + \"\\n\";\n try {\n Files.write(path, content.getBytes(), StandardOpenOption.APPEND);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n rs.close();\n ps.close();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\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 }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == GALLERY_INTETN && resultCode==RESULT_OK) {\n dialog.setMessage(\"Uploading\");\n dialog.show();\n Uri uri= data.getData();\n\n StorageReference filepath= mStorage.child(\"volunteer_aadhar_pic\").child(uri.getLastPathSegment());\n try\n {\n compressed = MediaStore.Images.Media.getBitmap(ApplyAsVolunteer.this.getContentResolver(), uri);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressed.compress(Bitmap.CompressFormat.JPEG, 30, baos);\n byte[] cimg = baos.toByteArray();\n filepath.putBytes(cimg).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n path = taskSnapshot.getDownloadUrl();\n //accountref = FirebaseDatabase.getInstance().getReference().child(\"user_details\").child(auth.getUid());\n //accountref.child(\"userImgUrl\").setValue(String.valueOf(path));\n Toast.makeText(ApplyAsVolunteer.this, \"Document uploaded\", Toast.LENGTH_LONG).show();\n //finish();\n //startActivity(getIntent());\n afterText.setVisibility(View.VISIBLE);\n clicksubmit.setVisibility(View.GONE);\n dialog.dismiss();\n }\n });\n }\n }", "UploadInfo advancedUpload(AdvanceFile file);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n }", "public sendFile_result(sendFile_result other) {\n }", "private Result uploadFile(StoryModel storyModel) {\n if (isStopped())\n return Result.failure();\n\n\n String storyId = storyModel.get_id();\n if (storyModel.getType() != null && storyModel.getType().equals(\"image\")) {\n\n sendStartStatus(\"image\", storyModel.get_id());\n\n NotificationsManager.getInstance().showUpDownNotification(getApplicationContext(),\n storyModel.get_id(),\n storyModel.getUserId());\n if (uploadImageFile(storyModel.getFile())) {\n return Result.success();\n } else {\n if (compositeDisposable.isDisposed()) {\n sendErrorStatus(\"image\", storyId);\n }\n return Result.retry();\n }\n } else if (storyModel.getType() != null && storyModel.getType().equals(\"video\")) {\n\n sendStartStatus(\"video\", storyModel.get_id());\n\n NotificationsManager.getInstance().showUpDownNotification(getApplicationContext(),\n storyModel.get_id(),\n storyModel.getUserId());\n if (uploadVideoFile(storyModel.getFile())) {\n return Result.success();\n } else {\n if (compositeDisposable.isDisposed()) {\n sendErrorStatus(\"video\", storyId);\n }\n return Result.retry();\n }\n } else {\n return Result.failure();\n }\n }", "private DatabaseWriteResult(UploadStrategy strategy) {\n savedEntries = new ArrayList<>(1000);\n databaseSize = -1L;\n error = null;\n uploadStrategy = strategy;\n }", "@Override\n public void uploadMultipleFiles(ArrayList<File> files, Modpack modpack) {\n uploadStatus = \"Uploading file(s) to server!\";\n modpackUploadRepository.uploadMultipleFiles(files, modpack);\n }", "public saveAppUploadAttachment_result(saveAppUploadAttachment_result other) {\n if (other.isSetSuccess()) {\n this.success = new com.mkfree.apithrift.vo.AppUploadAttachmentVO(other.success);\n }\n }", "@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }", "private void sendResultQueue() {\n\t\tfor (PluginResult pluginResult : resultQueue) {\n\t\t\tmainCallback.sendPluginResult(pluginResult);\n\t\t}\n\t\tresultQueue.clear();\n\t}", "public static void addBatchResultsEncode(Args args, double finalTime, long coded_size, float factor){\n BufferedWriter output;\n //The header is:\n // tilesize threshold seekrange gop | codeTime codedSize compressionFactor | decodeTime qualityFactor\n try {\n output = new BufferedWriter(new FileWriter(\"encodeBatch.txt\", true));\n String result = args.tileSize + \" \" + args.thresh + \" \" + args.seekRange + \" \" + args.gop + \" | \" + finalTime + \" \" + coded_size + \" \" + factor;\n output.append(result);\n output.close();\n } catch (IOException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void publishImagesResults(ArrayList<String> output, int result) {\n Intent intent = new Intent(NOTIFICATIONG);\n intent.putExtra(IMAGES, output);\n intent.putExtra(RESULT, result);\n sendBroadcast(intent);\n\n stopSelf();\n }", "public listInputFilesForExperiment_result(listInputFilesForExperiment_result other) {\n if (other.isSetSuccess()) {\n List<String> __this__success = new ArrayList<String>(other.success);\n this.success = __this__success;\n }\n }", "public void cacheResult(\n\t\tjava.util.List<com.agbar.service.model.ImgImportadas> imgImportadases);", "@Test\r\n public void test_performLogic_Accuracy3() throws Exception {\r\n instance.performLogic(new ArrayList<UploadedDocument>());\r\n }", "private void writeResults() {\n File externalStorage = Environment.getExternalStorageDirectory();\n if (!externalStorage.canWrite()) {\n Log.v(TAG, \"sdcard is not writable\");\n return;\n }\n File resultFile = new File(externalStorage, RESULT_FILE);\n resultFile.setWritable(true, false);\n try {\n BufferedWriter rsWriter = new BufferedWriter(new FileWriter(resultFile));\n Log.v(TAG, \"Saved results in: \" + resultFile.getAbsolutePath());\n java.text.DecimalFormat df = new java.text.DecimalFormat(\"######.##\");\n\n for (int ct=0; ct < IPTestListJB.TestName.values().length; ct++) {\n IPTestListJB.TestName t = IPTestListJB.TestName.values()[ct];\n final float r = mResults[ct];\n float r2 = rebase(r, t);\n String s = new String(\"\" + t.toString() + \", \" + df.format(r) + \", \" + df.format(r2));\n rsWriter.write(s + \"\\n\");\n }\n rsWriter.close();\n } catch (IOException e) {\n Log.v(TAG, \"Unable to write result file \" + e.getMessage());\n }\n }", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public boolean UploadHugeDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);", "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 }", "public void run() {\n\t\t\t\t\tMessage msg;\n\t\t\t\t\tVector<File> files = new Vector<File>();\n\t\t\t\t\tfiles.add(new File(fileName));\n\t\t\t\t\tString result = upload(url, formParameters, files);\n\t\t\t\t\tif (StringUtils.isEmpty(result)) {\n\t\t\t\t\t\tmsg = handler.obtainMessage(Constant.UPLOAD_FAIL_CODE, Constant.UPLOAD_EXCEPTION);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.i(TAG, result);\n\t\t\t\t\t\tmsg = handler.obtainMessage(messageWhat, result);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\n\t\t\t\t}", "int postFiles(String [] args,int startIndexInArgs) throws IOException {\n int filesPosted = 0;\n for (int j = 1; j < args.length; j++) {\n File srcFile = new File(args[j]);\n final StringWriter sw = new StringWriter();\n \n if (srcFile.canRead()) {\n info(\"POSTing file \" + srcFile.getName());\n postFile(srcFile, sw);\n filesPosted++;\n warnIfNotExpectedResponse(sw.toString(),SOLR_OK_RESPONSE);\n } else {\n warn(\"Cannot read input file: \" + srcFile);\n }\n }\n return filesPosted;\n }", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "public void upload() {\r\n\t\t\tARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vboVertexId);\r\n\t\t\tFloatBuffer coordinates = shapePeer.shape.getVertexData().coordinates;\r\n\t\t\tint tempIdx=0;\r\n\t\t\tfor (int i=0; i<count; i++) {\r\n\t\t\t\ttempP3f.x = coordinates.get((minIndex+i)*3+0);\r\n\t\t\t\ttempP3f.y = coordinates.get((minIndex+i)*3+1);\r\n\t\t\t\ttempP3f.z = coordinates.get((minIndex+i)*3+2);\r\n\t\t\t\tshapePeer.shape.getModelMatrix().transform(tempP3f);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+0, tempP3f.x);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+1, tempP3f.y);\r\n\t\t\t\tuploadBuffer.put(tempIdx*3+2, tempP3f.z);\r\n\t\t\t\tif (tempIdx*3 >= uploadBuffer.capacity() || i==count-1) {\r\n\t\t\t\t\tint offset = (startIdx+i-tempIdx)*3;\r\n\t\t\t\t\tuploadBuffer.position(0).limit((tempIdx+1)*3);\r\n//\t\t\t\t\tSystem.out.println(\"upload \"+offset+\" \"+uploadBuffer.limit()+\" \"+startIdx);\r\n\t\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, uploadBuffer);\r\n\t\t\t\t\tuploadBuffer.position(0).limit(uploadBuffer.capacity());\r\n\t\t\t\t\ttempIdx=0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttempIdx++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// upload colors\r\n\t\t\tFloatBuffer colors = shapePeer.shape.getVertexData().colors;\r\n\t\t\tif (colors != null) {\r\n\t\t\t\tcolors.position(minIndex).limit(minIndex+count*3);\r\n\t\t\t\tint offset = (numElements*3)+(startIdx*3);\r\n\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, colors);\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// upload texture coordinates\r\n\t\t\tObjectArray<VertexData.TexCoordData> texCoords = shapePeer.shape.getVertexData().texCoords;\r\n\t\t\tif (texCoords != null) {\r\n\t\t\t\tfor (int unit=0; unit<texCoords.length(); unit++) {\r\n\t\t\t\t\tVertexData.TexCoordData texCoord = texCoords.get(unit);\r\n\t\t\t\t\tif (texCoord != null) {\r\n\t\t\t\t\t\tGL13.glClientActiveTexture(GL13.GL_TEXTURE0 + unit);\r\n\t\t\t\t\t\ttexCoord.data.position(minIndex*2).limit(minIndex*2+count*2);\r\n//\t\t\t\t\t\tint offset = (numElements*(6+unit*2))+(startIdx*2);\r\n\t\t\t\t\t\tint offset = (numElements*(6+unit*2))+startIdx+startIdx;\r\n\t\t\t\t\t\tARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offset*4, texCoord.data);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGL13.glClientActiveTexture(GL13.GL_TEXTURE0);\r\n\t\t\t\r\n\t\t\tARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 0);\r\n\r\n\t\t\tVertexData vertexData = shapePeer.shape.getVertexData();\r\n\t\t\tIntBuffer indices = vertexData.indices;\r\n\t\t\tindices.position(0).limit(indices.capacity());\r\n\t\t\tthis.indices = new int[indices.capacity()];\r\n\t\t\tindices.get(this.indices);\r\n\t\t\tfor (int i=0; i<this.indices.length; i++) {\r\n\t\t\t\tthis.indices[i] += startIdx-minIndex;\r\n\t\t\t}\r\n\t\t\tUtil.checkGLError();\r\n\t\t}", "@ApiIgnore\n @PostMapping(value = \"/upload\")\n public Object batchUpload(@RequestParam(\"files\") MultipartFile[] files) {\n\n ResultBody resultBody = new ResultBody();\n resultBody.setCode(\"0\");\n\n String uploadedFileName = Arrays.stream(files).map(MultipartFile::getOriginalFilename)\n .filter(x -> !StringUtils.isEmpty(x))\n .collect(Collectors.joining(\"|\"));\n if (StringUtils.isEmpty(uploadedFileName)) {\n resultBody.setMessage(\"上传文件为空!\");\n }\n try {\n saveUploadedFiles(Arrays.asList(files));\n resultBody.setMessage(\"调用成功!\");\n Map<String, Object> map = new HashMap<>();\n map.put(\"filename\", uploadedFileName);\n resultBody.setResult(map);\n\n } catch (IOException e) {\n e.printStackTrace();\n resultBody.setCode(\"500\");\n resultBody.setMessage(e.getMessage());\n }\n return resultBody;\n }", "@Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n }", "public void run() {\n uploadManager.put(f, expectKey, TestConfig.token_z0, new UpCompletionHandler() {\n public void complete(String k, ResponseInfo rinfo, JSONObject response) {\n Log.i(\"qiniutest\", k + rinfo);\n key = k;\n info = rinfo;\n resp = response;\n signal.countDown();\n }\n }, null);\n }", "@Override\n public boolean transferFile (MultipartFile file, String tag, String resultFilename) {\n try {\n file.transferTo(new File(Constans.UPLOADPATH + \"/\" + tag + \"/\" + resultFilename));\n }catch (IOException e){\n e.printStackTrace();\n return false;\n }\n return true;\n }", "entities.Torrent.UploadResponse getUploadResponse();", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n }", "public Result uploadImage() {\n MultipartFormData<File> body = request().body().asMultipartFormData();\n MultipartFormData.FilePart<File> fileInput = body.getFile(\"inputFile\");\n if (fileInput != null) {\n File file = (File) fileInput.getFile();\n String imageUrl = S3Action.putImg(s3, file, UUID.randomUUID().toString());\n return ok(afterPutImg.render(imageUrl));\n } else {\n return badRequest(\"error\");\n }\n }", "public PictureResult upload(byte[] fileBytes,String extName,String orignalName) throws Exception;", "public interface Storage {\n boolean StoreResultImages(String query, JsonNode results, int pageNum);\n\n}", "private List<Result> addAllResults(List<Result> result) {\n\n MongoCollection<Document> collection = mongoDatabase.getCollection(\"result\");\n List<Result> allResults = new LinkedList<>();\n for (Result res : result) {\n Document newResult = new Document();\n newResult.put(\"student1\", res.getStudent1());\n newResult.put(\"student2\", res.getStudent2());\n newResult.put(\"percentage\", res.getPercentage());\n newResult.put(\"snippets\", res.getSnippets());\n newResult.put(\"type\", res.getType().toString());\n collection.insertOne(newResult);\n\n\n ObjectId resultId = newResult.getObjectId(\"_id\");\n res.setObjectId(resultId);\n newResult.put(\"hexId\", resultId.toHexString());\n res.setHexId(resultId.toHexString());\n Bson updateOperationDocument = new Document(\"$set\", newResult);\n collection.updateOne(eq(\"_id\", new ObjectId(resultId.toHexString())), updateOperationDocument);\n\n allResults.add(res);\n }\n return allResults;\n }", "public void uploadLogCollection();", "public int uploadContent(HashMap<String, String> info);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "public boolean UploadDocuments (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);", "@Override\n public void run() {\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }", "@RequestMapping(value = \"/file\", method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\tpublic FileUploadStatusDTO upload(@RequestParam(name = \"file\")MultipartFile file) throws JsonProcessingException, IOException, InterruptedException, ExecutionException {\n\t\treturn fileUploadService.importProductsFromFileInParallelWithButch(file.getInputStream());\r\n\t}", "public void testUploadFinalFix() throws Exception {\r\n FileDataSource dataSource = new FileDataSource(\"test_files/stress.jar\");\r\n DataHandler dataHandler = new DataHandler(dataSource);\r\n\r\n Date startTime = new Date();\r\n for (int i = 0; i < 10; ++i) {\r\n services.uploadFinalFix(StressTestHelper.PROJECT_ID, StressTestHelper.USER_ID, \"finalfix.jar\", dataHandler);\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing uploadFinalFix for 10 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n // check the upload\r\n Upload upload = uploadManager.getCreatedUpload();\r\n assertEquals(\"Wrong type\", \"Final Fix\", upload.getUploadType().getName());\r\n assertEquals(\"Wrong status\", \"Active\", upload.getUploadStatus().getName());\r\n assertEquals(\"Wrong project id\", StressTestHelper.PROJECT_ID, upload.getProject());\r\n assertTrue(\"Wrong file name\", upload.getParameter().startsWith(\"submission\"));\r\n assertTrue(\"Wrong file name\", upload.getParameter().endsWith(\"jar\"));\r\n assertEquals(\"Wrong user id\", String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedUploadUserId());\r\n\r\n // verify screening\r\n assertEquals(\"Screening should not be initiate\", -1, screeningManager.getSubmissionId());\r\n\r\n // verify previous submissions\r\n Upload updatedUpload = uploadManager.getUpdatedUpload();\r\n assertEquals(\"Previous upload should be deleted\", updatedUpload.getUploadStatus().getName(), \"Deleted\");\r\n\r\n\r\n File uploadedDir = new File(\"test_files/upload/\");\r\n File uploaded = uploadedDir.listFiles()[0];\r\n assertEquals(\"Failed to upload submission\", new File(\"test_files/stress.jar\").length(), uploaded.length());\r\n }", "protected void uploadSottoPagine() {\n LinkedHashMap<String, LinkedHashMap<String, List<String>>> mappa;\n int numVoci = 0;\n\n for (String key : lista.getSottoPagine().keySet()) {\n mappa = lista.getSottoPagine().get(key);\n numVoci = lista.getMappaLista().getDimParagrafo(key);\n incipitSottopagina = elaboraIncipitSpecificoSottopagina(key);\n listaCorrelate = listaVociCorrelate();\n appContext.getBean(UploadSottoPagina.class, soggetto, key, mappa, typeDidascalia, numVoci, usaParagrafoSize, incipitSottopagina, usaNote, usaVociCorrelate, listaCorrelate);\n }// end of for cycle\n }", "@Override\r\n public void saveCombineResult(K key, V value) throws IOException, InterruptedException {\n }", "public List<FileUpload> getFileUploads(int numberOfFileUploads, Long startIndex) throws AppException;", "void ComputeResult(Object result);", "public List<PutObjectResult> upload(MultipartFile[] multipartFiles) {\n List<PutObjectResult> putObjectResults = new ArrayList<>();\n\n Arrays.stream(multipartFiles)\n .filter(multipartFile -> !StringUtils.isEmpty(multipartFile.getOriginalFilename()))\n .forEach(multipartFile -> {\n try {\n putObjectResults.add(upload(multipartFile, multipartFile.getOriginalFilename()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n return putObjectResults;\n }", "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "@Override\n protected String doInBackground(Bitmap... params) {\n Bitmap bitmap = params[0];\n RequestBody req = new MultipartBody.Builder().setType(MultipartBody.FORM)\n .addFormDataPart(\"encoded_image\", \"\", RequestBody.create(MEDIA_TYPE_PNG, tobyteArray(bitmap))).build();\n\n Log.d(\"postFlow_request_body\", req.toString());\n\n Request request = new Request.Builder()\n .url(\"https://www.google.com/searchbyimage/upload\")\n .post(req)\n .build();\n Log.d(\"postFlow_request\", request.toString());\n try (Response response = client.newCall(request).execute()) {\n //if (!response.isSuccessful()) throw new IOException(\"Unexpected code \" + response);\n\n Log.d(\"postFlow_client\", request.toString());\n\n Headers responseHeaders = response.headers();\n\n for (int i = 0; i < responseHeaders.size(); i++) {\n Log.d(\"postFlow_loop\", i + responseHeaders.name(i) + \": \" + responseHeaders.value(i));\n if (responseHeaders.name(i).toString().equals(\"location\"))\n return responseHeaders.value(i);\n }\n\n Log.d(\"postFlow_response\", response.toString());\n\n return response.body().string();\n } catch (IOException e) {\n e.printStackTrace();\n Log.d(\"postFlow_catch\", e.toString());\n }\n Log.d(\"postFlow_task_over\", request.toString());\n\n return \"\";\n }", "public void testUploadTestCases() throws Exception {\r\n FileDataSource dataSource = new FileDataSource(\"test_files/stress.jar\");\r\n DataHandler dataHandler = new DataHandler(dataSource);\r\n\r\n Date startTime = new Date();\r\n for (int i = 0; i < 10; ++i) {\r\n services.uploadTestCases(StressTestHelper.PROJECT_ID, StressTestHelper.USER_ID,\r\n \"testcases.jar\", dataHandler);\r\n }\r\n\r\n Date endTime = new Date();\r\n\r\n System.out.println(\"Executing uploadTestCases for 10 times takes \"\r\n + (endTime.getTime() - startTime.getTime()) + \" milliseconds\");\r\n\r\n // check the result\r\n Upload upload = uploadManager.getCreatedUpload();\r\n\r\n assertEquals(\"Wrong type\", \"Test Case\", upload.getUploadType().getName());\r\n assertEquals(\"Wrong status\", \"Active\", upload.getUploadStatus().getName());\r\n assertEquals(\"Wrong project id\", StressTestHelper.PROJECT_ID, upload.getProject());\r\n assertTrue(\"Wrong file name\", upload.getParameter().startsWith(\"submission\"));\r\n assertTrue(\"Wrong file name\", upload.getParameter().endsWith(\"jar\"));\r\n assertEquals(\"Wrong user id\", String.valueOf(StressTestHelper.USER_ID), uploadManager.getCreatedUploadUserId());\r\n\r\n File uploadedDir = new File(\"test_files/upload/\");\r\n File uploaded = uploadedDir.listFiles()[0];\r\n assertEquals(\"Failed to upload submission\", new File(\"test_files/stress.jar\").length(), uploaded.length());\r\n }" ]
[ "0.60229737", "0.6005011", "0.58877224", "0.5664807", "0.56218815", "0.5591309", "0.5578519", "0.5535681", "0.5504114", "0.5499934", "0.54992527", "0.5488014", "0.54563946", "0.5445144", "0.54276145", "0.54077375", "0.53864145", "0.5355643", "0.5349224", "0.534381", "0.5343667", "0.5341363", "0.5331726", "0.531967", "0.5291465", "0.52889764", "0.528147", "0.5274445", "0.5259281", "0.5256154", "0.52530813", "0.52291703", "0.52238077", "0.52077436", "0.5201766", "0.5196795", "0.51942545", "0.5161632", "0.51539844", "0.51426", "0.5138593", "0.51325345", "0.5130222", "0.5114954", "0.5095019", "0.5087284", "0.5083242", "0.50824857", "0.5080685", "0.5070952", "0.50656825", "0.5064463", "0.50600636", "0.50561035", "0.50555587", "0.5053982", "0.5046446", "0.50250894", "0.5019748", "0.5007374", "0.5005377", "0.5001423", "0.49989092", "0.4997951", "0.49939048", "0.49870807", "0.4981177", "0.49784693", "0.49745053", "0.49716368", "0.49710664", "0.49692637", "0.4962596", "0.496228", "0.495949", "0.4955458", "0.4953361", "0.4953361", "0.4953361", "0.4953361", "0.4953361", "0.49513823", "0.49504092", "0.49454966", "0.4939676", "0.49305463", "0.49289036", "0.49282458", "0.49262708", "0.49215898", "0.49201804", "0.4909691", "0.49086025", "0.49078944", "0.4897769", "0.48957998", "0.48918954", "0.48867154", "0.48866326", "0.48801467" ]
0.5110822
44
Converts the given pipeline to a simple string representation
public static String getSolutionString(MLPipeline classifier) { if (classifier == null) { return "error"; } Classifier baseClassifier = classifier.getBaseClassifier(); String[] classifierOptionsArray; String classifierOptionsString = ""; String classifierString = baseClassifier.getClass().getName(); if (baseClassifier instanceof OptionHandler) { classifierOptionsArray = ((OptionHandler) baseClassifier).getOptions(); classifierOptionsString = classifierOptionsArray.length > 0 ? Arrays.stream(classifierOptionsArray).collect(Collectors.joining(", ", "[", "]")) : ""; } SupervisedFilterSelector preprocessor = !classifier.getPreprocessors().isEmpty() ? classifier.getPreprocessors().get(0) : null; String preprocessorString = preprocessor != null ? preprocessor.getClass().getName() : ""; String[] preprocessorOptionsArray; String preprocessorOptionsString = ""; if (preprocessor instanceof OptionHandler) { preprocessorOptionsArray = !preprocessorString.equals("") ? ((OptionHandler) preprocessor).getOptions() : new String[0]; preprocessorOptionsString = preprocessorOptionsArray.length > 0 ? Arrays.stream(preprocessorOptionsArray).collect(Collectors.joining(",", "[", "]")) : ""; } return classifierString + " " + classifierOptionsString + " " + preprocessorString + " " + preprocessorOptionsString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStrPipelineURl() {\n return strPipelineURl;\n }", "public String getStrPipelineName() {\n return strPipelineName;\n }", "public static String execute(String pipeline, String text, boolean debugMode) {\n\n\t\tif (debugMode) System.out.println(\"Pipeline: \" + pipeline);\n\n\t\t//first handle the special characters which cause troubles\n\t\ttext = text.replaceAll(\"\\r\\n\",\"\\r\\n \");\n\t\t//text = text.replaceAll(\"\\\\p{Punct} \",\" $0\");\n\t\t//remove all no ascii characters\n\t\ttext = text.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\");\n\t\ttext = StringEscapeUtils.unescapeXml(text);\n\t\ttext = StringEscapeUtils.escapeXml(text);\n\n\n\t\tif (pipeline.equals(\"MRC+POS+NER\")){\n\t\t\treturn pipelineMRC_POS_NER(text, debugMode);\n\t\t}\n\t\telse if (pipeline.equals(\"MRC\")){\n\t\t\treturn pipelineMRC(text, debugMode, false);\n\t\t}\n\t\telse if (pipeline.equals(\"MRC_OCT\")){\n\t\t\treturn pipelineMRC(text, debugMode, true);\n\t\t}\n\t\telse if (pipeline.equals(\"POS+NER\")){\n\t\t\treturn pipelinePOS_NER(text, debugMode);\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public void setPipeline(Pipeline pipeline){\n this.pipeline = pipeline;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getPipelineArn() != null)\n sb.append(\"PipelineArn: \").append(getPipelineArn()).append(\",\");\n if (getPipelineExecutionArn() != null)\n sb.append(\"PipelineExecutionArn: \").append(getPipelineExecutionArn()).append(\",\");\n if (getPipelineExecutionDisplayName() != null)\n sb.append(\"PipelineExecutionDisplayName: \").append(getPipelineExecutionDisplayName()).append(\",\");\n if (getPipelineExecutionStatus() != null)\n sb.append(\"PipelineExecutionStatus: \").append(getPipelineExecutionStatus()).append(\",\");\n if (getPipelineExecutionDescription() != null)\n sb.append(\"PipelineExecutionDescription: \").append(getPipelineExecutionDescription()).append(\",\");\n if (getPipelineExperimentConfig() != null)\n sb.append(\"PipelineExperimentConfig: \").append(getPipelineExperimentConfig()).append(\",\");\n if (getFailureReason() != null)\n sb.append(\"FailureReason: \").append(getFailureReason()).append(\",\");\n if (getCreationTime() != null)\n sb.append(\"CreationTime: \").append(getCreationTime()).append(\",\");\n if (getLastModifiedTime() != null)\n sb.append(\"LastModifiedTime: \").append(getLastModifiedTime()).append(\",\");\n if (getCreatedBy() != null)\n sb.append(\"CreatedBy: \").append(getCreatedBy()).append(\",\");\n if (getLastModifiedBy() != null)\n sb.append(\"LastModifiedBy: \").append(getLastModifiedBy()).append(\",\");\n if (getParallelismConfiguration() != null)\n sb.append(\"ParallelismConfiguration: \").append(getParallelismConfiguration()).append(\",\");\n if (getSelectiveExecutionConfig() != null)\n sb.append(\"SelectiveExecutionConfig: \").append(getSelectiveExecutionConfig());\n sb.append(\"}\");\n return sb.toString();\n }", "String getPipelineId();", "public Pipeline getPipeline(){\n return pipeline;\n }", "public double getPipeline() {\n return get(\"getpipe\");\n }", "private String pipeCaller(String... args) {\r\n\t\tByteArrayOutputStream stdout = new ByteArrayOutputStream();\r\n\t\tString result = \"\";\r\n\t\tString joinedStr = String.join(\" \", args);\r\n\t\tPipeCommand pipeCmd = new PipeCommand(joinedStr);\r\n\t\ttry {\r\n\t\t\tpipeCmd.parse();\r\n\t\t\tpipeCmd.evaluate(null, stdout);\r\n\t\t\tresult = stdout.toString(\"UTF-8\");\r\n\t\t} catch (AbstractApplicationException | ShellException | UnsupportedEncodingException e) {\r\n\t\t\tresult = e.getMessage();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String getPipelineExecutionDescription() {\n return this.pipelineExecutionDescription;\n }", "private Pipeline getPipelineObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_PIPELINE, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor();\n return (Pipeline)populatorConstructor.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the pipeline. Class \" + populatorClassname + \" not found\", e);\n } \n }", "public void doPipeline(IPipeline pipeline) {\n if (pipeline != null && pipeline.getTaskList() != null && pipeline.getPipeItem() != null) {\n process(pipeline);\n } else {\n PipeLog.w(TAG, \"pipeline or tastList or pipeItem is null.\");\n }\n }", "public String toString() { return lambda0 + \" \" + r + \" \" + s; }", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "public static <T> String toString(T[] collection) {\n return toString(Arrays.asList(collection));\n }", "public MutablePipeline() {\r\n\t\tstages = new ArrayList<>();\r\n\r\n\t\tname = \"Unnamed Pipeline\";\r\n\t}", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "public static <T> String toString(Iterable<T> collection) {\n return toString(collection.iterator());\n }", "public double getPipeline(){\n NetworkTableEntry pipeline = m_table.getEntry(\"pipeline\");\n double pipe = pipeline.getDouble(0.0);\n return pipe;\n }", "@Override\r\n public String toString() {\n String processString = \"\";\r\n if (isEmpty()) {\r\n return \" \";\r\n }\r\n\r\n for (int i = 0; i < data.length; i++) {\r\n if (data[i] == null) {\r\n return processString;\r\n }\r\n processString += data[i].toString() + \" \";\r\n\r\n }\r\n return processString;\r\n\r\n }", "public final String toString(String codeset) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tBufferedOutputStream bos = new BufferedOutputStream(baos);\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(bos);\n\t\t\tbos.flush();\n\t\t\tout = baos.toString(codeset);\n\t\t\tbos.close();\n\t\t\tbaos.close();\n\t\t} catch (UnsupportedEncodingException use) {} catch (IOException ioe) {}\n\t\treturn (out);\n\t}", "public double getCurrentPipeline() {\n return getDouble(\"getpipe\");\n }", "public static String getPipelinePorts() {\r\n LOGGER.info(\"The configured pipeline ports: \" + pipelinePorts.getValue()); \r\n return pipelinePorts.getValue();\r\n }", "public static String toString(final Collection<?> objs) {\r\n\t\treturn objs != null ? toString(objs.toArray()) : toString(new Object[]{});\r\n\t}", "@Override\n final public String getTransform() {\n String transform = ScijavaGsonHelper.getGson(context).toJson(rt, RealTransform.class);\n //logger.debug(\"Serialization result = \"+transform);\n return transform;\n }", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "public String getPipelineExecutionStatus() {\n return this.pipelineExecutionStatus;\n }", "private String toString(Object value) {\n if (value == null) return \"null\";\n // TODO: handle arrays in a nicer way.\n return value.toString();\n }", "public static String toString(FeatureNode head)\n\t{\n\t\tif (head == null) return \"\";\n\t\tFeatureNode fn = head.get(\"phr-head\");\n\t\tif (fn == null)\n\t\t{\n\t\t\tfn = head.get(\"phr-type\");\n\t\t\tif (fn != null) return fn.getValue();\n\t\t\tfn = head.get(\"phr-word\");\n\t\t\tif (fn != null)\n\t\t\t{\n\t\t\t\tfn = fn.get(\"orig_str\");\n\t\t\t\tif (fn != null) return fn.getValue();\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}\n\t\tString str = \"\";\n\t\treturn _toString(fn, str);\n\t}", "public String toSL() {\n String results = new String(\"\");\n String attribute;\n ValueFunction value;\n for(Enumeration enum = this.keys(); enum.hasMoreElements(); ) {\n attribute = (String) enum.nextElement();\n value = (ValueFunction) this.get(attribute);\n\n results += \":\" + attribute + \" \" + value + \" \";\n }\n return results.trim() ;\n }", "@SuppressWarnings(\"rawtypes\")\n\tprotected static String asString(Object o){\n\t\tif(o == null)\n\t\t\treturn \"null\";\n\t\tif(o instanceof Integer)\n\t\t\treturn ((Integer)o).toString() + \" [Java]\";\n\t\tif(o instanceof String)\n\t\t\treturn ((String)o) + \" [Java]\";\n\t\tif(o instanceof IValue)\n\t\t\treturn ((IValue) o).toString() +\" [IValue]\";\n\t\tif(o instanceof Type)\n\t\t\treturn ((Type) o).toString() + \" [Type]\";\n\t\tif(o instanceof Object[]){\n\t\t\tStringBuilder w = new StringBuilder();\n\t\t\tObject[] lst = (Object[]) o;\n\t\t\tw.append(\"[\");\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(asString(lst[i]));\n\t\t\t\tif(i < lst.length - 1)\n\t\t\t\t\t\tw.append(\", \");\n\t\t\t}\n\t\t\tw.append(\"]\");\n\t\t\treturn w.toString() + \" [Object[]]\";\n\t\t}\n\t\tif(o instanceof Coroutine){\n\t\t\tif(((Coroutine)o).frame != null && ((Coroutine)o).frame.function != null){\n\t\t\t\treturn \"Coroutine[\" + ((Coroutine)o).frame.function.getName() + \"]\";\n\t\t\t} else {\n\t\t\t\treturn \"Coroutine[**no name**]\";\n\t\t\t}\n\t\t}\n\t\tif(o instanceof Function){\n\t\t\treturn \"Function[\" + ((Function)o).getName() + \"]\";\n\t\t}\n\t\tif(o instanceof FunctionInstance){\n\t\t\treturn \"Function[\" + ((FunctionInstance)o).function.getName() + \"]\";\n\t\t}\n\t\tif(o instanceof OverloadedFunctionInstance) {\n\t\t\treturn ((OverloadedFunctionInstance) o).toString();\n\t\t}\n\t\tif(o instanceof Reference){\n\t\t\tReference ref = (Reference) o;\n\t\t\treturn ref.toString(); //\"Reference[\" + ref.stack + \", \" + ref.pos + \"]\";\n\t\t}\n\t\tif(o instanceof IListWriter){\n\t\t\treturn \"ListWriter[\" + ((IListWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof ISetWriter){\n\t\t\treturn \"SetWriter[\" + ((ISetWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof IMapWriter){\n\t\t\treturn \"MapWriter[\" + ((IMapWriter) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Matcher){\n\t\t\treturn \"Matcher[\" + ((Matcher) o).pattern() + \"]\";\n\t\t}\n\t\tif(o instanceof Thrown) {\n\t\t\treturn \"THROWN[ \" + asString(((Thrown) o).getValue()) + \" ]\";\n\t\t}\n\t\t\n\t\tif(o instanceof StringBuilder){\n\t\t\treturn \"StringBuilder[\" + ((StringBuilder) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof HashSet){\n\t\t\treturn \"HashSet[\" + ((HashSet<?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Map){\n\t\t\treturn \"Map[\" + ((Map<?, ?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof HashMap){\n\t\t\treturn \"HashMap[\" + ((HashMap<?, ?>) o).toString() + \"]\";\n\t\t}\n\t\tif(o instanceof Map.Entry){\n\t\t\treturn \"Map.Entry[\" + ((Map.Entry) o).toString() + \"]\";\n\t\t}\n\t\t\n\t\treturn o.getClass().getName();\n\t\n\t\t//throw new CompilerError(\"asString cannot convert: \" + o);\n\t}", "public String getStrPipelineExeURL() {\n return strPipelineExeURL;\n }", "String toStr(Object o);", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getPercentTraffic() != null)\n sb.append(\"PercentTraffic: \").append(getPercentTraffic()).append(\",\");\n if (getStageVariableOverrides() != null)\n sb.append(\"StageVariableOverrides: \").append(getStageVariableOverrides()).append(\",\");\n if (getUseStageCache() != null)\n sb.append(\"UseStageCache: \").append(getUseStageCache());\n sb.append(\"}\");\n return sb.toString();\n }", "private static String getString(Object obj) {\n\t\tif (obj.getClass().isArray()) {\n\t\t\treturn array(obj);\n\t\t} else if (obj instanceof Map) {\n\t\t\treturn map(obj);\n\t\t} else if (obj instanceof Collection) {\n\t\t\treturn collection(obj);\n\t\t} else {\n\t\t\t// return obj.toString();\n\t\t\treturn obj(obj);\n\t\t}\n\t}", "public void setStrPipelineURl(final String strPipelineURl) {\n this.strPipelineURl = strPipelineURl;\n }", "public String getPipelineExecutionDisplayName() {\n return this.pipelineExecutionDisplayName;\n }", "private void process(IPipeline pipeline) {\n if (pipeline != null) {\n pipelineExecutor.submit(new DoPipelineThread(mHandler, pipeline));\n } else {\n PipeLog.w(TAG, \"pipeline is null\");\n }\n }", "public String getFilterString() {\n if (filterManager == null) return \"\";\n \n // Get list of all filters.\n List<Filter<E>> filterList = filterManager.getFiltersInUse();\n \n // Create dump of all filters.\n StringBuilder buf = new StringBuilder();\n for (Filter<E> filter : filterList) {\n if (buf.length() > 0) buf.append(\", \"); \n buf.append(filter.toString());\n }\n \n return buf.toString();\n }", "public String getOutput() {\n TopologicalOrderIterator<String, DefaultEdge> iterator =\n new TopologicalOrderIterator<>(steps, Comparator.comparing((String x) -> x));\n\n // Traverse the DAG and store each vertex to a StringBuilder\n // to output once traversal is completed\n StringBuilder sb = new StringBuilder();\n while (iterator.hasNext()) {\n sb.append(iterator.next());\n }\n\n return sb.toString();\n }", "public String getStrPipelinePropFile() {\n return strPipelinePropFile;\n }", "public String getRS2String() {\n\t\treturn IoBufferUtils.getRS2String(payload);\n\t}", "java.lang.String getOutput();", "public synchronized String toString() {\n StringBuffer oBuffer = new StringBuffer();\n\n oBuffer\n .append(\"Preprocessing params: \").append(this.oPreprocessingParams).append(\"\\n\")\n .append(\"Feature extraction params: \").append(this.oFeatureExtractionParams).append(\"\\n\")\n .append(\"Classification params: \").append(this.oClassificationParams);\n\n return oBuffer.toString();\n }", "private String streamToString(InputStream is) throws IOException {\n String str = \"\";\n \n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n \n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is));\n \n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n \n reader.close();\n } finally {\n is.close();\n }\n \n str = sb.toString();\n }\n \n return str;\n }", "public String toString()\n\t{\n\t\tString s = \"\";\n\t\tfor(int i = 0; i < numberOfPoles; i++)\n\t\t\ts += \"[\"+i+\"] \"+poles[i]+\"\\n\";\n\t\treturn s;\n\t}", "@Test\n public void testToString_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n\n String result = fixture.toString();\n\n assertEquals(\"LogicStep : \", result);\n }", "public String visualize(byte[] input) {\n if (input == null) {\n return \"NULL\";\n }\n\n // This method could be overridden if needed, but currently all visualization\n // techniques can work on a single byte.\n StringBuilder builder = new StringBuilder();\n for (byte b : input) {\n builder.append(visualize(b));\n }\n return builder.toString();\n }", "public void setStrPipelineName(final String strPipelineName) {\n this.strPipelineName = strPipelineName;\n }", "public String toString()\n/* */ {\n/* 885 */ StringBuilder result = new StringBuilder();\n/* 886 */ for (int i = 0; i < this.ruleSets.length; i++) {\n/* 887 */ result.append(this.ruleSets[i].toString());\n/* */ }\n/* 889 */ return result.toString();\n/* */ }", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "protected abstract String getPreprocessingModel(PipelineData data);", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();" ]
[ "0.5821866", "0.57959557", "0.56911665", "0.5681874", "0.5568266", "0.5521013", "0.5422828", "0.5371328", "0.51798236", "0.50646454", "0.5064364", "0.5028921", "0.50128114", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.49984384", "0.49835238", "0.4949331", "0.493347", "0.4928215", "0.48959947", "0.48649296", "0.48496068", "0.48296082", "0.48260516", "0.48219338", "0.48195434", "0.48189637", "0.48075497", "0.4784963", "0.4763374", "0.47602797", "0.47577593", "0.47573394", "0.4756501", "0.4755924", "0.47533718", "0.47309804", "0.47261336", "0.47158816", "0.4702473", "0.46862274", "0.46808335", "0.46711302", "0.46624318", "0.46531832", "0.46484774", "0.46478775", "0.4639426", "0.46380547", "0.46378466", "0.4634168", "0.46180633", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026", "0.46170026" ]
0.5208052
8
/ JADX WARNING: Illegal instructions before constructor call / Code decompiled incorrectly, please refer to instructions dump.
private FieldSumMap(com.shopee.protocol.ads.action.FieldSumMap.Builder r17) { /* r16 = this; r0 = r17 java.lang.Long r2 = r0.impression java.lang.Long r3 = r0.click java.lang.Long r4 = r0.order java.lang.Long r5 = r0.order_amount java.lang.Long r6 = r0.order_gmv java.lang.Long r7 = r0.cost java.lang.Long r8 = r0.shop_item_impression java.lang.Long r9 = r0.shop_item_click java.lang.Long r10 = r0.broad_shop_item_imp java.lang.Long r11 = r0.broad_shop_item_click java.lang.Long r12 = r0.broad_order java.lang.Long r13 = r0.broad_item_count java.lang.Long r14 = r0.broad_gmv java.lang.Long r15 = r0.location_in_ads r1 = r16 r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15) r16.setBuilder(r17) return */ throw new UnsupportedOperationException("Method not decompiled: com.shopee.protocol.ads.action.FieldSumMap.<init>(com.shopee.protocol.ads.action.FieldSumMap$Builder):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "public C23317d() {\n }", "private void __sep__Constructors__() {}", "AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.<init>():void\");\n }", "AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }", "public native void constructor();", "private JadTool() { }", "CollationDataBuilder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.icu.impl.coll.CollationDataBuilder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.<init>():void\");\n }", "public Constructor(){\n\t\t\n\t}", "public WorldPhoneOp01() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.<init>():void\");\n }", "Constructor() {\r\n\t\t \r\n\t }", "public ecDSAnone() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void\");\n }", "public As21Id27()\n\t{\n\t\tsuper() ;\n\t}", "Reproducible newInstance();", "protected Signer() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>():void\");\n }", "protected DiagClassVisitor() {\n super(ASM5);\n }", "public dxm(boolean r3) {\n /*\n r2 = this;\n r2.<init>()\n esb r0 = defpackage.esb.a.a\n java.lang.Class<cuh> r1 = defpackage.cuh.class\n esc r0 = r0.a(r1)\n cuh r0 = (defpackage.cuh) r0\n r1 = 0\n if (r0 == 0) goto L_0x001b\n cug r0 = r0.c()\n boolean r0 = r0.c()\n goto L_0x001c\n L_0x001b:\n r0 = 0\n L_0x001c:\n if (r0 == 0) goto L_0x0021\n if (r3 != 0) goto L_0x0021\n r1 = 1\n L_0x0021:\n r3 = 8\n if (r1 == 0) goto L_0x003b\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r1 = java.lang.Integer.valueOf(r3)\n boolean r0 = r0.contains(r1)\n if (r0 != 0) goto L_0x0056\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n r0.add(r3)\n return\n L_0x003b:\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r1 = java.lang.Integer.valueOf(r3)\n boolean r0 = r0.contains(r1)\n if (r0 == 0) goto L_0x0056\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n int r3 = r0.indexOf(r3)\n java.util.ArrayList<java.lang.Integer> r0 = a\n r0.remove(r3)\n L_0x0056:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxm.<init>(boolean):void\");\n }", "public ecDSA512() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void\");\n }", "public Attributes2Impl() {\n /*\n // Can't load method instructions: Load method exception: null in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.<init>():void\");\n }", "public Pitonyak_09_02() {\r\n }", "private Rekenhulp()\n\t{\n\t}", "private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}", "GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }", "private BigB()\r\n{\tsuper();\t\r\n}", "private CodeRef() {\n }", "private ElementDebugger() {\r\n\t\t/* PROTECTED REGION ID(java.constructor._17_0_5_12d203c6_1363681638138_829588_2092) ENABLED START */\r\n\t\t// :)\r\n\t\t/* PROTECTED REGION END */\r\n\t}", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "public Clade() {}", "public Code() {\n\t}", "protected abstract void construct();", "private FlexOrderTransformer() {\n // constructor preventing instantiation.\n }", "private StdDSAEncoder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void\");\n }", "public ecDSA() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void\");\n }", "public S11()\r\n {\r\n super();\r\n strapAllowed = false;\r\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "private CZ()\n {\n }", "private Instantiation(){}", "public static void copyConstructor(){\n\t}", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "public Hacker() {\r\n \r\n }", "JsrInstruction() {}", "public void testConstructor() throws Exception {\n\t\tStringWriter source = new StringWriter();\n\t\tthis.compiler.writeConstructor(source, \"Simple\", this.compiler.createField(String.class, \"field\"),\n\t\t\t\tthis.compiler.createField(int.class, \"value\"), this.compiler.createField(boolean[].class, \"flags\"));\n\t\tStringWriter expected = new StringWriter();\n\t\texpected.append(\" private java.lang.String field;\\n\");\n\t\texpected.append(\" private int value;\\n\");\n\t\texpected.append(\" private boolean[] flags;\\n\");\n\t\texpected.append(\" public Simple(java.lang.String field, int value, boolean[] flags) {\\n\");\n\t\texpected.append(\" this.field = field;\\n\");\n\t\texpected.append(\" this.value = value;\\n\");\n\t\texpected.append(\" this.flags = flags;\\n\");\n\t\texpected.append(\" }\\n\");\n\t\tassertEquals(\"Incorrect constructor\", expected.toString(), source.toString());\n\t}", "public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }", "public ecDSA256() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA256.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA256.<init>():void\");\n }", "protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public FactoryImpl() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void\");\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "defaultConstructor(){}", "public SourceCode() {\n }", "public MonHoc() {\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "public Signer(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>(java.lang.String):void\");\n }", "private SourcecodePackage() {}", "private ByteTools(){}", "public HCERTCHAINENGINE(Pointer p) {\n/* 1085 */ super(p);\n/* */ }", "public Callback() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.hardware.radio.RadioTuner.Callback.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.radio.RadioTuner.Callback.<init>():void\");\n }", "private TMCourse() {\n\t}", "public p7p2() {\n }", "private Ex() {\n }", "public _355() {\n\n }", "public ecDSA384() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void\");\n }", "public Self__1() {\n }", "protected TestBench() {}", "public Soil()\n\t{\n\n\t}", "public IncorrectType58119e() {\n }", "public OOP_207(){\n\n }", "private State5() {\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }", "public Vbc(java.lang.Object instance) throws Throwable {\n super(instance);\n if (instance instanceof JCObject) {\n classInstance = (JCObject) instance;\n } else\n throw new Exception(\"Cannot manage object, it is not a JCObject\");\n }", "private CompressionTools() {}", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "public static void main(String[] args) throws Exception{\n\t\tUnsafe unsafe = getUnsafe();// unsafe\n\t\t// 它跳过了构造方法\n\t\tInitDemo initDemo = (InitDemo) unsafe.allocateInstance(InitDemo.class);\n\t}", "public MethodEx2() {\n \n }", "public Fun_yet_extremely_useless()\n {\n\n }", "protected Compiler() {\r\n\t\ttempTable = new TempTable();\r\n\t\toriginalTextLength = 0;\r\n\t\tthis.cpt = null;\r\n\t}", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public ParseAce_old ()\n{\n initialize ();\n}", "public D() {}", "public LegacyResultMapper() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void\");\n }", "public CSSTidier() {\n\t}", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public Pleasure() {\r\n\t\t}", "private Solution() {\n }", "public AbstractT602()\n {\n }", "protected DenseMatrix()\n\t{\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "private IndexBitmapObject() {\n\t}", "private Solution() { }", "private Solution() { }", "public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public AnimationParameters() {\n/* 279 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private SingleObject()\r\n {\r\n }", "@Override\n public String visit(ExplicitConstructorInvocationStmt n, Object arg) {\n return null;\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }" ]
[ "0.71015143", "0.7059596", "0.6989391", "0.6781889", "0.6726215", "0.67163754", "0.6671958", "0.665917", "0.66513497", "0.6587412", "0.6584786", "0.65427125", "0.65144664", "0.65082955", "0.6488894", "0.6471565", "0.6467171", "0.64512646", "0.64405286", "0.6431756", "0.6430834", "0.6389567", "0.6378872", "0.6369022", "0.63689095", "0.6345528", "0.63360125", "0.6332567", "0.63114005", "0.6303745", "0.62912065", "0.62869126", "0.6269466", "0.6263181", "0.62305385", "0.6226832", "0.62256914", "0.62132907", "0.6200761", "0.6196282", "0.6191469", "0.61778563", "0.6171679", "0.6171058", "0.6170099", "0.6157803", "0.61532795", "0.6149617", "0.6145837", "0.6142204", "0.6139346", "0.61385673", "0.6134378", "0.61322343", "0.61287946", "0.6123413", "0.6117283", "0.6109632", "0.6107482", "0.6106419", "0.6090562", "0.60878205", "0.6084778", "0.6084144", "0.6075915", "0.60758567", "0.60749024", "0.60748315", "0.6068714", "0.60659915", "0.60648376", "0.6064059", "0.6058147", "0.605575", "0.6052822", "0.6051686", "0.60477835", "0.6047027", "0.60431266", "0.6042758", "0.6030025", "0.6025184", "0.6024211", "0.60213375", "0.6006844", "0.60067075", "0.6002124", "0.59998274", "0.5998479", "0.59945077", "0.5990655", "0.5990148", "0.59900665", "0.5987824", "0.5981228", "0.5981228", "0.5980187", "0.5976155", "0.5972846", "0.5970769", "0.5968237" ]
0.0
-1
TC 1: OrangeHRM Title Validation TC 2: OrangeHRM Successful Login Please make sure to use the following: annotations:
@BeforeMethod public void setUp() throws InterruptedException { setUpDriver("chrome", "https://opensource-demo.orangehrmlive.com/"); boolean swagLabs = driver.findElement(By.xpath("//title[text()='OrangeHRM']")).isDisplayed(); if(swagLabs=true) { System.out.println("This is the right title"); }else { System.out.println("This is the wrong title"); } Thread.sleep(2000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups ={Slingshot,Regression})\n\tpublic void verifyTitleField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Title Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.ValidateAddnewUserTitleField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "@Then(\"^'Login and password are required' message should be displayed$\")\n public void loginAndPasswordAreRequiredMessageShouldBeDisplayed() throws Throwable {\n }", "@Then(\"^I can login using my details$\")\n\tpublic void i_can_login_using_my_details() {\n\t \n\t}", "@Test\n public void loginAsEmptyUser(){\n Assert.assertEquals(createUserChecking.creationChecking(\"\",\"\"),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email were typed\");\n }", "@Then(\"Admin homepage should be loaded successfully\")\r\npublic void admin_homepage_should_be_loaded_successfully() {\n\r\n\tboolean isloginsuccess=uAdminlogin.isHeaderFound();\r\n\tAssert.assertEquals(isloginsuccess, true);\r\n\t\r\n}", "@Given(\"^Login to simplilearn$\")\r\n\tpublic void Login_to_simplilearn () throws Throwable\r\n\t{\n\t\t\r\n\t\tSystem.out.println(\" TC002 - Step 1 is passed\");\r\n\t\t\r\n\t}", "@Given(\"^user is on the login page$\")\n public void userIsOnTheLoginPage() throws Throwable {\n }", "@Test\n public void loginWithEmptyName(){\n\n Assert.assertEquals(createUserChecking.creationChecking(\"\",email),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email \"+ email+\" were typed\");\n }", "@Then(\"^User fill the Login form from given sheetname \\\"([^\\\"]*)\\\" and rownumber (\\\\d+)$\")\r\npublic void user_fill_the_Login_form_from_given_sheetname_and_rownumber(String SheetName, int RowNumber) throws Throwable {\r\n\t\t\r\n\t\t LumensExcelReader reader=new LumensExcelReader();\r\n\t\t \r\n\t\t TC002_LoginValidation_Titleverification login=new TC002_LoginValidation_Titleverification(driver);\r\n\t\t \r\n\t\t List<Map<String,String>> testData =reader.getData(\"C:\\\\Users\\\\91994\\\\test-workspace\\\\LumensWebsite\\\\ExcelTestdata\\\\lumenstestdata.xlsx\",SheetName); \r\n\t\t \r\n\t\t String Username =testData.get(RowNumber).get(\"EmailUsername\");Thread.sleep(2000);\r\n\t\t driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS); \r\n\t\t \r\n\t\t String Password =testData.get(RowNumber).get(\"Password\");Thread.sleep(2000);\r\n\t\t driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\r\n\t\t \r\n\t\t login.enterlogincredentials(Username, Password);\r\n\t\t driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\r\n}", "@When(\"^user should enter the valid username in the loginpage$\")\n\tpublic void user_should_enter_the_valid_username_in_the_loginpage() throws Throwable {\n\t inputValuestoElement(pa.getAp().getUsernamedisplay(), \"Srini1010\");\n\t}", "public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t\t\n\t}", "@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }", "@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}", "@Then(\"^the user Login using username and password$\")\r\n\tpublic void the_user_Login_using_username_and_password() throws Throwable {\n\t w.details1();\r\n\t}", "@Test\n\tpublic void TC_Login_02() throws Exception{\n\t\ttry{\n\t\t\tString expectedErrUserName=\"Please enter Username / Email Address.\";\n\t\t\tString expectedErrPassword=\"Please enter Password.\";\n\t\t\t\n\t\t\tdriver.findElement(By.id(\"BtnLogin\")).click();\n\t\t\tString actualErrUserName=driver.findElement(By.xpath(\"//*[@id='Div1']/div[2]/div\")).getText();\n\t\t\tString actualErrPassword=driver.findElement(By.xpath(\"//*[@id='Div1']/div[4]/div\")).getText();\n\t\t\tSystem.out.println(\"Actual validation message for User Name: \"+actualErrUserName);\n\t\t\tSystem.out.println(\"Actual validation message for Password: \"+actualErrPassword);\n\t\t\tAssert.assertEquals(expectedErrUserName, actualErrUserName);\n\t\t\tAssert.assertEquals(expectedErrPassword, actualErrPassword);\n\t\t\tSystem.out.println(\"Actual and Expected validation messages are Equal...\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void TitileFieldErrorValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Title drop down and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyAndValidateSMRTitleFieldContent(smrProfile); \n}", "public String validateLoginPageTitile(){\n return driver.getTitle();//qani vor gettitley stringa get berum menq\n }", "@Then(\"^Login should be successfull and Dashboard page should be displayed$\")\n public void login_should_be_successfull_and_Dashboard_page_should_be_displayed() throws Throwable {\n dashboard.checkDashboardPageProfilePic();\n}", "public void verifyLabelSuccessfulLogin() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying if Label is available or not\");\n\t\t//JavaScriptExec.sleep();\n\t\tAssert.assertTrue(verifyLabelSuccessfulLogin.getText().contains(BasePage.getCellData(xlsxName, sheetName, 3, 0)),\n\t\t\t\t\"Assert Failed as its unable to search text in Logged in Page\");\n\t}", "@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}", "@Test\npublic void Login_with_invalid_userid() {\nwebdriver.get(\"http://www.automationpractice.com\");\n\n//Click Sign in button from top right corner of the page\nwebdriver.findElement(By.xpath(\"//a[@class='login']\")).click();\n\n\n//Enter invalid email address '[email protected]' in email address text field of right side\nwebdriver.findElement(By.xpath(\"//input[@id='email']\")).sendKeys(\"[email protected]\");\n//Click Sign in button\nwebdriver.findElement(By.xpath(\"//span[parent::button[@id='SubmitLogin']]\")).click();\n\n//Verify error message displayed 'There is 1 error'\nString actulmsg =webdriver.findElement(By.xpath(\"//p[text()='There is 1 error']\")).getText();\n //// Assert.assertEquals(actulmsg, \"There is 1 error\");\n//System.out.println(actulmsg);\n Assert.assertEquals(webdriver.findElement(By.xpath(\"//p[text()='There is 1 error']\")).getText(), \"There is 1 error\");\n\n//Verify error message displayed 'Password is required.'\nString actulms= webdriver.findElement(By.xpath(\" //li[ancestor::div[@class='alert alert-danger']]\")).getText();\nAssert.assertEquals(actulms, \"Password is required.\");\n//System.out.println(actulms);\n\n}", "@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }", "@ApiModelProperty(required = true, value = \"This is the Login User Name\")\n @NotNull\n\n\n public String getUserName() {\n return userName;\n }", "public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test(priority=0)\n \n public void test_Login(){\n \tobjLogin = new PilrLogin(driver);\n \n \t//Verify login page title\n \tString loginPageTitle = objLogin.getPageSource();\n \tAssert.assertTrue(loginPageTitle.toLowerCase().contains(\"sign in\"));\n\n \n \t//login to application\n \tobjLogin.loginToPilr(objtestvars.getUserName(), \n \t\t\tobjtestvars.getPassWrd());\n \n \t// go the next page\n \tobjHomePage = new PilrHomePage(driver);\n \n \t//Verify home page\n \tAssert.assertTrue(objHomePage.getHomePageWelcome().toLowerCase().contains(\n \t\t\t\"welcome back, bikerjohn!\"));\n \tSystem.out.println(\"[Test Case]Home Page Verified\");\n }", "public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t}", "@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}", "@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}", "@Test\n public void loginWithEmptyEmail(){\n String rand=random.getNewRandomName()+\"_auto\";\n Assert.assertEquals(createUserChecking.creationChecking(rand,\"\"),\"APPLICATION ERROR #1200\");\n log.info(\"Empty email and login \"+ rand+\" were typed\");\n }", "@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }", "@Then(\"user should see {string}\")\n public void userShouldSee(String ErrorMessage) {\n homePage.loginErrorMsg(ErrorMessage);\n }", "@Then(\"^Validate the fields present in the result page$\") // Move to UserStep Definition\r\n\tpublic void attribute_validation(){\r\n\t\tenduser.attri_field();\r\n\t}", "@Override\r\n\tpublic String validate(Login login) {\n\t\treturn null;\r\n\t}", "@When(\"^user enters username \\\"([^\\\"]*)\\\" and password \\\"([^\\\"]*)\\\"$\")\npublic void user_enters_username_something_and_password_something(String username, String password) throws Throwable {\nLpI.Login(username, password);\n}", "@Test\n\tpublic void Authentication_04() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"11\", \"wesley11\", \"12345678\");\n\t\t\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Username is not a valid email address\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t\t\n\t}", "public void verifyFalseLogin() {\n alertElement.waitForState().present(30);\n alertElement.assertContains().text(\"Please Enter a Valid User ID\");\n }", "@Then(\"^Message displayed Login Successfully$\")\r\n\tpublic void message_displayed_Login_Successfully() throws Throwable {\n\t\tSystem.out.println(\"Login Successfully\");\r\n\t}", "@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}", "protected String loginIdentifyString() {\r\n return \"hao\";\r\n }", "@Test\n\tpublic void testingLoginEmail() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validEmail\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}", "@Then(\"Assert the success of Determine application's/system's password policy\")\npublic void assdetermineapplicationssystemspasswordpolicy(){\n}", "@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}", "@Test\n\tpublic void Authentication_02() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"01\", \"[email protected]\", \"12345678\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Username already exists\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t}", "@Given(\"User is on the HomePage\")\r\n\tpublic void user_is_on_the_home_page() \r\n\t{\n\t driver.get(\"https://lkmdemoaut.accenture.com/TestMeApp/fetchcat.htm\");\r\n\t driver.findElement(By.linkText(\"SignIn\")).click();\r\n\t \r\n\t WebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(\"userName\"))));\r\n\t \r\n\t driver.findElement(By.id(\"userName\")).sendKeys(\"Lalitha\");\r\n\t driver.findElement(By.id(\"password\")).sendKeys(\"password123\");\r\n\t driver.findElement(By.name(\"Login\")).click();\r\n\t}", "@Then(\"I want to login successfully\")\n\tpublic void output() {\n\t\tact.gethomepage().verifyLoggedUser();\n\n\t\t//String username = linkWelcome.getText();\n\t\t//String login = \"Welcome Admin\";\n\t\t//if (username.equals(login)) {\n\t\t\t//System.out.println(\"User name is correct\");\n\t\t//} else {\n\t\t\t//System.out.println(\"Username is not correct\");\n\n\t\t}", "@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }", "boolean hasLoginapisuccessfulhitcount();", "@Test\n\tpublic void Authentication_03() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"100\", \"[email protected]\", \"12345\");\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Password length must be 6 or more\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t}", "@When(\"^click on Login Button$\")\npublic void click_on_Login_Button() throws Throwable \n{\n\tdriver.findElement(By.id(\"form-login_submitAuth\")).click();\n}", "@Then(\"^Homepage is populated$\")\r\n public void homepage_is_populated() throws Throwable {\n \tSystem.out.println(\"Validated HomePage\");\r\n \r\n }", "@Test(priority=1)\r\n\tpublic void loginApp()\r\n\t{\r\n\t\t\r\n\t\tlogger=report.createTest(\"Login To Pymidol\");\r\n\t\r\n\t\tLoginPage loginPage=PageFactory.initElements(driver, LoginPage.class); //it will goto login page check all the locators initialise then it will return object of same class\r\n\t\t\r\n\t\tlogger.info(\"Starting Application\"); //it will provide information about test or test step\r\n\t\t\r\n\t\tloginPage.loginToPymidol(excel.getStringData(\"Login\", 0, 0), excel.getStringData(\"Login\", 0, 1));\r\n\t\t\r\n\t\tlogger.pass(\"Login done Success\");\r\n\t\r\n\t}", "@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}", "@Test(priority=4)\r\n\t public void ValidLoginD() {\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\t ValidateSigninbuttonB(); // Calling the validatesigninbutton function to click the signin link\r\n\t\t \r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_email\")).click(); // Clicking the username\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_email\")).sendKeys(\"[email protected]\"); // Inserting the username\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"continue\")).click(); // Clicking the continue button\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"ap_password\")).sendKeys(\"Test@@12345\"); // Inserting the password\r\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); // Implicit wait\r\n\t\t driver.findElement(By.id(\"signInSubmit\")).click(); // Clicking the login button\r\n\t\t \r\n\t\t \r\n\t\t String text = driver.findElement(By.id(\"nav-link-yourAccount\")).getText(); // Extracting the text value from the webelement identifier\r\n\t\t \r\n\t\t // Validating the successful login flow\r\n\t\t \r\n\t\t if (text.contains(\"Wilson\")){\r\n\t\t\t System.out.println(\"Login successful\");\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Login not successful\");\r\n\t\t }\r\n\t }", "public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }", "@Before\n public void initValidString() {\n // Specify valid strings\n title = \"This is the best movie out there!\";\n body = \"I do not know how I have gone so long without this movie. It has literally saved my life!\";\n productUPC = \"883904333791\"; //james bond movie\n username = \"[email protected]\";\n password = \"xyxyx\";\n\n // Sign In\n ActivityTestRule<LoginActivity> mActivityRule2 = new ActivityTestRule(LoginActivity.class, false, false);\n Intent intent = new Intent();\n mActivityRule2.launchActivity(intent);\n onView(withId(R.id.email)).perform(typeText(username), closeSoftKeyboard());\n onView(withId(R.id.password)).perform(typeText(password), closeSoftKeyboard());\n onView(withId(R.id.email_sign_in_button)).perform(click());\n\n }", "@Then(\"Assert the success of Access & exfiltrate data within the victim's security zone\")\npublic void assaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "@Test\n public void kullanici_login_test(){\n extentTest=extentReports.createTest(\"TC_1001_Kullanici login edebilme\",\"Kullanici login yapip profiline gelebilmeli\");\n US_010_page us_010_page=new US_010_page();\n Driver.getDriver().get(ConfigReader.getProperty(\"us010_chotel_url\"));\n Assert.assertTrue(Driver.getDriver().getTitle().contains(ConfigReader.getProperty(\"us010_chotel_Title_Home_yazisi\")));\n extentTest.pass(\"title home yazisi iceriyor, Test PASSED\");\n us_010_page.homeLogin.click();\n Assert.assertTrue(Driver.getDriver().getTitle().contains(ConfigReader.getProperty(\"us010_chotel_Title_Login_yazisi\")));\n extentTest.pass(\"title login yazisi iceriyor, Test PASSED\");\n us_010_page.usernameTextBox.sendKeys(ConfigReader.getProperty(\"us010_chotel_username\"));\n Assert.assertTrue(us_010_page.usernameTextBox.isEnabled());\n extentTest.pass(\"username box aktif yazi yazilabilir, Test PASSED\");\n us_010_page.passwordTextBox.sendKeys(ConfigReader.getProperty(\"us010_chotel_password\"));\n Assert.assertTrue(us_010_page.passwordTextBox.isEnabled());\n extentTest.pass(\"password box aktif yazi yazilabilir, Test PASSED\");\n Assert.assertTrue(us_010_page.loginButonu.isEnabled());\n extentTest.pass(\"login butonu aktif, Test PASSED\");\n us_010_page.loginButonu.click();\n Assert.assertTrue(us_010_page.profileYazisi.isDisplayed());\n extentTest.pass(\"profile yazisi gorunuyor, Test PASSED\");\n\n\n\n\n }", "@Test\n public void check_Login_Success() {\n lPage = new LoginPage(webDriver);\n lPage.login(\"admin\",\"admin\");\n hPage = new HomePage(webDriver);\n String loginText = hPage.getHomePageText();\n assertEquals(\"Congratulations!\",loginText);\n }", "@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void ValidateSearchTermError()\n{\t\t\n\t Report.createTestLogHeader(\"Submit Meter Read\", \"Verify the functionality of Search term field and its appropriate error message\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GlobalSMRMultiDialMetersite\");\n\tnew SubmitMeterReadAction()\n\t.BgbnavigateToLogin()\n .BgbloginDetails(smrProfile)\n .BgbverifyAfterLogin()\n .clickSubmitMeterReadLink()\n .searchByInvalidata();\n \n}", "@Test\n\t\n\t\tpublic void Login_invalid() \n\t\t\n\t\t{\n\n\t\t\tString un = \"vivek\";\n\t\t\tString pw = \"vivek kumar\";\n\n\t\t\tlogger.info(\"********** Verify that use can able to login with correct username & incorrect password***********\");\n\t\t\t\n\t\t\tWebElement uname = d.findElement(By.id(\"kitchen_user_user_name\"));\n\t\t\tWebElement pwd = d.findElement(By.id(\"kitchen_user_password_digest\"));\n\t\t\t// WebElement Rme = d.findElement(By.name(\"remember\"));\n\t\t\tWebElement submit = d.findElement(By.name(\"commit\"));\n\n\t\t\t\n\t\t\tif (uname.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the User Name field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the User Name field is present \");\n\n\t\t\t}\n\t\t\t\n\n\t\t\tif (uname.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the username fields get autofocus\");\n\n\t\t\t\tuname.sendKeys(\"vivek\");\n\t\t\t\t\n\t\t\t\tuname.sendKeys(Keys.TAB);\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the username fields get autofocus\");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\t\n\n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\n\t\t\tif (pwd.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the password fields get focused\");\n\n\t\t\t\tpwd.sendKeys(\"vivek kumar\");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the password fields get focused\");\n\t\t\t}\n\n\t\t\t\n\t\t\tif (submit.isEnabled()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsubmit.click();\n\t\t\t\t\n\n\t\t\t\tString url = \"http://192.168.1.73:4000\";\n\t\t\t\t\n\t\t\t\tString curl = d.getCurrentUrl();\n\t\t\t\t\n\t\t\t\tif (d.getCurrentUrl().equals(url)) {\n\t\t\t\t\t\n\t\t\t\t\tlogger.error(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\n\n\t\t\t\t\tlogger.info(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that user can't able to click the submit\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t}", "@Test(priority = 5)\n public void incorrectLoginWithBothLabels() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, incorrectPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingElectricityErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the anonymous submit meter read page for error message validation\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRUser1\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.validateElectricityreadingFiledErrormsg(smrProfile);\t\t\t\n}", "@Then(\"^I Login to the application$\")\r\n\tpublic void I_Login_to_the_application() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}", "@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}", "@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}", "@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}", "public String Login_without_textfields_entered() {\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}", "@Given(\"user is on admin login page\")\r\npublic void user_is_on_admin_login_page() {\n\r\n\tdriver.get(\"http://uniformm1.upskills.in/admin/index.php?route=common/dashboard&token=GojamxBwtSmLEAaHnCBgb3P8yKe4N2vQ\");\r\n\tString curTitle = driver.getTitle();\r\n\t\r\n\tAssert.assertEquals(curTitle, \"Administration\");\r\n}", "@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }", "@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}", "@Test\n public void testAccountLogin() {\n try {\n// WebAddProblemParameters webAddProblemParameters = new WebAddProblemParameters();\n// webAddProblemParameters.setPassportId(\"[email protected]\");\n// webAddProblemParameters.setContent(\"搜狗通行证很好\");\n// webAddProblemParameters.setEmail(\"[email protected]\");\n// webAddProblemParameters.setTitile(\"标题党\");\n// webAddProblemParameters.setTypeId(1);\n ProblemAnswer problemAnswer = new ProblemAnswer();\n problemAnswer.setAnsContent(\"你好,这个问题我们已经收到了,会马上处理\");\n problemAnswer.setAnsPassportId(\"[email protected]\");\n problemAnswer.setAnsTime(new Date());\n problemAnswer.setProblemId(1);\n Result result = problemAnswerManager.addProblemAnswer(problemAnswer,\"[email protected]\");\n System.out.println(\"testAccountLogin:\"+result.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}", "private void loginSuccess(String uname) {\n }", "@Given(\"Login application should be present\")\n\tpublic void login_application_should_be_present() {\n\t System.out.println(\"it is working\");\n\t}", "@Override\n\tpublic void validateHeader(RequestEntity<? extends LoginRequest> request) throws ApiException {\n\t\t\n\t}", "@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }", "public LoginOra() {\n super(\"Oracle Login\");\n\n }", "@PostMapping(\"/logincheck\")\n\tpublic String LoginCheck()\n\t{\n\t\treturn \"profile\";\n\t}", "@Test\n public void loginWithWrongEmail(){\n String randomLog=random.getNewRandomName()+\"_auto\";\n String randomPassword=random.getNewRandomName();\n Assert.assertEquals(createUserChecking.creationChecking(randomLog,randomPassword),\"APPLICATION ERROR #1200\");\n log.info(\"login \"+randomLog+\" and email \"+randomPassword+\" were typed\");\n }", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@Test(priority = 1)\n\tpublic void login() {\n\t\tlp.loginToApp();\n\t}", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "@Test (description = \"entering incorrect username\")\n public void negative_login_test1() {\n\n Driver.getDriver().get(ConfigurationReader.getProperty(\"smartbearUrl\"));\n\n//Lets start using PageObjectModel\n\n //#1 We need to create the object of class we want to use\n //instantiate here\n loginPage = new LoginPage();\n\n//#2 call the object to use the web elements\n //entering incorrect username\n loginPage.userNameInput.sendKeys(\"aaa\");\n\n //enter correct password\n String smartbear_password = ConfigurationReader.getProperty(\"smartbear_password\");\n loginPage.passwordInput.sendKeys(smartbear_password);\n\n loginPage.loginButton.click();\n loginPage.errorMessage.isDisplayed();\n\n //assert true that error message is displayed on the page\n Assert.assertTrue(loginPage.errorMessage.isDisplayed(), \"Error message is not displayed, Verification is FAILED!!!\");\n BrowserUtil.wait(3);\n\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15AcctsErrorValidation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether proper error message is displayed in view when continuing with out enabling the accounts check box\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t\t.clicktestacct();\n\t\t/*.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile)\n\t\t.EditViewNameErrorValidation(userProfile); \t \t\t\t\t\t\t \t \t\t\n\t}*/\n\t}", "@Test\n\n public void validateAppTitle() throws IOException {\n LandingPage l = new LandingPage(driver);\n //compare the text from the browser with actual text.- Error..\n Assert.assertEquals(l.getTitle().getText(), \"FEATURED COURSES\");\n\n System.out.println(\"Test running from Inside docker for tests dated 22-03-2020\");\n System.out.println(\"Test completed\");\n\n ;\n\n\n }", "@Test\n public void test_create_user_and_login_success() {\n try {\n TokenVO firstTokenVO = authBO.createUser(\"createduser1\",\"createdpassword1\");\n Assert.assertNotNull(firstTokenVO);\n Assert.assertNotNull(firstTokenVO.getBearer_token());\n Assert.assertTrue(firstTokenVO.getCoachId() > 1);\n String firstToken = firstTokenVO.getBearer_token();\n\n TokenVO secondTokenVO = authBO.login(\"createduser1\", \"createdpassword1\");\n Assert.assertNotNull(secondTokenVO);\n Assert.assertNotNull(secondTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() > 1);\n Assert.assertTrue(secondTokenVO.getBearer_token() != firstTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() == firstTokenVO.getCoachId());\n } catch (AuthException e) {\n System.err.println(e.getMessage());\n Assert.assertTrue(e.getMessage().equalsIgnoreCase(\"\"));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\n\tpublic void testingLoginUsername() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validUsername\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}", "@Test\n public void loginNegative() throws Exception{\n loginPage.login(ConfigurationReader.getProperty(\"sales_manager_username\"), ConfigurationReader.getProperty(\"invalidPassword!\"));\n\n //Error message\n String err = \"Invalid user name or password.\";\n Assert.assertTrue(loginPage.errorMessage.isDisplayed() && err.equals(err));\n\n //Page title and url\n Assert.assertEquals(driver.getTitle(), ConfigurationReader.getProperty(\"url\").contains(\"login\"));\n }", "@Test(priority=2)\n public void testTeacherLogin() {\n\t driver.get(\"http://elearning.hommelle.com\");\n\t teacherPOM.sendLoginName(\"swapna18\");\n\t teacherPOM.sendPassword();\n\t teacherPOM.clickLoginBtn(); \n\t screenShot.captureScreenShot(\"Fifth\");\n\t \n\t String expected = \"Hello swapna reddy and welcome,\";\n\t String actual = driver.findElement(By.xpath(\"(//P)[3]\")).getText();\n\t assertEquals(actual, expected);\n\t\t\n }", "@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }", "@Test(priority = 4)\n public void emptyUsernameLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, \"\");\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyUsernameError);\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}", "@Flaky\n @Test\n public void checkServicePage() {\n assertEquals(getWebDriver().getTitle(), MAIN_DRIVER_TITLE);\n\n //2. Perform login\n servicePage.login(cfg.login(), cfg.password());\n\n //3. Assert User name in the left-top side of screen that user is loggined\n servicePage.checkUserNameTitle();\n\n\n }", "@Then(\"Assert the success of Analysis\")\npublic void assanalysis(){\n}", "@Test\n public void testVerifyNimbleUser() {\n String autorization=\"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ6cFp2LVlNTlJfRURaeEJDN0tRTmw0VEVqektpcUJnNzJhY0JHZjlCbVFVIn0.eyJqdGkiOiJkMDliNTFlYS1hOTI0LTRmMzctOWZiYi00ZDAxNjc0MjQ1ZWYiLCJleHAiOjE1NTAyMzMxNzIsIm5iZiI6MCwiaWF0IjoxNTUwMjI5NTcyLCJpc3MiOiJodHRwOi8va2V5Y2xvYWs6ODA4MC9hdXRoL3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJuaW1ibGVfY2xpZW50Iiwic3ViIjoiOGI0NDBhNGUtNTZhOC00MmU3LTk3ZDMtYTJkNWNmNjk0MzIzIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmltYmxlX2NsaWVudCIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY1NmI0YjY5LTIyOGItNDM2OC1hNWI1LTBiMjM5YTQ3ODYxNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsibmltYmxlX3VzZXIiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sIm5hbWUiOiJhbmRyZWEgcGVyc29uYSBtdXN1bWVjaSIsInByZWZlcnJlZF91c2VybmFtZSI6Im11c3VtZWNpLmhvbG9uaXgrMUBnbWFpbC5jb20iLCJnaXZlbl9uYW1lIjoiYW5kcmVhIHBlcnNvbmEiLCJmYW1pbHlfbmFtZSI6Im11c3VtZWNpIiwiZW1haWwiOiJtdXN1bWVjaS5ob2xvbml4KzFAZ21haWwuY29tIn0.gBnPrfbtVmgwSDIZcOZpOlNglesktHwtTf3dw1oGjnVOCWivIX-phWcU6pbr3fBrMql3AgPEFGHRDhDXXW0Ag1sY09ht6nyZQWtQE9abjARPwO6By69kbZ0WC8R5nK3TkaAJOnFn4Fiutm7x2nn2bQDxjaKZf7QzHRic7V129eSo1IgfsqNAlF2UGLtuVbB-H65uRamZl5xFXi8bgQ6uzohcs4LWd9eaQobiOH2J21toHJ35QqUy8lfQyEiMEIf2ZiW_gCxn2ZPr9n4mWR71P_Ihh6cKA6SLZPLyi0TJK3pj0V0ujHhrdLjssJ2pmrO3qZFPz7bPhvDY_uxZ4raItA\";\n //String autorization=\"errrr\";\n NimbleUser user = null;\n \n IdentityServiceVerifier isv = new IdentityServiceVerifier();\n user = isv.verifyNimbleUser(autorization);\n //assertNotNull(user);\n //assertNotEquals(new Boolean(user.isValidUser()),Boolean.FALSE);\n \n }", "@Test(priority = 2)\n public void incorrectLoginWithUsername() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }", "public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }", "@Test\n\n public void verifyRegistrationPageSLT() throws InterruptedException {\n ReadFromPropFile readFromPropFileObj = new ReadFromPropFile(\"RegiProfile.properties\");\n RegisterHealthcareProfPO registerHealthcareProfPOObj = new RegisterHealthcareProfPO(driver);\n\n //**********************Registration Screen************************************//\n\n //1. Click \"Sign in\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.SignIN_xpath),\"Unable to click on SignIn link \");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on SignIn link \", \"User should able to click on sign in link\");\n\n //3. Click on \"Click Here\" button for healthcare office.\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.HireReg_xpath),\"Unable to 'Click Here' button\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Click Here' button \", \"User should able to Click on 'Click Here' button \");\n\n //4.Enter \"Facility\" name\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FacilityName_xpath,readFromPropFileObj.getFacilityName()),\"Unable to enter facilityName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter facility name \", \"User should able to enter on facility name \");\n\n //5.Enter \"First name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FName_xpath, readFromPropFileObj.getFirstName()),\"Unable to enter First Name\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter first name \", \"User should able to enter first name \");\n\n //5A.Enter \"last name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.LName_xpath, readFromPropFileObj.getLastName()),\"Unable to get LastName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter last name \", \"User should able to enter on last name \");\n\n //6.Enter EmailID\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Email_xpath, readFromPropFileObj.getEmail1()),\"Unable to enter emailID\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter EmailID \", \"User should able to enter EmailID\");\n\n //7.Enter phone number\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Phone_xpath, readFromPropFileObj.getphone()),\"Unable to enter ph\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter phone number \", \"User should able to enter phone number\");\n\n //8.Enter department\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Dept_xath, readFromPropFileObj.getDept()),\"Unable to enter Dept\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n //9.Enter address\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Address_xpath, readFromPropFileObj.getAddress()),\"Unable to enter addrees\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter address \", \"User should able to enter address\");\n\n //10.Enter city\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.City_xpath, readFromPropFileObj.getCity()),\"Unable to enter city\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n ((JavascriptExecutor) driver).executeScript(\"window.scrollBy(0,3000)\");\n\n //11.Select State\n Assert.assertTrue(registerHealthcareProfPOObj.selectFromDropDownBtn(registerHealthcareProfPOObj.State_xpath, registerHealthcareProfPOObj.State1_xpath),\"Unable to select state\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Select state \", \"User should able to select state\");\n\n //12.Enter zip code\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Zip_xpath, readFromPropFileObj.getZip()),\"Unable to enter zip\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter zip code \", \"User should able to enter zip code\");\n\n //13.Click \"Registor Now\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.RegisterNow_xpath),\"Unable to click on register now\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Register Now'\", \"User should able to Click on 'Register Now' \");\n\n //14.User registered successfully and message should display - \"check inbox to verify your account\".\n String expectedMessage = \"Check inbox to verify your account.\";\n Assert.assertEquals(registerHealthcareProfPOObj.findText(registerHealthcareProfPOObj.VerifyAcct_xpath),expectedMessage);\n ExtentTestManager.getTest().log(LogStatus.PASS, \"User should see toast message 'Check inbox to verify your account'\", \"User able to see the toast message\");\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}" ]
[ "0.619163", "0.5918852", "0.5866061", "0.58622956", "0.5836218", "0.5816644", "0.58071077", "0.5806571", "0.5806055", "0.5795774", "0.57734495", "0.5769979", "0.57679045", "0.57596916", "0.5744607", "0.5731481", "0.57204676", "0.5703786", "0.56762075", "0.5666533", "0.56572473", "0.5645829", "0.5633593", "0.5631838", "0.5631595", "0.5630328", "0.56086564", "0.5582515", "0.5564822", "0.5564734", "0.55534387", "0.55506605", "0.55491024", "0.55328315", "0.5525085", "0.5524058", "0.5521471", "0.55052245", "0.5495993", "0.54785657", "0.5473947", "0.5470879", "0.5470861", "0.54603314", "0.54355747", "0.54226005", "0.5421309", "0.5415894", "0.54154813", "0.54140013", "0.54132146", "0.5406594", "0.54060507", "0.5403257", "0.54015535", "0.5396854", "0.53951216", "0.5394487", "0.5391556", "0.53797436", "0.53774226", "0.53753924", "0.53731567", "0.5369138", "0.53602505", "0.5357168", "0.53561014", "0.5353292", "0.53525794", "0.535045", "0.5347414", "0.53371143", "0.53345525", "0.533263", "0.53291845", "0.5327308", "0.5322037", "0.532075", "0.5314424", "0.5311516", "0.5311251", "0.5309512", "0.5309322", "0.53032327", "0.53020614", "0.5300053", "0.5297696", "0.5294874", "0.52929777", "0.5287936", "0.52859664", "0.52806264", "0.52805936", "0.52772325", "0.52735895", "0.5272239", "0.5271605", "0.5271435", "0.5265137", "0.5264257", "0.5262798" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { LockThread th = new LockThread(); th.start(); startLatch.await(); System.out.println("Before park, thread state: " + th.getState()); parkLatch.countDown(); System.out.println("After park, thread state: " + th.getState()); Thread.sleep(1000); th.interrupt(); System.out.println("Unparking.. " + th.getState()); }
{ "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
/ liste des feedback d'un collaborateur
@RequestMapping(value = "/collaborateurs/{id}/feedBacks" , method = RequestMethod.GET) public Reponse getAllfeedBackOfCollaborateurByYear(@PathVariable("id") Long id,Date year) { try { Collaborateur collaborateur = new Collaborateur(id); return new Reponse(0,FeedBackModel.listeFeedBackRvised(feedBackMetier.getAllfeedBackOfCollaborateurByYear(collaborateur, year))); } catch (LambdaException e) { return new Reponse(1,ExceptionHelpers.getErreursForException(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void afficher_les_messages() {\n List<Message> liste_message = ticket_courant.getMessage();\n String texte = \"\";\n for(Message mess: liste_message){\n texte += mess.getExpediteur()+ \" : \"+mess.getTexte()+\"\\n\";\n }\n aff_message.setText(texte);\n /*String[] tab_messages_brut = {\"\"};\n int incr = 0;\n for (Message message : liste_message) {\n tab_messages_brut[incr] = message.getTexte();\n incr++;\n }\n /*JList<String> Liste_messages = new JList<>(tab_messages_brut);\n Conteneur_liste.removeAll();\n Conteneur_liste.add(Liste_messages);\n Liste_messages.setVisible(true);\n Conteneur_liste.updateUI();*/\n }", "@Override\r\n\tpublic List<Feedback> getFeedbacklist() {\n\t\tList<Feedback> flist= frepository.findAll();\r\n\t\treturn flist;\r\n\t}", "@Override\n\tpublic ArrayList<Feedback> selectPerEdizione(int idEdizione) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"SELECT * FROM feedback\"\n\t\t\t\t+ \" where id_edizione=?\");\n\n\t\tps.setInt(1, idEdizione);\n\n\t\tResultSet rs = ps.executeQuery();\n\t\tArrayList<Feedback> feedbacks= new ArrayList<Feedback>(); \n\t\twhile(rs.next()){\n\t\t\tString descrizione= rs.getString(\"descrizione\");\n\t\t\tInteger voto = rs.getInt(\"voto\");\n\t\t\tInteger idFeedback = rs.getInt(\"id_feedback\");\n\t\t\tString idUtente = rs.getString(\"id_utente\");\n\t\t\tFeedback feedback = new Feedback(idFeedback,idEdizione, idUtente, descrizione, voto);\n\t\t\tfeedbacks.add(feedback);\n\t\t}\n\n\t\treturn feedbacks;\n\t\n\t}", "@Override\n\tpublic ArrayList<Feedback> selectFeedbackPerCorso(int idCorso) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"select f.id_feedback,\"\n\t\t\t\t+ \"f.id_edizione,f.id_utente,f.descrizione,f.voto from feedback f \"\n\t\t\t\t+ \"inner join calendario c on f.id_edizione=c.id_edizione\" \n\t\t\t\t+ \" where c.id_corso=?\");\n\n\t\tps.setInt(1, idCorso);\n\n\t\tResultSet rs = ps.executeQuery();\n\t\tArrayList<Feedback> feedbacks= new ArrayList<Feedback>(); \n\t\twhile(rs.next()){\n\t\t\tString descrizione= rs.getString(\"descrizione\");\n\t\t\tInteger voto = rs.getInt(\"voto\");\n\t\t\tInteger idFeedback = rs.getInt(\"id_feedback\");\n\t\t\tString idUtente = rs.getString(\"id_utente\");\n\t\t\tInteger idEdizione = rs.getInt(\"id_edizione\");\n\t\t\tFeedback feedback = new Feedback(idFeedback,idEdizione, idUtente, descrizione, voto);\n\t\t\tfeedbacks.add(feedback);\n\t\t}\n\n\t\treturn feedbacks;\n\t\n\t}", "@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}", "@Override\n\tpublic ArrayList<Feedback> selectPerUtente(String idUtente) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"SELECT * FROM feedback\"\n\t\t\t\t+ \" where id_utente=?\");\n\n\t\tps.setString(1, idUtente);\n\n\t\tResultSet rs = ps.executeQuery();\n\t\tArrayList<Feedback> feedbacks= new ArrayList<Feedback>(); \n\t\twhile(rs.next()){\n\t\t\tString descrizione= rs.getString(\"descrizione\");\n\t\t\tInteger voto = rs.getInt(\"voto\");\n\t\t\tInteger idFeedback = rs.getInt(\"id_feedback\");\n\t\t\tInteger idEdizione = rs.getInt(\"id_edizione\");\n\t\t\tFeedback feedback = new Feedback(idFeedback,idEdizione, idUtente, descrizione, voto);\n\t\t\tfeedbacks.add(feedback);\n\t\t}\n\n\t\treturn feedbacks;\n\t\n\t}", "@Override\r\n\tpublic List<Feedback> getFeedback(int tutorId) {\n\t\tList<Feedback> flist= frepository.getFeedback(tutorId);\r\n\t\treturn flist;\r\n\t}", "public void majAffichageConnectes() {\n effacerConnectes(); // on efface ce qui est deja ecrit dans la zone reservees a la liste des\n // connectes\n\n choixMessage.removeAllItems(); // Suppression de tous les items de la comboBox\n choixMessage.addItem(\"Tout le monde\");\n choixMessage.setSelectedIndex(0); // Par defaut => envoi a tout le monde\n\n // Parcours de la liste des personnes connectees\n for (Map.Entry<String, Color> entry : couleurs.entrySet()) {\n String nom = entry.getKey(); // recuperation du nom\n Color rgb = new Color(chercherCouleur(nom)); // recuperation de la couleur correspondante\n\n // Mise a jour de la combobox\n if(!fenetre.getClient().getNom().equals(nom)){\n choixMessage.addItem(nom);\n }\n\n // Mise a jour de l'affichage dans le panneau \"Connectes\"\n StyledDocument doc = connectes.getStyledDocument();\n StyleContext style = StyleContext.getDefaultStyleContext();\n // Modification de la couleur\n AttributeSet aset = style.addAttribute(style.getEmptySet(), StyleConstants.Foreground, rgb);\n // Mettre en gras\n aset = style.addAttributes(aset, style.addAttribute(style.getEmptySet(), StyleConstants.Bold, true));\n\n // ajout de la personne dans la liste avec la couleur correspondante\n try {\n doc.insertString(doc.getLength(), nom+\"\\n\", aset);\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"maj de l'affichage de la liste des connectes\");\n }", "private ArrayList getListaDelCommunication2() {\n return this.getComunicationAccionSocialBean().getListaSolicitudesBeneficio();\n }", "public void chat_list() {\n\n synchronized(chat_room) {\n Set chat_room_set = chat_room.keySet();\n Iterator iter = chat_room_set.iterator();\n\n clearScreen(client_PW);\n client_PW.println(\"------------Chat Room List-----------\");\n while(iter.hasNext()) {\n client_PW.println(iter.next());\n }\n client_PW.flush();\n }\n }", "public void listOfCourses() {//admin cagirisa bulunna kurslarin hepsi\n if (Courses.size() != 0) {\n System.out.printf(\"%s kullanicisinin dersleri\\n\", this.getUsername());\n for (int i = 0; i < this.Courses.size(); ++i) {\n System.out.printf(\"%d-%s\\n\", i, Courses.get(i));\n }\n } else {\n System.out.printf(\"%s kullanicinin dersi yok\\n\", this.getUsername());\n }\n }", "@Override\r\n\tpublic List<Feedback> getAll() {\n\t\treturn null;\r\n\t}", "public ArrayList<FeedbackDetail> gettingAllAvailableFeedbacks() throws Exception;", "public void listeDesEmpruntsEnCours();", "public void listar() {\r\n Collections.sort(coleccion);\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n String resumen = (coleccion.get(i).toString());\r\n JOptionPane.showMessageDialog(null, resumen);\r\n }\r\n }", "private void contactsListEvent(){\n UI.getContacts().addListSelectionListener(new ListSelectionListener() {\r\n @Override\r\n public void valueChanged(ListSelectionEvent e) {\r\n UI.getProperList().clear(); //Clear screen\r\n UI.getContacts().setCellRenderer(clearNotification); //Clear notification\r\n UI.getUserName().setText((String) UI.getContacts().getSelectedValue()); //Set selected username\r\n String currentChat = (String)UI.getContacts().getSelectedValue();\r\n if(chats.containsKey(currentChat)){ //If database exists\r\n for(String s: chats.get(currentChat)){ //Load messages to screen\r\n UI.getProperList().addElement(s);\r\n }\r\n }\r\n }\r\n });\r\n }", "public pnl_Gestionar_info_laboratorio() {\n initComponents();\n listar_info_lab.setSelected(true);\n new CambiaPanel(panel_contenedor, new paneles_de_paneles.de_gestionar_info_laboratorio_listar());\n pnl_Gestionar_contrato.color_performed(listar_info_lab,add_info_lab);\n }", "List<String> showNewsAndMessages();", "public HashMap<String, Chatter> getListeChatter() {\n\t\treturn listeChatter;\n\t}", "private void fillConversationList()\n\t{\n\t\tbasicConversations.add(\"how are you?\");\n\t\tbasicConversations.add(\"how do you do?\");\n\t\tbasicConversations.add(\"how are you feeling?\");\n\t\tbasicConversations.add(\"what is your current status?\");\n\t\tbasicConversations.add(\"how are you feeling?\");\n\t\tbasicConversations.add(\"are you feeling well?\");\n\t\tbasicConversations.add(\"how's life?\");\n\t\tbasicConversations.add(\"how's it going?\");\n\t\tbasicConversations.add(\"how art thou?\");\n\t}", "public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }", "public ManejoListaDistribucion() {\n initComponents();\n var dataUser = Data.getData();\n var user = dataUser.getUser();\n var strError = \"\";\n var objManejoArchivo = new ManejoArchivo();\n \n var listaMostrar = new DefaultListModel();\n File Archivo = new File(\"C:/MEIA/lista.txt\");\n var lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[1].equals(user) && splitAux[5].equals(\"1\")){\n listaMostrar.addElement(splitAux[0] + \"-\" + splitAux[2]);\n }\n }\n\n Archivo = new File(\"C:/MEIA/bitacora_lista.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[1].equals(user) && splitAux[5].equals(\"1\")){\n listaMostrar.addElement(splitAux[0] + \"-\" + splitAux[2]);\n }\n }\n lListas.setModel(listaMostrar);\n listaMostrar = new DefaultListModel();\n Archivo = new File(\"C:/MEIA/contactos.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[0].equals(user) && splitAux[4].equals(\"1\")){\n listaMostrar.addElement(splitAux[1]);\n }\n }\n\n Archivo = new File(\"C:/MEIA/bitacora_contactos.txt\");\n lista = objManejoArchivo.LecturaCompleta(Archivo, strError);\n for (int i = 0; i < lista.size(); i++) {\n var splitAux = lista.get(i).split(Pattern.quote(\"|\"));\n if(splitAux[0].equals(user) && splitAux[4].equals(\"1\")){\n listaMostrar.addElement(splitAux[1]);\n }\n }\n lContactoTotal.setModel(listaMostrar);\n }", "public List<message> getList() {\n return chats;\n }", "public void AfficherListProspect() throws Exception{\n laListeProspeect = Prospect_Db_Connect.tousLesProspects();\n laListeProspeect.forEach((p) -> {\n modelProspect.addRow(new Object[]{ p.getIdent(),\n p.getRaison(),\n p.getTypeSo(),\n p.getDomaine(),\n p.getAdresse(),\n p.getTel(),\n p.getCa(),\n p.getComment(),\n p.getNbrEmp(),\n p.getDateProspetc(),\n p.getInteretPropspect()});\n });\n }", "public String afficherInfoFichierTexte(){\n\t\tString fichierComplet = \"\";\n\t\tfor (Joueur j: ListJoueur) {\n\t\t\tfichierComplet += j.afficherFichierTexte();\n\t\t}\n\t\treturn fichierComplet;\n\t}", "public PanneauDiscussion(FenetreClient f) {\n // Initialisation des attributs du panneau de discussion\n this.couleurs = new ConcurrentHashMap<>();\n this.connectes = new JTextPane();\n this.discussion = new JTextPane();\n this.saisieMessage = new JTextArea(5, 28);\n this.btn = new JButton(\"Envoyer\");\n this.fenetre = f;\n this.choixMessage = new JComboBox<>();\n this.optionEnvoi = \"Tout le monde\";\n\n // Ajout de barres de scrolling pour la liste des personnes connectées et la\n // discussion\n JScrollPane scrollConn = new JScrollPane(connectes);\n scrollConn.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n JScrollPane scrollDisc = new JScrollPane(discussion);\n scrollDisc.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n scrollDisc.setPreferredSize(new Dimension(320, 350));\n\n // Les zones ou sont ecrit la liste des personnes connectees et celle de la\n // discussion ne sont evidemment pas editables\n this.connectes.setEditable(false);\n this.discussion.setEditable(false);\n\n // Gestion de la taille de la zone de discussion et la liste des personnes\n // connectees\n this.connectes.setPreferredSize(new Dimension(130, 80));\n this.connectes.setCaretPosition(connectes.getDocument().getLength());\n\n // Ajout d'un listener sur la zone de texte reservee au message\n this.saisieMessage.getDocument().addDocumentListener(new TextAreaListener());\n\n this.btn.setEnabled(false);\n\n // Ajout d'un listener sur le bouton\n this.btn.addActionListener(new ActionListener() {\n /**\n * Methode qui est appelee quand le client va cliquer sur le bouton 'Envoyer'\n * @param e evenement\n */\n @Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }\n });\n\n JPanel panelConnectes = new JPanel(new BorderLayout(10, 10));\n JPanel panelDiscussion = new JPanel(new BorderLayout(10, 10));\n JPanel panelChoixMessage = new JPanel();\n JPanel panelMessage = new JPanel(new BorderLayout(10, 10));\n JPanel panelDroit = new JPanel(new BorderLayout(10, 10));\n\n // Gestion de la partie gauche\n panelConnectes.add(new JLabel(\"Connectes\"), BorderLayout.NORTH);\n panelConnectes.add(scrollConn, BorderLayout.CENTER);\n\n // Gestion du panel avec la combobox\n panelChoixMessage.add(new JLabel(\"Message a \"));\n choixMessage.setPreferredSize(new Dimension(250,25));\n panelChoixMessage.add(choixMessage);\n\n // Ajout d'un listener sur la combobox\n choixMessage.addActionListener(new ActionListener(){\n /**\n * Methode qui est appelee quand met a jour l'option d'envoi choisi par le\n * client, chaque fois qu'il interagit avec la combobox\n * @param e evenement\n */\n @Override\n public void actionPerformed(ActionEvent e) {\n optionEnvoi = choixMessage.getItemAt(choixMessage.getSelectedIndex());\n }\n });\n\n // Gestion de la partie droite\n panelDiscussion.add(new JLabel(\"Discussion\"), BorderLayout.NORTH);\n panelDiscussion.add(scrollDisc, BorderLayout.SOUTH);\n\n panelMessage.add(panelChoixMessage, BorderLayout.NORTH);\n panelMessage.add(saisieMessage, BorderLayout.SOUTH);\n\n panelDroit.add(panelDiscussion, BorderLayout.NORTH);\n panelDroit.add(panelMessage, BorderLayout.CENTER);\n panelDroit.add(btn, BorderLayout.PAGE_END);\n\n // Accrochages des panels au PanneauDiscussion\n this.setLayout(new BorderLayout(25, 25));\n this.setBorder(new EmptyBorder(10, 10, 10, 10));\n this.add(panelDroit, BorderLayout.EAST);\n this.add(panelConnectes, BorderLayout.WEST);\n\n this.setPreferredSize(new Dimension(300, 450));\n }", "private void attacherReactions() {\n\t\tMailListeCtrl reception = new MailListeCtrl(this);\n\t\t\n\t\tnouveau.addActionListener(reception);\n\t\t\n\t\tsupprimer.addActionListener(reception);\n\t\t\n\t\tretour.addActionListener(reception);\n\t\t\n\t\tliste.addMouseListener(reception);\n\t}", "private ArrayList<String> getConectorQue(String infoDaPilha){\n\t\tArrayList<String> listaDeConectores = new ArrayList<String>();\n\t\t\n\t\tlistaDeConectores.add(\"que\");\n\t\t\n\t\treturn listaDeConectores;\n\t}", "private void remplirPriseEnCompte() {\r\n\t\tResultSet result = ctn.lectureData(\"SELECT * FROM PriseEnCompte\");\r\n\t\t// Remplissage tableau et combo Utilisateur\r\n\t\ttry {\r\n\t\t\twhile(result.next()) {\r\n\t\t\t\ttbPriseEnCompte.add(new StructPriseEnCompte(result.getLong(\"idPriseEnCompte\"), result.getString(\"Nom\"), result.getString(\"Description\")));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tctn.closeLectureData();\r\n\t\ttry {\r\n\t\t\tresult.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Feedback getFeedback();", "private void getParticipantes() {\n mParticipantes = estudioAdapter.getParticipantes(MainDBConstants.estado + \"= '\" + Constants.STATUS_NOT_SUBMITTED+ \"'\", null);\n //ca.close();\n }", "public ListeMessage() {\n\t\tmessagesEntrant = new ArrayList<Message>();\n\t\tmessagesSortant = new ArrayList<Message>();\n\t\tmessages = new ArrayList<Message>();\n\t}", "public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }", "public List<NotaDeCredito> procesar();", "public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }", "public ArrayList<String> getColaboradores() {\n return colaboradores;\n }", "public Collection getDemandasContribuyente() throws RemoteException, Exception {\n return this.demandasContribuyente;\n }", "List<Chat> getChats() throws CantGetChatException;", "private void viewSavedCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < courseList.getCourseList().size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(courseList.getCourseList().get(i));\n } else {\n System.out.println((i + 1) + \": \" + courseList.getCourseList().get(i).getName());\n }\n }\n }", "public List<Object> getListForum();", "private static void afficherLeslistes(List<List<Recette>> listeProposition) {\n\t\tfor (int i = 0; i < listeProposition.size(); i++) {\n\t\t\tList<Recette> liste = listeProposition.get(i);\n\t\t\tSystem.out.println(i + 1);\n\t\t\tfor (int s = 0; s < liste.size(); s++) {\n\t\t\t\tRecette recette = liste.get(s);\n\t\t\t\tString note = \"\";\n\t\t\t\tfor (int n = 0; n < recette.getNote(); n++) {\n\t\t\t\t\tnote += \"*\";\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\" - \" + recette.getNom() + \" (\" + note + \")\");\n\t\t\t}\n\t\t}\n\t}", "public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }", "public AddToChat(Point point,Controller c,user user) {\n initComponents();\n setLocation(point);\n controller=c;\n client=user;\n contacts=controller.getContactList(user);\n UsersName=new Vector<String>();\n for(int i=0;i<contacts.size();i++){\n UsersName.add(contacts.get(i).getUserName());\n }\n contactsList.setListData(UsersName);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setSize(278, 382);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setResizable(false);\n setVisible(true);\n \n }", "public String findAllFeedbackEligibleClass() {\n List<ClassBean> list = new ArrayList();\n int currentTime = UtilsManager.getCurrentTimestampInSeconds();\n List<ScheduledFeedbackBean> findAllEligibleSFB = new ScheduledFeedbackBean().findAllFeedbackEligibleClass(currentTime);\n for (ScheduledFeedbackBean sfb : findAllEligibleSFB) {\n list.add(sfb.getClassId());\n }\n return convertBeanToJson(list);\n }", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public ObservableList<String> AbmCorreos() {\n\t\t// crea un nuevo observable list\n\t\tObservableList<String> items = FXCollections.observableArrayList();\n\t\titems.addAll(\"Cargar Plantilla\", \"Mostrar Plantillas\");\n\t\treturn items;\n\t}", "ArrayList<Professor> professoresFormPend();", "public List<String> viewExams() {\n List<String> list = new ArrayList<>();\n if (examList.size() == 0) {\n list.add(\"No Exams have been created yet!\");\n } else {\n for (int i = 0; i < examList.size(); i++) {\n String entry = (i + 1) + \".\" + examList.get(i).toString();\n list.add(entry);\n }\n }\n return list;\n }", "public String infosPourList(){\n return nom+ \" , \" +promo.getNom();\n }", "public void afficherReclamationAdmin(ObservableList<Reclamation> oblist1){\n try {\n PreparedStatement pt1 = c.prepareStatement(\"SELECT id_r, message, etat, date_rec, reponse, prenom, nom FROM reclamation, user where idch=id_u and etat != 'Archivée'\");\n ResultSet rs = pt1.executeQuery();\n while (rs.next()) {\n String fetch = rs.getString(\"prenom\")+\" \"+rs.getString(\"nom\");\n System.out.println(rs.getString(\"reponse\"));\n oblist1.add(new Reclamation(rs.getInt(\"id_r\"), rs.getString(\"message\"), rs.getString(\"etat\"), rs.getString(\"date_rec\"), rs.getString(\"reponse\"), fetch));\n }\n } catch (SQLException ex) {\n Logger.getLogger(ReclamationCRUD.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public String getFeedback() {\n\t\treturn feedback;\n\t}", "public String getFeedback() {\n\t\treturn feedback;\n\t}", "private void viewActiveCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < activeCourseList.size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(activeCourseList.get(i));\n } else {\n System.out.println((i + 1) + \": \" + activeCourseList.get(i).getName());\n }\n }\n\n }", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "public void mostrarLectura(TomarLectura tomarLectura, Lectura lecturaActual);", "public static List<NotaDeCreditoDescuento> showForm(final List<Cargo> cargos){\n\t\tfinal NotasDeDescuentoModel model=new NotasDeDescuentoModel(cargos);\r\n\t\t//model.asignarFolio();\r\n\t\tfinal NotaDeDescuentoForm form=new NotaDeDescuentoForm(model);\r\n\t\tform.open();\r\n\t\tif(!form.hasBeenCanceled()){\r\n\t\t\treturn model.getNotas();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }", "public void ShowInTeacherList(){\n \n for (TeacherBean tb : t_list) {\n this.t_model.addElement(tb); \n }\n}", "public String showList() {\n String listMessage = \"Here yer go! These are all your tasks!\";\n return listMessage;\n }", "private void gestionDefaultLMessage(){\n\n TextView TV_MessageDefaut = (TextView) findViewById(R.id.id_messagebalise);\n ListView LV_ListAmis = (ListView) findViewById(R.id.LV_listeMessages);\n if (listeDiscussion!=null){\n if (listeDiscussion.isEmpty()){\n // Affiche le message par defaut\n TV_MessageDefaut.setText(R.string.MesDiscussions_noResutat);\n TV_MessageDefaut.setVisibility(View.VISIBLE);\n LV_ListAmis.setVisibility(View.GONE);\n\n }\n else{\n // Affiche la liste de discussion\n TV_MessageDefaut.setText(\"\");\n TV_MessageDefaut.setVisibility(View.GONE);\n LV_ListAmis.setVisibility(View.VISIBLE);\n\n }\n }\n\n }", "@Test\r\n\tpublic void retrieveAllFeedback() {\n\t\tassertNotNull(\"Check if there is valid Feedback arraylist to add to\", feedbackList);\r\n\t\tfeedbackList.add(fb1);\r\n\t\tfeedbackList.add(fb2);\r\n\t\tassertEquals(\"Check that Feedback arraylist size is 2\", 2, feedbackList.size());\r\n\r\n\t}", "protected List<String> listaVociCorrelate() {\n return null;\n }", "public List<Beheerder> selectActive(){\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker WHERE isactief = true ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }", "private void updateChat() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n ArrayList<String> messages = db.getChat(selectedCustomer.getChat_id());\n chat.getItems().clear();\n for(String mess :messages){\n chat.getItems().add(mess);\n }\n }", "private void insertLatestData() {\n String[] names = new String[feedbacks.size()];\n String[] ratings = new String[feedbacks.size()];\n String[] reviews = new String[feedbacks.size()];\n for (int i = 0; i < feedbacks.size(); i++) {\n names[i] = \"Name: \" + feedbacks.get(i).getName();\n ratings[i] = \"Rating: \" + feedbacks.get(i).getRatingBar();\n reviews[i] = \"Review: \" + feedbacks.get(i).getReview();\n }\n feedbackListAdapter = new FeedbackListAdapter(ViewPsmFeedbackActivity.this, names, ratings, reviews);\n listFeedback.setAdapter(feedbackListAdapter);\n }", "private void sendLecturer(LecturerDTO lecturerDTO) {\n if (lecturerDTO != null) {\n List<SubjectDTO> subjects = new ArrayList<>();\n try {\n subjects = dao.getLecturerDao().findSubjectsForLecturer(lecturerDTO);\n } catch (SQLException e) {\n System.err.println(\"Query failed.\");\n System.err.println(e.getMessage());\n }\n\n // hack to avoid nullpointer later\n if (subjects.size() == 0) {\n subjects.add(null);\n }\n\n sendMsgToClient(\n String.format(\"%-25s %s\",\n lecturerDTO.getName(),\n subjects.get(0) != null ? subjects.get(0).getShortName() : \"None\"\n )\n );\n\n if (subjects.size() < 2)\n return;\n\n for (int i = 1; i < subjects.size(); i++) {\n sendMsgToClient(\n String.format(\"%-25s %s\",\n \"\",\n subjects.get(i) != null ? subjects.get(i).getShortName() : \"\"\n )\n );\n }\n }\n }", "public List<Comment> showComment() {\n\t\treturn cdi.showComment();\n\t}", "public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "public void compare(ProjetBDD p){\n\t\tdoCorrespondance(p);\n\t\t//on compare les diagrammes en commun\n\t\tfor (int i = 0; i < p.getDiagrammes().size(); i++) {\n\t\t\tdiagrammes.get(i).compareTo(p.getDiagrammes().get(correspondance[i]));\n\t\t}\n\t\t//Si la list1 est la liste de départ et plus longue alors on met les restants dans un état supprimé\n\t\tif (diagrammes.size() > p.getDiagrammes().size()) {\n\t\t\tfor (int i = p.getDiagrammes().size(); i < diagrammes.size(); i++)\n\t\t\t\tdiagrammes.get(i).setEtat(DiagrammeObjets.SUPPR);\n\t\t}\n\t\t//Si la list1 est la liste de départ et plus courte alors on met les restants dans un état ajouté\n\t\telse if (diagrammes.size() > p.getDiagrammes().size()) {\n\t\t\tfor (int i = p.getDiagrammes().size(); i < diagrammes.size(); i++)\n\t\t\t\tdiagrammes.get(i).setEtat(DiagrammeObjets.ADD);\n\t\t}\n\t\telse if (diagrammes.size() == p.getDiagrammes().size()){}\n\t\t//Ne rien faire\n\t\telse\n\t\t\tSystem.out.println(\"ERROR (Comparateur - compare())\");\n\t\twriteDiff();\t\n\t}", "@Override\r\n\tpublic void utiliserEffetDivinite(ArrayList<Joueur> listejoueur, int j, ArrayList<Carte> collection,\r\n\t\t\tArrayList<Carte> table, int cible, ArrayList<Joueur> tourJoueur) {\n\t\t\r\n\t}", "@GetMapping(\"/afficher-contenu\")\r\n\tpublic List<PanierItem> afficherContenu(){\r\n\t\t\r\n\t\ttry{\r\n\t\t\treturn panierService.listerTout();\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n list = new javax.swing.JList<>();\n btnLog = new javax.swing.JButton();\n btnGroup = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jButton3 = new javax.swing.JButton();\n user = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n txtChat = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n btnSend = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtMess = new javax.swing.JTextArea();\n\n jButton1.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\ASUS-PC\\\\Downloads\\\\icons8-file-48.png\")); // NOI18N\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(204, 204, 204));\n\n list.setBackground(new java.awt.Color(240, 240, 240));\n jScrollPane1.setViewportView(list);\n\n btnLog.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnLog.setText(\"Log Out\");\n btnLog.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLogActionPerformed(evt);\n }\n });\n\n btnGroup.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n btnGroup.setText(\"Group\");\n btnGroup.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n btnGroupMousePressed(evt);\n }\n });\n btnGroup.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGroupActionPerformed(evt);\n }\n });\n\n jButton3.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\ASUS-PC\\\\Downloads\\\\10154750161582994861-128.png\")); // NOI18N\n\n user.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n user.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n user.addAncestorListener(new javax.swing.event.AncestorListener() {\n public void ancestorMoved(javax.swing.event.AncestorEvent evt) {\n }\n public void ancestorAdded(javax.swing.event.AncestorEvent evt) {\n userAncestorAdded(evt);\n }\n public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(user, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(user, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btnGroup, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnLog, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnGroup, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnLog, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n txtChat.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n jButton2.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\ASUS-PC\\\\Downloads\\\\icons8-file-48.png\")); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n btnSend.setForeground(new java.awt.Color(204, 255, 255));\n btnSend.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\ASUS-PC\\\\Downloads\\\\icons8-email-send-48.png\")); // NOI18N\n btnSend.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSendActionPerformed(evt);\n }\n });\n\n jButton4.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\ASUS-PC\\\\Downloads\\\\sticker (3).png\")); // NOI18N\n\n txtMess.setColumns(20);\n txtMess.setRows(5);\n jScrollPane2.setViewportView(txtMess);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jScrollPane2)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(txtChat, javax.swing.GroupLayout.PREFERRED_SIZE, 543, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnSend, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(25, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 62, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnSend, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)\n .addComponent(txtChat, javax.swing.GroupLayout.Alignment.LEADING))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "public Bouton_explications(Controleur controleur) {\n\t\tsuper(\"Comment jouer ?\");\n\t\tthis.setBackground(new Color(154,201,59));\n\t\tthis.setFont(new java.awt.Font(\"Serif\",1,25));\n\t\tthis.controleur = controleur;\n\t\tthis.addActionListener(this); // mets le bouton sur ecoute de la souris\n\t}", "public List<ChatPanel> getChats()\n {\n java.awt.Container container\n = (getChatTabCount() > 0) ? chatTabbedPane : mainPanel;\n int componentCount = container.getComponentCount();\n List<ChatPanel> chatPanels\n = new ArrayList<ChatPanel>(componentCount);\n\n for (int i = 0; i < componentCount; i++)\n {\n Component c = container.getComponent(i);\n\n if (c instanceof ChatPanel)\n chatPanels.add((ChatPanel) c);\n }\n return chatPanels;\n }", "public List<Laboratorio> getLaboratorios() {\n if(this.intentoLab){\n this.lab=f.consultarLaboratorios();\n this.intentoLab=false;\n }\n return this.lab; \n }", "public List<Feedback> getFeedback(String eventId) {\r\n\r\n Event e = DatabaseManager.getDatabaseManager().getEventFromID(eventId);\r\n if (e == null)\r\n return new ArrayList<>();\r\n return e.getFeedback();\r\n }", "private void updateLists(){\n subjects.clear();\n for(Message m : user.getMessages()){\n subjects.add(String.format(\"From - %-\" + (40 - m.getFrom().length()) +\"s %20s\", m.getFrom(), m.getTimestamp().substring(0,16)));\n }\n listViewAdapter.notifyDataSetChanged();\n }", "public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }", "public void setList() \n\t\t{\n\t\t\tVector<Course> items = client.ProfessorCourseList(prof.getID());\n\t\t\tmodel.removeAllElements();\n\t\t\tif(items == null)return;\n\t\t\tString s;\n\t\t\tfor(int i = 0; i < items.size(); i++)\n\t\t\t{\n\t\t\t\ts = items.get(i).getName();\n\t\t\t\tmodel.addElement(items.get(i));\n\t\t\t}\n\t\t}", "public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }", "public static List<Tweet> listedesderniertwitte(int idcompte)\n\t\t{\t\n\t\t\t\n\t\t\t\n\t\t\tList<Tweet> maliste= new ArrayList<Tweet>();\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t\n\t\t Connection maConnexion =DAO.getConnection();\n\t\t PreparedStatement st = maConnexion.prepareStatement(\"SELECT Tweet_Id FROM T_Tweet WHERE compte_id = (Select Followers_id from T_Followers where compte_id=?);\"); \n\t\t st.setInt(1, idcompte);\n\t\t \n\t\t ResultSet rs = st.executeQuery();\n\t\t \n\t\t \n\t\t while(rs.next())\n\t\t {\n\t\t \t\n\t\t \t\n\t\t \t int id=rs.getInt(1);\n\t\t \t Tweet monTweet= DAOTweet.tweetbyid(id);\n\t\t \t maliste.add(monTweet);\n\t\t \t\n\t\t \t \n\t\t \t \t \n\t\t }\n\t\t maConnexion.close();\n\t\t return maliste;\n\t\t\t\t}\n\t\t\t\tcatch(SQLException e)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn maliste;\n\n\t\t\t\n\t\t\n\t\t}", "public void oppdaterJliste()\n {\n bModel.clear();\n\n Iterator<Boligsoker> iterator = register.getBoligsokere().iterator();\n\n while(iterator.hasNext())\n bModel.addElement(iterator.next());\n }", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "@Override\n\tpublic List<Celebrite> recupererToutesLesCelebrites() {\n\t\tQuery req=em.createQuery(\"select c from Celebrite c \");\n\t\treturn req.getResultList();\n\t}", "@Override\r\n\t/**\r\n\t * Actionne l'effet de la carte.\r\n\t * \r\n\t * @param listejoueur\r\n\t * \t\t\tLa liste des joueurs de la partie.\r\n\t * @param cible\r\n\t * \t\t\tLa joueur contre qui l'effet sera joué.\r\n\t * @param table\r\n\t * \t\t\tCollection de cartes situées au centre de la table de jeu.\r\n\t * @param carte\r\n\t * \t\t\tLa carte qui joue l'effet.\r\n\t * @param j\r\n\t * \t\t\tLe joueur qui joue la carte.\r\n\t * @param collection\r\n\t * \t\t\tLe deck de cartes.\r\n\t * @param tourjoueur\r\n\t * \t\t\tLa liste des joueurs selon l'ordre de jeu.\r\n\t */\r\n\tpublic void utiliserEffet(ArrayList<Joueur> listejoueur, int cible, ArrayList<Carte> table, Carte carte,\r\n\t\t\tint j, ArrayList<Carte> collection,ArrayList<Joueur> tourjoueur) {\n\t\tcont = Controller.getInstance();\r\n\t\tint id = carte.getIdentifiantCarte();\r\n\t\tif (id ==9 || id ==10 || id==22 || id==23){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un croyant\");\r\n\t\t\t\t\r\n\t\t\t\tcont.setChoisirCible(true);\r\n\t\t\t\t\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\t\t\r\n\t\t\t\tif (listejoueur.get(cont.getChoixCible()).getNombreCroyantTotal()>0){\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierCroyant(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" n'a aucun croyant a sacrifier \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\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\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Croyant\");\r\n\t\t\tif (listejoueur.get(joueurCible).getNombreCroyantTotal()>0){\r\n\t\t\t\t\r\n\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor (int k=0;k<listejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true); // On rend possible l'utilisation de la carte\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\t\r\n\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierCroyant(true);\r\n\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierCroyant(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun croyant à sacrifier\");\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ( id==11){\r\n\t\t\tif (tourjoueur.get(j) == listejoueur.get(0)){\r\n\t\t\t\tSystem.out.println(\"Choisissez le Divinité qui sera forcer de sacrifier un guide\");\r\n\t\t\t\twhile(cont.getChoixCible()==-1){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(200);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(cont.getChoixCible()).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\t\r\n\t\t\t\tif(listejoueur.get(cont.getChoixCible()).getGuidePossede().size()>0){\r\n\t\t\t\t\tfor (int i=0;i<listejoueur.get(cont.getChoixCible()).getGuidePossede().size();i++){\r\n\t\t\t\t\t\tfor(int k=0;k<listejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().size();k++){\r\n\t\t\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).getGuidePossede().get(i).getCroyantPossede().get(k).setSelectionnee(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlistejoueur.get(cont.getChoixCible()).setDoitSacrifierGuide(true);\r\n\t\t\t\t\ttourjoueur.get(j).forcerAction(cont.getChoixCible(),listejoueur.get(cont.getChoixCible()).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t max = 0;\r\n\t\t\t\t\tjoueurCible =-1;;\r\n\t\t\t\tfor (int i=0; i<listejoueur.size();i++){\r\n\t\t\t\t\r\n\t\t\t\t\tif (listejoueur.get(i).getGuidePossede().size() > max){\r\n\t\t\t\t\tmax = listejoueur.get(i).getGuidePossede().size();\r\n\t\t\t\t\tjoueurCible = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Effet: Le \" +tourjoueur.get(j).getNom() + \" force le \" +listejoueur.get(joueurCible).getNom() + \" à sacrifier un Guide\");\r\n\t\t\t\tif (listejoueur.get(joueurCible).getGuidePossede().size()>0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i=0;i<listejoueur.get(joueurCible).getGuidePossede().size();i++){\r\n\t\t\t\t\t\t\tlistejoueur.get(joueurCible).getGuidePossede().get(i).setSelectionnee(true); // On rend possible l'utilisation de la carte\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlistejoueur.get(joueurCible).setDoitSacrifierGuide(true);\r\n\t\t\t\ttourjoueur.get(j).forcerAction(joueurCible,listejoueur.get(joueurCible).isDoitSacrifierGuide(), listejoueur,0,table,collection,tourjoueur);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Info : Le \" +listejoueur.get(joueurCible).getNom() + \" n'a aucun guide à sacrifier\");\r\n\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}\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "public void videListeClient(){\n couleurs.clear();\n }", "public void addTeacherWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 240, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 240, 100, 28);\n\n JLabel jLabelIdStudent = new JLabel(\"Saissisez l'ID du professeur à créer : \");\n jLabelIdStudent.setBounds(20, 20, 250, 28);\n\n JTextField jTextFieldId = new JTextField();\n jTextFieldId.setBounds(280, 20, 200, 28);\n\n JLabel jLabelEmail = new JLabel(\"Saissisez l'Email du professeur : \");\n jLabelEmail.setBounds(20, 48, 250, 28);\n\n JTextField jTextFielEmailPart1 = new JTextField();\n jTextFielEmailPart1.setBounds(280, 48, 100, 28);\n JTextField jTextFielEmailPart2 = new JTextField(\"@ece.fr\");\n jTextFielEmailPart2.setBounds(380, 48, 100, 28);\n\n JLabel jLabelPassword = new JLabel(\"Saissisez le mot de passe du professeur : \");\n jLabelPassword.setBounds(20, 80, 280, 28);\n\n JTextField jTextFieldPassword = new JTextField();\n jTextFieldPassword.setBounds(280, 80, 200, 28);\n\n JLabel jLabelLastName = new JLabel(\"Saissisez le nom du professeur : \");\n jLabelLastName.setBounds(20, 108, 250, 28);\n\n JTextField jTextFieldLastName = new JTextField();\n jTextFieldLastName.setBounds(280, 108, 200, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Saissisez le prénom du professeur : \");\n jLabelFirstName.setBounds(20, 140, 250, 28);\n\n JTextField jTextFieldFirstName = new JTextField();\n jTextFieldFirstName.setBounds(280, 140, 200, 28);\n\n JLabel jLabelSelectPromo = new JLabel(\"Selectionner une matière :\");\n jLabelSelectPromo.setBounds(20, 170, 250, 28);\n\n ArrayList<String> promotions = controllerAdmin.getAllIdCourse();\n String[] strCourse = new String[promotions.size()];\n for (int j = 0; j < promotions.size(); j++) {\n strCourse[j] = promotions.get(j);\n }\n JComboBox jComboBoxSelectCourse = new JComboBox(strCourse);\n jComboBoxSelectCourse.setBounds(280, 170, 100, 28);\n\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n addFrame.add(jLabelIdStudent);\n addFrame.add(jTextFieldId);\n addFrame.add(jLabelEmail);\n addFrame.add(jTextFielEmailPart1);\n addFrame.add(jTextFielEmailPart2);\n addFrame.add(jLabelPassword);\n addFrame.add(jTextFieldPassword);\n addFrame.add(jLabelLastName);\n addFrame.add(jTextFieldLastName);\n addFrame.add(jLabelFirstName);\n addFrame.add(jTextFieldFirstName);\n addFrame.add(jLabelSelectPromo);\n addFrame.add(jComboBoxSelectCourse);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n User user = new User();\n if (!jTextFieldId.getText().equals(\"\") && !jTextFielEmailPart1.getText().equals(\"\") && !jTextFieldFirstName.getText().equals(\"\") && !jTextFieldLastName.getText().equals(\"\")){\n if(!user.alreadyExist(jTextFieldId.getText())){\n Teacher teacher = new Teacher(jTextFieldId.getText(), jTextFielEmailPart1.getText() + jTextFielEmailPart2.getText(), jTextFieldPassword.getText(), jTextFieldLastName.getText(), jTextFieldFirstName.getText(), \"TEACHER\", Objects.requireNonNull(jComboBoxSelectCourse.getSelectedItem()).toString());\n teacher.createTeacher();\n }}\n else {\n addTeacherWindow(controllerAdmin);\n System.out.println(\"Erreur Id deja utilise\");\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n addFrame.dispose();\n }\n });\n\n addFrame.setTitle(\"Ajout d'un professeur\");\n addFrame.setSize(600,300);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "@Test\r\n\tpublic void getListOfAcceptedCandidates() throws Exception {\r\n\t\tList<FeedbackOFCandidate> feedbackList = new ArrayList<FeedbackOFCandidate>();\r\n\t\tFeedbackOFCandidate feedback =getFeedbackObject();\r\n\r\n\t\tUserDetails interviewer = getUserDetailsInterviewer();\r\n\t\tinterviewer.setUser(getInterviewerUser());\r\n\r\n\t\tInterview interview = getInterview();\r\n\t\tinterview.setInterviewer(interviewer);\r\n\r\n\t\tfeedback.setInterviewResult(INTERVIEW_RESULT_ACCEPT);\r\n\t\tfeedback.setInterview(interview);\r\n\t\tfeedback.setInterviewResult(ACCEPT_CANDIDATE);\r\n\r\n\t\tfeedbackList.add(feedback);\r\n\r\n\t\tList<FeedbackResponseDTO> feedbackResponseList = new ArrayList<FeedbackResponseDTO>();\r\n\t\tfeedbackResponseList.add(getFeedback());\r\n\r\n\t\twhen(feedbackRepository.getAcceptedCandidates(anyLong())).thenReturn(feedbackList);\r\n\t\twhen(interviewerService.getListOfAcceptedCandidates(anyLong())).thenReturn(feedbackResponseList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/listofacceptedcandidate/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "private void gestionPriseEnCompte() {\r\n\t\tString raison = new String(\"\");\r\n\t\tDate now = new Date();\r\n\t\tString strSql = \"\";\r\n\t\r\n if (tbAlarme.getRowCount() > 0) {\r\n \tif (tbAlarme.getSelectedRowCount() > 0) {\r\n\t\t int[] selection = tbAlarme.getSelectedRows();\r\n\t\t int indexSelection = selection[0];\r\n\t\t int idCapteur = mdlTpsReelAlarme.getIdCapteur(indexSelection); \r\n\t\t String strTypeAlarme = \"\";\r\n\t\t \r\n\t\t\t\t// Motif Prise En Compte seulement si appel Alert\r\n\t\t strTypeAlarme = (String) mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_TYPE_ALARME);\r\n\t\t if (strTypeAlarme.equals(\"Alarme\")) {\r\n\t\t\t\t\tint idPriseEnCompte = 0;\r\n\t\t \tdo {\r\n\t\t\t\t\t\tObject [] possibilites = new Object[tbPriseEnCompte.size()];\r\n\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\tpossibilites[i] = tbPriseEnCompte.get(i).getNom();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString strReponse = (String)JOptionPane.showInputDialog(this, \"Choisir un motif de prise en compte : \", \"Prise en compte\", JOptionPane.QUESTION_MESSAGE, null, possibilites, null);\r\n\t\t\t\t\t\tidPriseEnCompte = 1;\r\n\t\t\t\t\t\tif (strReponse != null) {\r\n\t\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\t\tif(strReponse.equals(tbPriseEnCompte.get(i).getNom())) {\r\n\t\t\t\t\t\t\t\t\tidPriseEnCompte = (int) tbPriseEnCompte.get(i).getId();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} // fin for\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"En attente\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// idPriseEncompte == 1 (Autres)\r\n\t\t\t\t\t\tif(idPriseEnCompte == 1) {\r\n\t\t\t\t\t\t\t// Demande de commentaire\r\n\t\t\t\t\t\t\traison = AE_Fonctions.saisieTexte(\"Veuillez entrer une raison : \", \"Raison commentaire ...\");\r\n\t\t\t\t\t\t\tif (raison == null) raison = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"---\";\r\n\t\t\t\t\t\t}\r\n\t\t \t} while(raison == \"\");\r\n\t\t \t\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET idPriseEnCompte = \" + idPriseEnCompte\r\n\t\t\t\t\t\t\t + \" , idUtilisateur = \" + EFS_Client_Variable.idUtilisateur\r\n\t\t\t\t\t\t\t + \" , CommentairePriseEnCompte = '\" + raison + \"'\"\r\n\t\t\t\t\t\t\t + \" WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setMotifIdPriseEncompte(indexSelection, idPriseEnCompte);\r\n\t\t } // fin if appelAlert\r\n\r\n\t\t if(mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE) == null) {\r\n\t\t\t\t\t// Date prise en compte\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET DatePriseEnCompte = sysdate, blPriseEnCompte = 1 WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setValueAt(now, indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t } // fin if datePrsieEnCompte\r\n\t\r\n\t\t // Prevenir le programme maitre\r\n\t\t AE_Fonctions.modifierMaitreViaClient(idCapteur, VIA_API_PRISE_EN_COMPTE);\r\n\t\t \r\n\t\t\t\t// Arret klaxon et Alert\r\n//\t\t\t\tgestionKlaxon(false);\r\n//\t\t\t\tgestionAlert(false);\r\n\t\t\t\t\r\n \t} else {\r\n \t JOptionPane.showMessageDialog(this, \"Vous devez sélectionner une ligne pour prendre en compte ...\",\r\n \t \t\t \"GTC Visualize - Programme Maitre\", JOptionPane.WARNING_MESSAGE);\r\n \t}\r\n } else {\r\n//\t\t\tgestionKlaxon(false);\r\n//\t\t\tgestionAlert(false);\r\n }\r\n\t}", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "ArrayList<String> showUsersRecive() throws SQLException {\r\n String queryMittente = \"SELECT DISTINCT username FROM users JOIN tweet on users.username = tweet.destinatario GROUP BY (username)\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> usersList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(queryMittente);\r\n while(resultSet.next()){\r\n String username = resultSet.getString(\"username\");\r\n usersList.add(username);\r\n }\r\n\r\n return usersList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }", "private void getMyCommunities()\n {\n progressBar.setVisibility(View.VISIBLE);\n controller.getMyCommunities(new AuthenticationAPIController(this).getTokken()\n , new GetCommunitiesCallback()\n {\n @Override\n public void success(List<Community> communityList)\n {\n progressBar.setVisibility(View.GONE);\n\n // show the communities in the fragment\n textViewMyCommunities.setVisibility(View.VISIBLE);\n if (communitiesListFragment != null)\n communitiesListFragment.setData(communityList);\n }\n\n @Override\n public void fail(String errorMessage)\n {\n progressBar.setVisibility(View.GONE);\n Snackbar.make(content, errorMessage, Snackbar.LENGTH_SHORT).show();\n }\n });\n }", "public List<Etudiant> afficher() {\n\t\treturn dao.afficher();\r\n\t}", "public List<ChatMessage> getChatMessages() {\n logger.info(\"**START** getChatMessages \");\n return messagesMapper.findAllMessages();\n }", "void afficherClassement() {\n classement.rechargerListeJoueur();\n CardLayout cl = (CardLayout) (container.getLayout());\n cl.show(container, \"Classement\");\n }" ]
[ "0.6449239", "0.62481236", "0.5898571", "0.58790344", "0.5714568", "0.56890976", "0.5686613", "0.5683569", "0.56608945", "0.5609879", "0.5600989", "0.55948186", "0.55879927", "0.556962", "0.5561415", "0.55605894", "0.5546587", "0.5543648", "0.5541389", "0.5512306", "0.5496657", "0.54896736", "0.54731745", "0.54608715", "0.54536957", "0.54450816", "0.54349923", "0.54339147", "0.53860104", "0.5374526", "0.5352489", "0.5348676", "0.5330199", "0.5329758", "0.5312656", "0.5309139", "0.53053755", "0.5299415", "0.52780277", "0.52749", "0.52603155", "0.5257108", "0.5246929", "0.5241992", "0.523505", "0.5234112", "0.5233921", "0.5228474", "0.5207816", "0.5205228", "0.5202398", "0.5195804", "0.51956177", "0.5190575", "0.5190575", "0.51888645", "0.51846683", "0.5180056", "0.5177088", "0.51740205", "0.51604", "0.5158871", "0.5158303", "0.5152846", "0.51474905", "0.514333", "0.51429373", "0.5142887", "0.5141707", "0.5138548", "0.5138011", "0.5137668", "0.5129547", "0.51243204", "0.51210946", "0.5119563", "0.5113831", "0.5111353", "0.51088756", "0.5101571", "0.5097707", "0.50967014", "0.50954443", "0.5076696", "0.507542", "0.50751364", "0.5070733", "0.50654805", "0.506235", "0.5057551", "0.5054708", "0.5051423", "0.5041545", "0.50386703", "0.503569", "0.50297207", "0.5025633", "0.5021221", "0.5020244", "0.5018232", "0.50150394" ]
0.0
-1
Designs partition ranges by sampling the given files. See the class comment for more details.
public static ValueRange[] designPartitions (SampleableTupleReader tupleReader, int partitioningColumnIndex, int numPartitions, int sampleSize) throws IOException { ColumnType type = tupleReader.getColumnType(partitioningColumnIndex); EquiWidthPartitioner<?, ?> partitioner; switch(type) { case DATE: case TIME: case TIMESTAMP: case BIGINT: partitioner = new EquiWidthPartitioner<Long, long[]>(type); break; case DOUBLE: partitioner = new EquiWidthPartitioner<Double, double[]>(type); break; case FLOAT: partitioner = new EquiWidthPartitioner<Float, float[]>(type); break; case INTEGER: partitioner = new EquiWidthPartitioner<Integer, int[]>(type); break; case SMALLINT: partitioner = new EquiWidthPartitioner<Short, short[]>(type); break; case BOOLEAN: case TINYINT: partitioner = new EquiWidthPartitioner<Byte, byte[]>(type); break; case VARBINARY: throw new IllegalArgumentException("partitioning by VARBINARY column is not supported"); case VARCHAR: partitioner = new EquiWidthPartitioner<String, String[]>(type); break; default: throw new IOException ("Unexpected column type:" + type); } return partitioner.design(tupleReader, partitioningColumnIndex, numPartitions, sampleSize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPartitions() {\n \tfor (int attrOrd : splitAttrs) {\n \t\tFeatureField featFld = schema.findFieldByOrdinal(attrOrd);\n \t\tif (featFld.isInteger()) {\n \t\t\t//numerical\n \t\t\tList<Integer[]> splitList = new ArrayList<Integer[]>();\n \t\t\tInteger[] splits = null;\n \t\t\tcreateNumPartitions(splits, featFld, splitList);\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (Integer[] thisSplit : splitList) {\n \t\t\t\tsplitHandler.addIntSplits(attrOrd, thisSplit);\n \t\t\t}\n \t\t} else if (featFld.isCategorical()) {\n \t\t\t//categorical\n \t\t\tint numGroups = featFld.getMaxSplit();\n \t\t\tif (numGroups > maxCatAttrSplitGroups) {\n \t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\"more than \" + maxCatAttrSplitGroups + \" split groups not allwed for categorical attr\");\n \t\t\t}\n \t\t\t\n \t\t\t//try all group count from 2 to max\n \t\t\tList<List<List<String>>> finalSplitList = new ArrayList<List<List<String>>>();\n \t\t\tfor (int gr = 2; gr <= numGroups; ++gr) {\n \t\t\t\tLOG.debug(\"num of split sets:\" + gr);\n \t\t\t\tList<List<List<String>>> splitList = new ArrayList<List<List<String>>>();\n \t\t\t\tcreateCatPartitions(splitList, featFld.getCardinality(), 0, gr);\n \t\t\t\tfinalSplitList.addAll(splitList);\n \t\t\t}\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (List<List<String>> splitSets : finalSplitList) {\n \t\t\t\tsplitHandler.addCategoricalSplits(attrOrd, splitSets);\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }", "public void partition();", "private void createNumPartitions(Integer[] splits, FeatureField featFld, \n \t\tList<Integer[]> newSplitList) {\n \t\tint min = (int)(featFld.getMin() + 0.01);\n \t\tint max = (int)(featFld.getMax() + 0.01);\n \t\tint binWidth = featFld.getBucketWidth();\n \tif (null == splits) {\n \t\t//first time\n \t\tfor (int split = min + binWidth ; split < max; split += binWidth) {\n \t\t\tInteger[] newSplits = new Integer[1];\n \t\t\tnewSplits[0] = split;\n \t\t\tnewSplitList.add(newSplits);\n \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n \t\t}\n \t} else {\n \t\t//create split based off last split that will contain one additinal split point\n \t\tint len = splits.length;\n \t\tif (len < featFld.getMaxSplit() -1) {\n\t \t\tfor (int split = splits[len -1] + binWidth; split < max; split += binWidth) {\n\t \t\t\tInteger[] newSplits = new Integer[len + 1];\n\t \t\t\tint i = 0;\n\t \t\t\tfor (; i < len; ++i) {\n\t \t\t\t\tnewSplits[i] = splits[i];\n\t \t\t\t}\n\t \t\t\tnewSplits[i] = split;\n\t \t\t\tnewSplitList.add(newSplits);\n\t \t\t\t\n\t \t\t\t//recurse to generate additional splits\n\t \t\t\tcreateNumPartitions(newSplits, featFld,newSplitList);\n\t \t\t}\n \t\t}\n \t}\n }", "Range selectAssignment(IntervalSet availableRanges, IntervalSet neededRanges, long blockSize);", "public BucketizedBloomCheckPartitioner(int targetPartitions, Map<HoodieFileGroupId, Long> fileGroupToComparisons,\n int keysPerBucket) {\n this.fileGroupToPartitions = new HashMap<>();\n\n Map<HoodieFileGroupId, Integer> bucketsPerFileGroup = new HashMap<>();\n // Compute the buckets needed per file group, using simple uniform distribution\n fileGroupToComparisons.forEach((f, c) -> bucketsPerFileGroup.put(f, (int) Math.ceil((c * 1.0) / keysPerBucket)));\n int totalBuckets = bucketsPerFileGroup.values().stream().mapToInt(i -> i).sum();\n // If totalBuckets > targetPartitions, no need to have extra partitions\n this.partitions = Math.min(targetPartitions, totalBuckets);\n\n // PHASE 1 : start filling upto minimum number of buckets into partitions, taking all but one bucket from each file\n // This tries to first optimize for goal 1 above, with knowledge that each partition needs a certain minimum number\n // of buckets and assigns buckets in the same order as file groups. If we were to simply round robin, then buckets\n // for a file group is more or less guaranteed to be placed on different partitions all the time.\n int minBucketsPerPartition = Math.max((int) Math.floor((1.0 * totalBuckets) / partitions), 1);\n LOG.info(String.format(\"TotalBuckets %d, min_buckets/partition %d\", totalBuckets, minBucketsPerPartition));\n int[] bucketsFilled = new int[partitions];\n Map<HoodieFileGroupId, AtomicInteger> bucketsFilledPerFileGroup = new HashMap<>();\n int partitionIndex = 0;\n for (Map.Entry<HoodieFileGroupId, Integer> e : bucketsPerFileGroup.entrySet()) {\n for (int b = 0; b < Math.max(1, e.getValue() - 1); b++) {\n // keep filled counts upto date\n bucketsFilled[partitionIndex]++;\n AtomicInteger cnt = bucketsFilledPerFileGroup.getOrDefault(e.getKey(), new AtomicInteger(0));\n cnt.incrementAndGet();\n bucketsFilledPerFileGroup.put(e.getKey(), cnt);\n\n // mark this partition against the file group\n List<Integer> partitionList = this.fileGroupToPartitions.getOrDefault(e.getKey(), new ArrayList<>());\n partitionList.add(partitionIndex);\n this.fileGroupToPartitions.put(e.getKey(), partitionList);\n\n // switch to new partition if needed\n if (bucketsFilled[partitionIndex] >= minBucketsPerPartition) {\n partitionIndex = (partitionIndex + 1) % partitions;\n }\n }\n }\n\n // PHASE 2 : for remaining unassigned buckets, round robin over partitions once. Since we withheld 1 bucket from\n // each file group uniformly, this remaining is also an uniform mix across file groups. We just round robin to\n // optimize for goal 2.\n for (Map.Entry<HoodieFileGroupId, Integer> e : bucketsPerFileGroup.entrySet()) {\n int remaining = e.getValue() - bucketsFilledPerFileGroup.get(e.getKey()).intValue();\n for (int r = 0; r < remaining; r++) {\n // mark this partition against the file group\n this.fileGroupToPartitions.get(e.getKey()).add(partitionIndex);\n bucketsFilled[partitionIndex]++;\n partitionIndex = (partitionIndex + 1) % partitions;\n }\n }\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Partitions assigned per file groups :\" + fileGroupToPartitions);\n StringBuilder str = new StringBuilder();\n for (int i = 0; i < bucketsFilled.length; i++) {\n str.append(\"p\" + i + \" : \" + bucketsFilled[i] + \",\");\n }\n LOG.debug(\"Num buckets assigned per file group :\" + str);\n }\n }", "public void partition() \n\t{\n\t\tXPath xPath = getXPathHandler();\n\t\tNodeList parentNodes;\n\t\ttry {\n\t\t\tparentNodes = (NodeList)xPath.compile(this.getParentContainerXPath()).evaluate(this.document, XPathConstants.NODESET);\n\t\t\t\n\t\t\tlogger.info(\">>> \" + this.getPartitionType().name() + \" Partitioner: partition()\");\n\t\t\t\n\t\t\tfor (int i = 0; i < parentNodes.getLength(); i++) \n\t\t\t{ \t\n\t\t\t\tNode parentNode = (Node)parentNodes.item(i);\n\t\t\t\t\n\t\t\t\tif (parentNode instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString sParentClass = parentNode.getAttributes().getNamedItem(\"class\") != null ? parentNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t\tlogger.info(\"\\tParent Node Name=\" + parentNode.getNodeName()+\":class=\"+ sParentClass);\n\t\t\t\t\t\n\t\t\t\t\tNodeList nodeList = parentNode.getChildNodes();\n\t\t\t\t\tNode xDivNode = null;\n\t\t\t\t\t\n\t\t\t\t\tNode xIntroDivNode = this.document.createElement(\"div\");\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"class\", this.getPartitionTypeAsString());\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"title\", this.getIntroPartitionTitle());\n\t\t\t\t\t\n\t\t\t\t\tboolean first = true;\n\t\t\t\t\tboolean keepFirst = this.getKeepFirstElements();\n\t\t\t\t\tboolean hasIntroNode = false;\n\t\t\t \n\t\t\t\t\tfor (int j = 0, pCount = 0; j < nodeList.getLength(); j++) \n\t\t\t\t\t{ \t\n\t\t\t \tNode xNode = nodeList.item(j);\n\t\t\t \tif (xNode instanceof Element)\n\t\t\t \t{\n\t\t\t \t\tif (first && keepFirst)\n\t\t\t \t\t{\n\t\t\t \t\t\tif (!hasIntroNode) {\n\t\t\t\t \t\t\t((Element)xIntroDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t \t\t\t\tDomUtils.insertBefore(xIntroDivNode, xNode);\t\t \t\t\t\t\n\t\t\t\t \t\t\tj++;\n\t\t\t\t \t\t\thasIntroNode = true;\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\tString sClass = xNode.getAttributes().getNamedItem(\"class\") != null ? xNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t \tboolean isTable = xNode.getNodeName().equalsIgnoreCase(\"table\") ? true : false;\n\t\t\t\t \tString sId = isTable && xNode.getAttributes().getNamedItem(\"id\") != null ? xNode.getAttributes().getNamedItem(\"id\").getNodeValue() : \"\";\n\t\t\t\t \t\n\t\t\t\t \tif (sClass != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\tNode Name=\" + xNode.getNodeName()+\":class=\"+ sClass);\n\t\t\t\t \t\t\n\t\t\t\t \t\tboolean match = false;\n\t\t\t\t \t\tswitch ((TaskExprType)this.getAttributeMatchExpression())\n\t\t\t\t \t\t{\n\t\t\t\t \t\tcase NOT_SET:\n\t\t\t\t \t\tcase STARTS_WITH:\n\t\t\t\t \t\t\tmatch = sClass.startsWith(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\tcase CONTAINS:\n\t\t\t\t \t\t\tmatch = sClass.contains(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\t// Process the title name match condition if it exists\n\t\t\t\t \t\tString title = null;\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\ttitle = DomUtils.extractTextChildren(xNode);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameMatchCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\tif (title != null && this.getTitleNameMatchType() == TaskMatchType.EXPR)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\tswitch ((TaskExprType)this.getTitleNameMatchExprType())\n\t\t\t\t\t \t\t\t\t{\n\t\t\t\t\t \t\t\t\t\tcase STARTS_WITH:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.startsWith(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase CONTAINS:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.contains(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase NOT_SET:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tdefault:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t \t\t\t} else if (this.getTitleNameMatchType() == TaskMatchType.REGEX)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t\t \t\t\tPattern r = Pattern.compile(this.getTitleNameMatchRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tmatch = m.matches();\n\t\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\tif (first)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPartition partition = new Partition();\n\t\t\t\t \t\t\t\tpartition.setType(this.getPartitionType());\n\t\t\t\t \t\t\t\tpartition.setsId(sId);\n\t\t\t\t \t\t\t\tthis.setFirstPartition(partition);\n\t\t\t\t \t\t\t}\n\n\t\t\t\t \t\t\tfirst = false;\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameReplaceCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPattern r = Pattern.compile(this.getTitleNameReplaceRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\n\t\t\t\t\t \t\t\ttitle = m.replaceAll(this.getTitleNameReplaceWithRegexPattern());\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\txDivNode = this.document.createElement(\"div\");\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"class\", getPartitionTypeAsString());\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"title\", title);\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tDomUtils.insertBefore(xDivNode, xNode);\n\t\t\t\t \t\t\tDomUtils.removeElement((Element) xNode, false);\t \n\t\t\t\t \t\t}\n\t\t\t\t \t\telse\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t} else if (isTable && sId != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\t\\tNode Name=\" + xNode.getNodeName()+\":id=\"+ sId);\n\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t\t \t}\t \t\n\t\t\t \t}\n\t\t\t } // end for j\n\t\t\t\t} // end if parentNode\n\t\t\t} // end for i\n\t\t} catch (XPathExpressionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t\n\t}", "public void doPartition() {\n int sum = 0;\n for (int q = 0; q < w.queryCount; q++) {\n for (int a = 0; a < w.attributeCount; a++) {\n sum += w.usageMatrix[q][a];\n }\n }\n\n if (sum == w.queryCount * w.attributeCount) {\n partitioning = new int[w.attributeCount];\n return;\n }\n\n\t\t//ArrayUtils.printArray(usageMatrix, \"Usage Matrix\", \"Query\", null);\n\t\t\n\t\t// generate candidate partitions (all possible primary partitions)\n\t\tint[][] candidatePartitions = generateCandidates(w.usageMatrix);\n\t\t//ArrayUtils.printArray(candidatePartitions, \"Number of primary partitions:\"+candidatePartitions.length, \"Partition \", null);\n\t\t\n\t\t// generate the affinity matrix and METIS input file \n\t\tint[][] matrix = affinityMatrix(candidatePartitions, w.usageMatrix);\n\t\t//ArrayUtils.printArray(matrix, \"Partition Affinity Matrix Size: \"+matrix.length, null, null);\n\t\twriteGraphFile(graphFileName, matrix);\n\t\t\n\t\t// run METIS using the graph file\n\t\ttry {\n\t\t\tProcess p = Runtime.getRuntime().exec(metisLocation+\" \"+graphFileName+\" \"+K);\n\t\t\tp.waitFor();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\t// read primary partition groups created by METIS \n\t\tint[][][] primaryPartitionGroups = readPartitionFile(candidatePartitions); // TODO exception here for too few groups or attributes...\n\t\t//for(int[][] primaryPartitionGroup: primaryPartitionGroups)\n\t\t//\tArrayUtils.printArray(primaryPartitionGroup, \"Partition Group\", \"Partition\", null);\n\t\t\n\t\t\n\t\t//int i=0;\n\t\tList<int[][]> bestLayouts = new ArrayList<int[][]>();\n\t\tfor(int[][] primaryPartitionGroup: primaryPartitionGroups){\n\t\t\tminCost = Double.MAX_VALUE;\n\t\t\t\n\t\t\t// Candidate Merging\n\t\t\t//System.out.println(\"Primary Partition Group:\"+(i+1));\n\t\t\tList<BigInteger> mergedCandidatePartitions = mergeCandidates(primaryPartitionGroup);\n\t\t\t//System.out.println(\"Number of merged partitions:\"+mergedCandidatePartitions.size());\n\t\t\t\n\t\t\t// Layout Generation\n\t\t\tgenerateLayout(mergedCandidatePartitions, primaryPartitionGroup);\n\t\t\tbestLayouts.add(bestLayout);\t\t\t\n\t\t\t//ArrayUtils.printArray(bestLayout, \"Layout:\"+(++i), null, null);\n\t\t}\n\t\t\n\t\t// Combine sub-Layouts\n\t\tList<int[][]> mergedBestLayouts = mergeAcrossLayouts(bestLayouts, bestLayouts.size());\n\t\tpartitioning = PartitioningUtils.getPartitioning(mergedBestLayouts);\n\t}", "@ParameterizedTest\n @CsvSource(value = {\"0,7\", \"8,15\", \"16,23\", \"24,31\", \"0,23\", \"13, 29\"})\n void sliceGetsCorrectSignals(int min, int max) {\n //create range obj with inputs\n IRange range = new SimpleRange(min, max);\n\n //create bus of width 64 with random values\n Random r = new Random();\n int busWidth = 32;\n ISignal[] sigs = new ISignal[busWidth];\n for (int i=0; i<busWidth; i++) {\n sigs[i] = new SimpleSignal(r.nextBoolean());\n }\n IBus busToSlice = new Bus(sigs);\n\n //sliceBus the bus\n IBus result = Util.sliceBus(range, busToSlice);\n\n //need to get values from sliceBus to test\n int rangeWidth = range.getMax() - range.getMin();\n assertEquals(collectValuesFromBus(range, busToSlice), collectValuesFromBus(new SimpleRange(0, rangeWidth), result));\n\n //sweep in 8-bit slices across the bus to see if we're getting the correct range from the sliceBus util\n int numBitsInSweep = 8;\n int numSweeps = busWidth/numBitsInSweep;\n for (int i=0; i<numSweeps; i++) {\n int start = i*numBitsInSweep;\n int end = start + numBitsInSweep - 1;\n IBus slice = Util.sliceBus(new SimpleRange(start, end), busToSlice);\n }\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Usage: java PE1910_SplitFiles souceFile numberOfPieces\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t// Get number of pieces\n\t\tint numberOfPiecesArg = Integer.parseInt(args[1]);\n\n\t\t// Get Source file and create input stream for it\n\t\tBufferedInputStream inputArg = new BufferedInputStream(new FileInputStream(\n\t\t\t\tnew File(\"C:/Java/examples/\" + args[0])));\n\n\t\t// Get fileName and extension of the source file\n\t\tFile sourceFileArg = new File(\"C:/Java/examples/\" + args[0]);\n\t\tString fileNameArg = sourceFileArg.getName().substring(0, sourceFileArg.getName().length() - 4);\n\n\t\t// Get fileSize and size of the split file\n\t\tlong fileSizeArg = inputArg.available();\n\t\tint partArg = (int)\n\t\t\t\tMath.ceil(1.0 * fileSizeArg / numberOfPiecesArg);\n\t\tSystem.out.println(partArg);\n\t\t// Copy the content of the sourceFile into split files\n\t\tfor (int i = 0; i < numberOfPiecesArg; i++) {\n\t\t\tBufferedOutputStream outputArg = new BufferedOutputStream(\n\t\t\t\t\tnew FileOutputStream(new File(\"C:/Java/examples/\" + fileNameArg + \".part\" + i)));\n\t\t\tint value;\n\t\t\tint numberOfBytesArg = 0;\n\t\t\twhile (numberOfBytesArg++ < partArg && (value = inputArg.read()) != -1) {\n\t\t\t\toutputArg.write(value);\n\t\t\t}\n\t\t\toutputArg.close();\n\t\t}\n\t\t\n\t\tinputArg.close();\n\t\tSystem.out.println(\"[\" + sourceFileArg.length() + \"]\");\n\n\t}", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "public List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);", "public static void main(String[] args) {\n\t\tint p_numbers = 3; // Partition Numbers\r\n\t int p_size = 5;\r\n\t int z_exponent = 1;\t \t \t \t \r\n\t int d = 0;\r\n\t int d_start = 0;\r\n\t int d_end = p_size;\r\n\t double mu = 0.0;\r\n\t double sigma = 1.0;\r\n\t double z, c, c_rand, n;\r\n\t\t\t \t \r\n\t ZipfDistribution zipf;\t// Parameters = Number of Elements, Exponent \t\t \t \t \t \t \t \r\n\t RandomDataGenerator randData = new RandomDataGenerator();\r\n\t RandomDataGenerator rand = new RandomDataGenerator();\r\n\t rand.reSeed(0);\r\n\t \r\n\t for(int p = 0; p < p_numbers; p++) {\r\n\t \tzipf = new ZipfDistribution(p_size, z_exponent); \r\n\t \tzipf.reseedRandomGenerator(p);\r\n\t \trandData.reSeed(p);\t\t \r\n\t \t\r\n\t \tfor(d = d_start; d < d_end; d++) {\r\n\t \t\tz = randData.nextZipf(p_size, z_exponent);\r\n\t \t\tz += d_start;\r\n\t \t\t\r\n\t \t\tif(z > d_end) z -= 1;\r\n\t \t\t\r\n\t \t\tc = zipf.cumulativeProbability((d - d_start));\r\n\t \t\tc_rand = zipf.cumulativeProbability(((int)z - d_start));\r\n\t \t\t\r\n\t \t\t//n = rand.nextGaussian(mu, sigma);\r\n\t \t\tn = rand.nextUniform(0.0, 1.0);\r\n\t\t \r\n\t\t \tSystem.out.println(p+\" \"+d+\" \"+c+\" \"+(int)z+\" \"+c_rand+\" \"+n);\r\n\t \t}\r\n\t \t\r\n\t \td_start = d_end;\r\n\t \td_end = (d + p_size);\t \t\r\n\t }\t \r\n\t}", "public VirtualDataSet[] partitionByNumericAttribute(int attributeIndex, int valueIndex) {\n\t\t// WRITE YOUR CODE HERE!\n\n\t\t if(attributes[attributeIndex].getType()==AttributeType.NOMINAL){ \t\t\t\t\t\t\t// avoid passing through nominal value to current method\n return null; \n }\n\t\t\tVirtualDataSet [] partitions = new VirtualDataSet[2]; \t\t\t\t\t\t\t\t\t// creates two split path \n\n\t\t\tdouble split = Double.parseDouble(getValueAt(valueIndex , attributeIndex));\t\t\t// determine the middle number in order to split \n\t\t\t\n\t\t\tLinkedList<Integer> rowsLess = new LinkedList<Integer> (); \t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tLinkedList<Integer> rowsMore = new LinkedList<Integer> ();\t\t\t\t\t\t\t\t// using linkedlist to do collection of split rows that less than valueIndex value\n\t\t\t\n\t\t\tint countLess = 0;\n\t\t\tint countMore = 0; \n\n\t\t\tString []arrayOfNums = attributes[attributeIndex].getValues();\n\n\t\t\tfor(int j = 0; j < source.numRows; j++){ \n\t\t\t\t\n\t\t\t\tif(Double.parseDouble(getValueAt(j,attributeIndex)) <= split){ \t\t\t\t// transform from string to integer in order to compare the number smaller than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsLess.add(j);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountLess++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}else if(Double.parseDouble(getValueAt(j,attributeIndex)) > split){\t\t\t// transform from string to integer in order to compare the number bigger than middle number\n\t\t\t\t\t\n\t\t\t\t\trowsMore.add(j); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add rows that correspond with the current attribute of spliting \n\t\t\t\t\tcountMore++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// determine the size of partition rows array \n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint [] partitionRowsLess = new int [countLess]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that smaller than middle number\n\t\t\tint [] partitionRowsMore = new int [countMore]; \t\t\t\t\t\t\t\t\t\t// the collection of rows represents all number that bigger than middle number\n\t\t\tfor(int k = 0; k < countLess; k++){\n\t\t\t\tpartitionRowsLess[k] = rowsLess.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\tfor(int k = 0; k < countMore; k++){\n\t\t\t\tpartitionRowsMore[k] = rowsMore.poll(); \t\t\t\t\t\t\t\t\t\t\t// transform from linkedlist to array \n\t\t\t}\n\t\t\t\n\t\t\tpartitions[0] = new VirtualDataSet(source,partitionRowsLess, attributes); \t\t\t\t// send partition to VirtualDataSet constructor \n\t\t\tpartitions[1] = new VirtualDataSet(source,partitionRowsMore, attributes); \n\t\t\t\n\n\n\t\t\treturn partitions;\n\t\t\n\t}", "private void loadPartition(Path p, Context context) throws IOException {\n\t\treader = new BufferedReader(new FileReader(p.toString()));\n\t\tString inputline = reader.readLine();\n\t\tString[] input;\n\t\twhile (inputline != null) {\n\t\t\tinput = inputline.split(\"\\t\");\n\t\t\tlong key=Long.parseLong(input[0].replace(\"\\\"\", \"\"));\n\t\t\tString[] corners=input[1].split(\",\");\n\t\t\tpartition.put(key, new partition.Rectangle(corners[0].replace(\"\\\"\", \"\"),corners[1]\n\t\t\t\t\t.replace(\"\\\"\", \"\"),\n\t\t\t\t\tcorners[2].replace(\"\\\"\", \"\")\n\t\t\t\t\t,corners[3].replace(\"\\\"\", \"\")));\n\t\t\tinputline = reader.readLine();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "@Test\n public void testMultiLevelPartitionPruning() throws SqlParseException {\n\n val project = \"multi_level_partition\";\n val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\";\n val expectedRanges = Lists.<Pair<String, String>> newArrayList();\n val segmentRange1 = Pair.newPair(\"2012-01-01\", \"2012-01-02\");\n val segment1Uuid = \"8892fa3f-f607-4eec-8159-7c5ae2f16942\";\n val segmentRange2 = Pair.newPair(\"2012-01-02\", \"2012-01-03\");\n val segment2Uuid = \"d75a822c-788a-4592-a500-cf20186dded1\";\n val segmentRange3 = Pair.newPair(\"2012-01-03\", \"2012-01-04\");\n val segment3Uuid = \"54eaf96d-6146-45d2-b94e-d5d187f89919\";\n val segmentRange4 = Pair.newPair(\"2012-01-04\", \"2012-01-05\");\n val segment4Uuid = \"411f40b9-a80a-4453-90a9-409aac6f7632\";\n val segmentRange5 = Pair.newPair(\"2012-01-05\", \"2012-01-06\");\n val segment5Uuid = \"a8318597-cb75-416f-8eb8-96ea285dd2b4\";\n val expectedPartitionMap = Maps.<String, List<Long>> newHashMap();\n\n val sqlBase = \"select cal_dt, sum(price) from test_kylin_fact inner join test_account on test_kylin_fact.seller_id = test_account.account_id \";\n\n // no filter\n val noFilterSql = sqlBase + \"group by cal_dt\";\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedRanges.add(segmentRange4);\n expectedRanges.add(segmentRange5);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(0L, 1L, 2L, 3L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(0L, 1L, 2L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L, 2L, 3L));\n expectedPartitionMap.put(segment4Uuid, Lists.newArrayList(0L, 1L));\n expectedPartitionMap.put(segment5Uuid, Lists.newArrayList(2L, 3L));\n assertPrunedSegmentsRange(project, noFilterSql, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val andSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_site_id = 1 group by cal_dt\";\n val andMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n val andMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_site_id = 1 and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n expectedRanges.clear();\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedPartitionMap.clear();\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L));\n assertPrunedSegmentsRange(project, andSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, andMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, andMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val notInSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_site_id not in (0, 2, 3) group by cal_dt\";\n val notInMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_format_name not in ('FP-GTC', 'ABIN', 'Auction') group by cal_dt\";\n val notInMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_site_id not in (0, 2, 3) and lstg_format_name not in ('FP-GTC', 'ABIN', 'Auction') group by cal_dt\";\n expectedRanges.clear();\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedPartitionMap.clear();\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L));\n assertPrunedSegmentsRange(project, notInSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, notInMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, notInMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n // return empty data case\n val emptyData = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 5 group by cal_dt\";\n val emptyDataMapping = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_format_name = 'not_exist_name' group by cal_dt\";\n val emptyDataMix = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 5 and lstg_format_name = 'not_exist_name' group by cal_dt\";\n expectedRanges.clear();\n expectedPartitionMap.clear();\n assertPrunedSegmentsRange(project, emptyData, dfId, expectedRanges, -1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, emptyDataMapping, dfId, expectedRanges, -1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, emptyDataMix, dfId, expectedRanges, -1L, expectedPartitionMap);\n\n // query data out of current built segments range\n val inSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_site_id in (1, 2) group by cal_dt\";\n val inMappingSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_format_name in ('FP-non GTC', 'ABIN') group by cal_dt\";\n val inMixSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_site_id in (1, 2) and lstg_format_name in ('FP-non GTC', 'ABIN') group by cal_dt\";\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(1L, 2L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L, 2L));\n assertPrunedSegmentsRange(project, inSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, inMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, inMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val pushDownSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 3 group by cal_dt\";\n assertNoRealizationFound(project, pushDownSql0);\n\n val pushDownMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_format_name = 'Auction' group by cal_dt\";\n assertNoRealizationFound(project, pushDownMappingSql0);\n\n val pushDownMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 3 and lstg_format_name = 'Auction' group by cal_dt\";\n assertNoRealizationFound(project, pushDownMixSql0);\n\n // return empty result\n val wrongMapping0 = sqlBase\n + \"where cal_dt between '2012-01-01' and '2012-01-02' and lstg_site_id = 0 and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n assertPrunedSegmentsRange(project, wrongMapping0, dfId, null, -1L, null);\n\n val orSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-02' and (lstg_site_id = 0 or lstg_format_name = 'FP-non GTC') group by cal_dt\";\n expectedRanges.clear();\n expectedPartitionMap.clear();\n expectedRanges.add(segmentRange1);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(0L, 1L));\n assertPrunedSegmentsRange(project, orSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n }", "public static void splitFile() throws IOException{\n\t\tPath currentRelativePath = Paths.get(\"\");\n\t\tFile file = new File(currentRelativePath.toAbsolutePath().toString()+\"/\"+fileName);\n\n\t\t//fileChunks are of size windowSize\n\t\tint num = fileSize; \n\t\tint lastByteRead = 0;\n\t\tint start =0;\n\t\tint i= 0; //where we are in bitfield map\n\t\tbyte[] fileChunkArray = new byte[windowSize];\n\t\t//read in the file\n\t\ttry{\n\t\t\tFileInputStream fileInputStream = new FileInputStream(file);\n\t\t\twhile(num > 0){\n\t\t\t\tif (num <= 5){\n\t\t\t\t\twindowSize = num;\n\t\t\t\t}\n\t\t\t\t// byte[] fileChunkArray = new byte[windowSize];\n\t\t\t\t\n\t\t\t\tlastByteRead = fileInputStream.read(fileChunkArray,0,windowSize);\n\t\t\t\t\n\t\t\t\t// start = start +windowSize;\n\t\t\t\t\n\t\t\t\t// String s1 = new String(fileChunkArray);\n\t\t\t\tSystem.out.print(\"the chunkarray length is :\" + fileChunkArray.length);\n\t\t\t\tSystem.out.print(\"the lastbyte read is :\"+ lastByteRead);\n\t\t\t\t// System.out.print(\"the fileChunk array is :\"+ s1);\n\t\t\t\tbitfieldMap.put(lastByteRead,fileChunkArray);\n\t\t\t\ti++;\n\t\t\t\tdynamicName = fileName+ i;\n\t\t\t\tworkingDirectory = System.getProperty(\"user.dir\");\n\t\t\t\tabsoluteFilePath = workingDirectory + File.separator + dynamicName;\n\t\t\t\tnum = num - windowSize; \n\t\t\t\tFileOutputStream newFile = new FileOutputStream(absoluteFilePath);\n\t\t\t\tnewFile.write(fileChunkArray);\n\t\t\t\tnewFile.flush();\n\t\t\t\tnewFile.close();\n\n\t\t\t}\n\t\t\tfileInputStream.close();\t\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"Could not split file: \" + ioe);\n\t\t}\n\t}", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "private static ArrayList<ArrayList<Integer>> generatePartition(int n) {\n \tArrayList<ArrayList<Integer>> partitions = new ArrayList<>();\n \t// store the partition in non-increasing order, each value should be larger than 1\n \tInteger[] partition = new Integer[n];\n \t// the first partition is n itself\n \tpartition[0] = n;\n \tpartitions.add(new ArrayList<Integer>(Arrays.asList(Arrays.copyOf(partition, 1))));\n \t// if all value are 2, then it can not partition any further\n \tint k = 0;\n \twhile (partition[0] > 2) {\n \t\t// generate next partition\n \t\tint remain = 0;\n \t\t// find the rightmost value which is larger than 2\n \t\twhile (partition[k] < 3) {\n \t\t\tremain += partition[k];\n \t\t\tk--;\n \t\t}\n \t\tpartition[k]--;\n \t\tremain++;\n \t\t// if remain is more, divide it in different values of size partition[k]\n \t\twhile (remain > partition[k]) {\n \t\t\tpartition[k + 1] = partition[k];\n \t\t\tremain -= partition[k];\n \t\t\tk++;\n \t\t}\n \t\tpartition[k + 1] = remain;\n \t\tk++;\n \t\t// ignore all partitions contain value 1\n \t\tif (partition[k] > 1) {\n \t\t\tpartitions.add(new ArrayList<Integer>(Arrays.asList(Arrays.copyOf(partition, k + 1))));\n \t\t}\n \t}\n \treturn partitions;\n }", "public static ValueRange[] designPartitions (SampleableTupleReader tupleReader, int partitioningColumnIndex, int numPartitions) throws IOException {\n return designPartitions(tupleReader, partitioningColumnIndex, numPartitions, DEFAULT_SAMPLE_SIZE);\n }", "private void getPartition(PointList customers){\n\t\t\n\t\tsplitByQuadrant(customers);\n\t\tsplitByLine(customers);\n\t\t\n\t}", "private void createFiles(CodeGeneratorConfiguration config,\n \t\t\tString pathPrefix, ProgressFunction progressFunction,\n \t\t\tlong schemaElements, long currentCount, long interval)\n \t\t\tthrows GraphIOException {\n \t\tGraphCodeGenerator graphCodeGenerator = new GraphCodeGenerator(\n \t\t\t\tgraphClass, packagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, name,\n \t\t\t\tconfig);\n \t\tgraphCodeGenerator.createFiles(pathPrefix);\n \n \t\tfor (VertexClass vertexClass : graphClass.getVertexClasses()) {\n \t\t\tVertexCodeGenerator codeGen = new VertexCodeGenerator(vertexClass,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\tcodeGen.createFiles(pathPrefix);\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tfor (EdgeClass edgeClass : graphClass.getEdgeClasses()) {\n \t\t\tCodeGenerator codeGen = new EdgeCodeGenerator(edgeClass,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\tcodeGen.createFiles(pathPrefix);\n \n \t\t\tif (!edgeClass.isAbstract()) {\n \t\t\t\tcodeGen = new ReversedEdgeCodeGenerator(edgeClass,\n \t\t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\t\tcodeGen.createFiles(pathPrefix);\n \t\t\t}\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// build records and enums\n \t\tfor (Domain domain : getRecordDomains()) {\n \t\t\t// also generate an abstract class for Records\n \t\t\tCodeGenerator rcode = new RecordCodeGenerator(\n \t\t\t\t\t(RecordDomain) domain, packagePrefix,\n \t\t\t\t\tGRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\trcode.createFiles(pathPrefix);\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tfor (Domain domain : getEnumDomains()) {\n \t\t\tCodeGenerator ecode = new EnumCodeGenerator((EnumDomain) domain,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE);\n \t\t\tecode.createFiles(pathPrefix);\n \t\t}\n \t\tif (progressFunction != null) {\n \t\t\tschemaElements++;\n \t\t\tcurrentCount++;\n \t\t\tif (currentCount == interval) {\n \t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\tcurrentCount = 0;\n \t\t\t}\n \t\t}\n \t}", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "public void setDateRange(Date start, Date end)\n {\n descriptorManager.readFileDescriptors(start,end);\n }", "private void populateGridData() {\n\t\t// Delete subfile\n\t\tnmfkpinds.setPgmInd74(true);\n\t\tnmfkpinds.setPgmInd71(false);\n\t\tnmfkpinds.setPgmInd72(false);\n\t\tnmfkpinds.setPgmInd31(false);\n\t\tnmfkpinds.setPgmInd74(false);\n\t\t// Write subfile\n\t\tif (stateVariable.getSflrrn() == 0) {\n\t\t\tcontractDetail.fetch(stateVariable.getXwordn());\n\t\t}\n\t\tcontractDetail.next(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd31(lastIO.isEndOfFile());\n\t\tuwScnIdx1 = 0;\n\t\twhile (! nmfkpinds.pgmInd31()) {\n\t\t\tstateVariable.setSflrrn(Integer.valueOf(stateVariable.getSflrrn() + 1));\n\t\t\tstateVariable.setDssel(blanks(1));\n\t\t\tstateVariable.setSwabcd(subString(stateVariable.getXwabcd(), 1, 15));\n\t\t\tstateVariable.setSwt8tx(subString(stateVariable.getXwt8tx(), 1, 9));\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00001 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwhltx(all(\"-\", 10));\n\t\t\t}\n\t\t\tif (uwScnIdx1 < Integer.valueOf(gridVariable.length - 1)) {\n\t\t\t\tuwScnIdx1 = Integer.valueOf(uwScnIdx1 + 1);\n\t\t\t}\n\t\t\tgridVariable[uwScnIdx1].setDssel(\"X\");\n\t\t\tgridVariable[uwScnIdx1].setSwabcd(stateVariable.getSwabcd());\n\t\t\tgridVariable[uwScnIdx1].setXwabcd(stateVariable.getXwabcd());\n\t\t\tgridVariable[uwScnIdx1].setXwaacs(stateVariable.getXwaacs());\n\t\t\tgridVariable[uwScnIdx1].setSwt8tx(stateVariable.getSwt8tx());\n\t\t\tgridVariable[uwScnIdx1].setXwt8tx(stateVariable.getXwt8tx());\n\t\t\tgridVariable[uwScnIdx1].setXwricd(stateVariable.getXwricd());\n\t\t\tgridVariable[uwScnIdx1].setXwa5qt(stateVariable.getXwa5qt());\n\t\t\tgridVariable[uwScnIdx1].setXwa2cd(stateVariable.getXwa2cd());\n\t\t\tgridVariable[uwScnIdx1].setXwpric(stateVariable.getXwpric());\n\t\t\tgridVariable[uwScnIdx1].setXwhltx(stateVariable.getXwhltx());\n\t\t\t// Reading just one grid page\n\t\t\tif (uwScnIdx1 == Integer.valueOf(gridVariable.length - 1)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcontractDetail.next(stateVariable.getXwordn());\n\t\t\tnmfkpinds.setPgmInd31(lastIO.isEndOfFile());\n\t\t}\n\t\t// -\n\t\tif (stateVariable.getSflrrn() > 0) {\n\t\t\tif (equal(\"0\", stateVariable.getSflchg())) {\n\t\t\t\tstateVariable.setShwrec(1);\n\t\t\t}\n\t\t\tif ((stateVariable.getShwrec() > stateVariable.getSflrrn()) || (stateVariable.getShwrec() < 1)) {\n\t\t\t\tstateVariable.setShwrec(1);\n\t\t\t}\n\t\t\t// Richard T: 27 Sep 2010\n\t\t\tif (stateVariable.getSflrrn() > 0) {\n\t\t\t\tnmfkpinds.setPgmInd71(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd71(false);\n\t\t\t}\n\t\t}\n\t\tnmfkpinds.setPgmInd72(true);\n\t}", "public void realocareThreadsDistribution(){\n for(int i=1;i<=nrThreads;i++){\n if(listofIntervalsForEachThread[i] == null)\n listofIntervalsForEachThread[i] = new IntervalClass();\n this.listofIntervalsForEachThread[i].setStart(0);\n this.listofIntervalsForEachThread[i].setEnd(0);\n }\n if(this.nrThreads>=this.borderArray.size())\n for(int i=0;i<this.borderArray.size();i++){\n this.listofIntervalsForEachThread[i+1].setStart(i);\n this.listofIntervalsForEachThread[i+1].setEnd(i);\n }\n else{\n int nrForEachThread = this.borderArray.size()/nrThreads;\n int difSurplus = this.borderArray.size()%nrThreads;\n int difRate;\n int lastAdded = 0;\n for(int i=1;i<=this.nrThreads;i++){\n if(difSurplus > 0){\n difRate = 1;\n difSurplus--;\n }\n else difRate = 0;\n \n this.listofIntervalsForEachThread[i].setStart(lastAdded);\n lastAdded = lastAdded + difRate + nrForEachThread - 1;\n this.listofIntervalsForEachThread[i].setEnd(lastAdded);\n lastAdded++;\n }\n }\n }", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "public abstract void selectIndexRange(int min, int max);", "public SummaryRanges() {\n this.intervals = new ArrayList<>();\n }", "public abstract long[] GetApproximateSizes(Range[] range, int n) throws IOException, DecodeFailedException, BadFormatException;", "public static BsonDocument createPartitionBounds(final BsonValue lower, final BsonValue upper) {\n BsonDocument partitionBoundary = new BsonDocument();\n if (lower.getBsonType() != BsonType.MIN_KEY) {\n partitionBoundary.append(\"$gte\", lower);\n }\n if (upper.getBsonType() != BsonType.MAX_KEY) {\n partitionBoundary.append(\"$lt\", upper);\n }\n return partitionBoundary;\n }", "public static void partition(int[] startSet, int elements){\n\t\tArrays.sort(startSet);\n\t\tArrayList<Integer> setA = new ArrayList<>();\n\t\tArrayList<Integer> setB = new ArrayList<>();\n\t\t\t\n\t\t/*\n\t\ttraverse through sorted list starting at largest value\n\t\tif sum of set is less than other set add new smaller number\n\t\t*/\n\t\tfor(int i = startSet.length-1; i >= 0; i--){\n\t\t\tif(sumPartition(setA) < sumPartition(setB)){\n\t\t\t\tsetA.add(startSet[i]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetB.add(startSet[i]);\n\t\t\t}\n\t\t}\t\n\t\t\t\n\t\tif(sumPartition(setA) != sumPartition(setB))\n\t\t\tSystem.out.println(\"No partition\");\n\t\telse {\n\t\t\t//print solution\t\n\t\t\tSystem.out.print(\"Partition: \");\n\t\t\tfor(int i = 0; i < setA.size(); i++){\n\t\t\t\tSystem.out.print(\" \" + setA.get(i));\n\t\t\t}\n\t\t\tSystem.out.print(\" vs \");\n\t\t\tfor(int i = 0; i < setB.size(); i++){\n\t\t\t\tSystem.out.print(\" \" + setB.get(i));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "private static List<SequenceDatabase> createSegmentDatabases(SequencesHelper sequencesHelper, int win_size){\n\t\tList<Date> dates = sequencesHelper.getDates();\n\t\tList<Sequence> sequences = sequencesHelper.getSequences();\n\t\tList<SequenceDatabase> segmentdbs = new LinkedList<SequenceDatabase>();\n\t\t\n\t\tint volumn_max = win_size; // Maximum number of intervals with trajectories\n\t\tint volumn_min = win_size / 2;\t// minimum number of intervals with trajectories\n\t\tint width_max = time_span_max;\n\t\tint width_min = time_span_min;\n\t\t\n\t\tassert(dates.size() == sequences.size());\n\t\t\n\t\tDate date_max = dates.get(dates.size()-1);\n\t\tint date_start = 0;\n\t\tint date_end = 0;\n\t\t\n\t\twhile (date_max.getTime()/1000 - dates.get(date_start).getTime()/1000 >= width_min * 24 * 3600){\n\t\t\t// start a new segment database\n\t\t\tSequenceDatabase newdb = new SequenceDatabase();\n\t\t\t\n\t\t\tfor (int i=date_start; i < dates.size(); i++){\n\t\t\t\tif ( newdb.size() < volumn_max && \n\t\t\t\t\t(dates.get(i).getTime()/1000 - dates.get(date_start).getTime()/1000) < width_max * 24 * 3600){\n\t\t\t\t\tnewdb.addSequence(sequencesHelper.getSequence(i), dates.get(i));\n\t\t\t\t\tdate_end = i;\n\t\t\t\t}else{\n\t\t\t\t\tbreak; // for\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( newdb.size() >= volumn_min && newdb.getTimeSpanDays() >= width_min){\n\t\t\t\t// only add the database meeting the constraints.\n\t\t\t\tsegmentdbs.add(newdb);\n\t\t\t}\n\t\t\t\n\t\t\t// update date start index\n\t\t\tif ( newdb.size() > 1){\n\t\t\t\tList<Date> newdb_dates = newdb.getDates();\n\t\t\t\tDate start = newdb_dates.get(0);\n\t\t\t\tDate end = newdb_dates.get(newdb.size()-1);\n\t\t\t\t// the sliding distance depends on the median time of the sliding window.\n\t\t\t\tdouble time_middle = 0.5*(end.getTime()/1000 + start.getTime()/1000 );\n\t\t\t\tfor (int j = date_start; j <= date_end; j++){\n\t\t\t\t\tif (dates.get(j).getTime()/1000 >= time_middle){\n\t\t\t\t\t\tdate_start = j;\n\t\t\t\t\t\tdate_end = j;\n\t\t\t\t\t\tbreak; // inner for\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tdate_start = date_start+1;\n\t\t}\n\n\t\treturn segmentdbs;\n\t}", "CollectionRange createCollectionRange();", "public void partitionArray(int startIndex, int lastIndex, int[] array) {\n\t\tif (startIndex < lastIndex) { //If the start index is lower than the last one, there are elements to sort\n\t\t\tint middle = (lastIndex + startIndex)/2; //This is the middle of the array\n\t\t\tpartitionArray(startIndex, middle, array); //Keep partitioning the left side\n\t\t\tpartitionArray(middle+1, lastIndex, array); //Now keep partitioning the right side\n\t\t\tmergePartitions(startIndex, middle, lastIndex, array); //Now merge all the partitions\n\t\t}\n\t}", "protected abstract void splitBAMs();", "public void allocatePartitions(PartitionerResult pr, long bytesPerPixel, String outputPath) throws IOException {\n\t\tbrickChannels = new ArrayList<>();\n\t\tbrickBuffers = new ArrayList<>();\n\n\t\tfor (int i = 0; i < pr.bricks.size(); ++i) {\n\t\t\tint size = pr.bricks.get(i).size;\n\t\t\tlong bytes = size * size * size * bytesPerPixel;\n\t\t\tPath path = FileSystems.getDefault().getPath(outputPath + \"/\" + i + \".hz\");\n\t\t\tbrickChannels.add(FileChannel.open(path,\n\t\t\t\t\tStandardOpenOption.CREATE,\n\t\t\t\t\tStandardOpenOption.READ,\n\t\t\t\t\tStandardOpenOption.WRITE));\n\t\t\tbrickBuffers.add(brickChannels.get(i).map(FileChannel.MapMode.READ_WRITE, 0, bytes));\n\t\t}\n\t}", "@Override\n public void createPartition(Partition partition) {\n \n }", "private void generateIntervalArray(){\n BigDecimal maximumValue = this.getTfMaximumInterval();\n BigDecimal minimumValue = this.getTfMinimumInterval();\n BigDecimal stepValue = this.getTfStepInterval();\n \n intervalArray = new ArrayList<BigDecimal>();\n BigDecimal step = maximumValue;\n \n //Adiciona os valores \"inteiros\"\n while(step.doubleValue() >= minimumValue.doubleValue()){\n intervalArray.add(step);\n step = step.subtract(stepValue);\n }\n }", "void assignRange() {\n rangeIndex = (int) Math.floor(value / step);\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.print(\"Number of input: \");\n\t\tint input = scan.nextInt();\n\t\tint[] initialSet = new int[input];\n\t\t\n\t\t//input user numbers into set array\n\t\tSystem.out.print(\"Enter \" + input + \" numbers: \");\n\t\tfor(int i = 0; i < input; i++){\n\t\t\tinitialSet[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\t//find partition\n\t\tpartition(initialSet, input);\n\t\t\n\t}", "private void split(Map<Integer, SortedSet> invariants, Partition partition) {\n int nonEmptyInvariants = invariants.keySet().size();\n if (nonEmptyInvariants > 1) {\n List<Integer> invariantKeys = new ArrayList<Integer>();\n invariantKeys.addAll(invariants.keySet());\n partition.removeCell(currentBlockIndex);\n int k = currentBlockIndex;\n if (splitOrder == SplitOrder.REVERSE) {\n Collections.sort(invariantKeys);\n } else {\n Collections.sort(invariantKeys, Collections.reverseOrder());\n }\n for (int h : invariantKeys) {\n SortedSet setH = invariants.get(h);\n// System.out.println(\"adding block \" + setH + \" at \" + k + \" h=\" + h);\n partition.insertCell(k, setH);\n blocksToRefine.add(setH);\n k++;\n \n }\n // skip over the newly added blocks\n currentBlockIndex += nonEmptyInvariants - 1;\n }\n }", "private void initializationParameters(int numberOfPartitions){\n int tempNumber = numberOfPartitions * 2 + 1;\n ksi = new int[tempNumber];\n ksi[0] = NUMOFTESTCASES;\n eta = new int[numberOfPartitions];\n Y = new int[numberOfPartitions];\n d = 2;\n p = new double[numberOfPartitions];\n for (int i = 0; i < numberOfPartitions; i++) {\n p[i] = 1.0 / numberOfPartitions ;\n }\n }", "private List<List<Integer>> allPartitions(Set<Integer> layoutSizes, int target, int sizeLimit) {\n List<List<Integer>> result = new ArrayList<>();\n layoutSizes = layoutSizes.stream().filter(x -> x > 0).collect(toSet());\n if (sizeLimit < 1) {\n sizeLimit = target;\n }\n Integer[] arr = new Integer[sizeLimit];\n generatePartialList(result, arr, 0, 0, layoutSizes, target, sizeLimit);\n return result;\n }", "public MultipleGroups(List<Range> ranges) {\r\n\t\tgroupList = new ArrayList<NumberGroup>();\r\n\t\t\r\n\t\tfor (int i = 0; i < ranges.size(); i++)\r\n\t\t\tgroupList.add(ranges.get(i));\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n System.out.println(partition(new int[]{1,2,3,4,5,6,7,8,9}, 2));\n // 1 1 1 | 1 1 1 | 1 1 1\n System.out.println(partition(new int[]{1,1,1,1,1,1,1,1,1}, 2));\n }", "private int processFile(File reportFile, Calendar minRange, Calendar maxRange, boolean ignoreHour, boolean doInsert, List<Document> returnList) {\r\n\t\tint count = 0;\r\n\t\tboolean isV9 = false; // ReportingService uses v9, report loaded fom UI has different columns, this helps distinguish the origin of file \r\n\t\ttry {\r\n\t\t\tcsvReader = new CSVReader(new FileReader(reportFile));\r\n\t\t\tboolean isHeaderFooter = true;\r\n\t\t\tString[] row = null;\r\n\t\t\tint rows = 0;\r\n\t\t\tString[] headers = null;\r\n\t\t\twhile ((row = csvReader.readNext()) != null) {\r\n\t\t\t\t// skip prologue / footer (both separated from data by empty row)\r\n\t\t\t\tif (row.length == 0 || (row.length == 1 && \"\".equals(row[0]))) {\r\n\t\t\t\t\tisHeaderFooter = !isHeaderFooter;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (!isHeaderFooter) {\r\n\t\t\t\t\tif (headers == null) {\r\n\t\t\t\t\t\theaders = row;\r\n\t\t\t\t\t\tbuildHeaderIndexes(headers);\r\n\t\t\t\t\t\tStringBuilder dbgPrint = new StringBuilder(reportFile.getName()+\": Available report columns: \");\r\n\t\t\t\t\t\tfor (String h : headers) {\r\n\t\t\t\t\t\t\tif (\"AdGroupName\".equals(h)) { // UI downloaded file will contain \"Ad Group name\" instead\r\n\t\t\t\t\t\t\t\tisV9 = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdbgPrint.append(h).append(\", \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLOG(dbgPrint.toString());\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\trows++;\r\n\t\t\t\t\tDocument document = isV9 ? buildDocumentBingReport(row, minRange, maxRange) : _buildDocumentBingReport(row, minRange, maxRange);\r\n\t\t\t\t\tif (!doInsert) {\r\n\t\t\t\t\t\tsetIdsIfRequired(document);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfillIdsIfRequired(document);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (doInsert && isDocumentInTimeRange(document, minRange, maxRange, ignoreHour)) {\r\n\t\t\t\t\t\tif (returnList != null) {\r\n\t\t\t\t\t\t\treturnList.add(document);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (!checkDuplicate(document)) {\r\n\t\t\t\t\t\t\t\tinsertDocument(document);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tLOG(reportFile.getName()+\" downloaded rows: \"+rows+\", unique, in obsWindow rows: \"+count);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public void go_through_tiling_windows(){\n\t\ttry{\n//\t\t\tBufferedWriter bw=new BufferedWriter(new FileWriter(outfile));\n\t\t\tfor(int chr=0;chr<variants.num_chrs;chr++){\n\t\t\t\tint last_position=variants.locations[chr][variants.num_sites[chr]-1];\n\t\t\t\tint start=1, end=tiling_win_size;\n\t\t\t\twhile(start<last_position){\n\t\t\t\t\tdouble[][] data=variants.load_variants_in_region(chr, start, end);\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<data.length;k++){\n\t\t\t\t\t\t//do something\n\t\t\t\t\t}\n\t\t\t\t\tstart=start+tiling_win_size/2;\n\t\t\t\t\tend=start+tiling_win_size-1;\n\t\t\t\t}\n\t\t\t}//bw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "private int partition(int[] arr, int start, int end) {\n\t\tint bounary = arr[start];\r\n\t\twhile(start<end) {\r\n\t\t\twhile(start<end&&arr[end]>=bounary) {\r\n\t\t\t\tend--;\r\n\t\t\t}\r\n\t\t\tarr[start] = arr[end];\r\n\t\t\twhile(start<end&&arr[start]<=bounary) {\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t\tarr[end] = arr[start];\r\n\t\t}\r\n\t\tarr[start] = bounary;\r\n\t\treturn start;\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tSkipList<String, Rectangle> list = new SkipList<String, Rectangle>();\n\t\tString file = args[0];\n\t\tScanner scan = new Scanner(new File(file));\n\t\t// FileProcessor fp = new FileProcessor();\n\t\t// fp.fileParser(line);\n\t\ttry {\n\t\t\tString lineReader = \"\";\n\t\t\twhile (scan.hasNextLine()) {\n\t\t\t\tlineReader = scan.nextLine();\n\t\t\t\t// regex string delimeter we need to figure out to get rid of excess whitespace\n\t\t\t\t// between parameters in text file\n\t\t\t\tString CMD = lineReader.trim();\n\t\t\t\tString[] lineCMD = CMD.split(\"\\\\s+\");\n\t\t\t\t// switch statement for all situations\n\t\t\t\tswitch (lineCMD[0]) {\n\t\t\t\tcase \"insert\":\n\t\t\t\t\tString name = lineCMD[1];\n\t\t\t\t\tint xCord = Integer.parseInt(lineCMD[2]);\n\t\t\t\t\tint yCord = Integer.parseInt(lineCMD[3]);\n\t\t\t\t\tint width = Integer.parseInt(lineCMD[4]);\n\t\t\t\t\tint height = Integer.parseInt(lineCMD[5]);\n\t\t\t\t\tRectangle rect = new Rectangle(name, xCord, yCord, width, height);\n\t\t\t\t\tKVPair<String, Rectangle> item = new KVPair<String, Rectangle>(name, rect);\n\t\t\t\t\tif (width <= 0 || height <= 0 || (xCord + width > 1024) || (xCord + width < 0)\n\t\t\t\t\t\t\t|| (yCord + height > 1024) || (yCord + height < 0) || (xCord < 0) || (yCord < 0)) {\n\t\t\t\t\t\tSystem.out.println(\"Rectangle rejected: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.insert(name, rect);\n\t\t\t\t\t\tSystem.out.println(\"Rectangle Inserted: (\" + name + \", \" + xCord + \", \" + yCord + \", \" + width\n\t\t\t\t\t\t\t\t+ \", \" + height + \")\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"remove\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"regionsearch\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"intersections\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"search\":\n\t\t\t\t\t// System.out.println(scan.nextLine());\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"dump\":\n\t\t\t\t\tSystem.out.println(\"SkipList dump: \");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(lineCMD[0]);\n\t\t\t}\n\t\t}\n\t\t// line = scan.nextLine();\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// String line = scan.nextLine();\n\t\t// System.out.println(line);\n\t\t// System.out.println(file);\n\t\t// fileParser(file);\n\t\t// Rectangle1 rect = new Rectangle1();\n\n\t}", "private static List<List<byte[]>> prepareDataForTest(int partitionSize, String path){\n\t\tByteArrayDataPreparator dp = new ByteArrayDataPreparator(path);\n\t\treturn dp.getPartitionedData(partitionSize);\n\t}", "public static void startRound(int round, boolean end) throws InputMismatchException, FileNotFoundException\r\n\t{\r\n\t\t\r\n\t\tQuickSorter quickSort = null;\r\n\t\tInsertionSorter inSort = null;\r\n\t\tMergeSorter mergeSort = null;\r\n\t\tAbstractSorter selSort = null;\t\r\n\t\tPoint[] points = null;\r\n\t\tRandom ran = new Random();\r\n\t\t\r\n\t\tSystem.out.println(\"Round \" + round);\r\n\t\tSystem.out.println(\"1)Create Random Points 2)Import File 3)Exit\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint input = scan.nextInt();\r\n\t\t\r\n\t\tif(input == 1)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"How many points?\");\r\n\t\t\tinput = scan.nextInt();\r\n\t\t\tpoints = new Point[input];\r\n\t\t\tpoints = generateRandomPoints(input, ran);\r\n\t\t\t\r\n\t\t\tquickSort = new QuickSorter(points);\r\n\t\t\tinSort = new InsertionSorter(points);\r\n\t\t\tmergeSort = new MergeSorter(points);\r\n\t\t\tselSort = new SelectionSorter(points);\t\r\n\t\t}\r\n\t\telse if(input == 2)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File Name(must end in .txt):\");\r\n\t\t\tString fileName = scan.next();\r\n\r\n\t\t\t\tquickSort = new QuickSorter(fileName);\r\n\t\t\t\tinSort = new InsertionSorter(fileName);\r\n\t\t\t\tmergeSort = new MergeSorter(fileName);\r\n\t\t\t\tselSort = new SelectionSorter(fileName);\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\telse if(input == 3)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Trial Terminated\");\r\n\t\t\tend = true;\r\n\t\t\tscan.close();\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"1) Sort By X-Coordingate 2)Sort By Polar-Angle\");\r\n\t\tint order = scan.nextInt();\r\n\t\t\r\n\t\tselSort.sort(order);\r\n\t\tinSort.sort(order);\r\n\t\tmergeSort.sort(order);\r\n\t\tquickSort.sort(order);\r\n\t\t\r\n\t\tSystem.out.println(\"Algorithm\\tSize\\tTime\");\r\n\t\tSystem.out.println(\"---------------------------------------\");\r\n\t\tSystem.out.println(selSort.stats());\r\n\t\tselSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(inSort.stats());\r\n\t\tinSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(quickSort.stats());\r\n\t\tquickSort.draw();\r\n\t\t\r\n\t\tSystem.out.println(mergeSort.stats() + \"\\n\");\r\n\t\tmergeSort.draw();\r\n\t}", "public abstract void initGrid(String filename)\r\n throws NumberFormatException, FileNotFoundException, IOException;", "private <K, V> Source initInputFile(\n Iterable<IsmRecord<WindowedValue<V>>> elements,\n IsmRecordCoder<WindowedValue<V>> coder,\n String tmpFilePath)\n throws Exception {\n // Group the keys by shard and sort the values within a shard by the composite key.\n Map<Integer, SortedMap<RandomAccessData, IsmRecord<WindowedValue<V>>>> writeOrder =\n new HashMap<>();\n for (IsmRecord<WindowedValue<V>> element : elements) {\n int shardId = coder.hash(element.getKeyComponents());\n if (!writeOrder.containsKey(shardId)) {\n writeOrder.put(\n shardId,\n new TreeMap<RandomAccessData, IsmRecord<WindowedValue<V>>>(\n RandomAccessData.UNSIGNED_LEXICOGRAPHICAL_COMPARATOR));\n }\n RandomAccessData data = encodeKeyPortion(coder, element);\n writeOrder.get(shardId).put(data, element);\n }\n\n IsmSink<WindowedValue<V>> sink =\n new IsmSink<>(\n FileSystems.matchNewResource(tmpFilePath, false), coder, BLOOM_FILTER_SIZE_LIMIT);\n try (SinkWriter<WindowedValue<IsmRecord<WindowedValue<V>>>> writer = sink.writer()) {\n for (Entry<Integer, SortedMap<RandomAccessData, IsmRecord<WindowedValue<V>>>> entry :\n writeOrder.entrySet()) {\n for (IsmRecord<WindowedValue<V>> record : entry.getValue().values()) {\n writer.add(new ValueInEmptyWindows<>(record));\n }\n }\n }\n return newIsmSource(coder, tmpFilePath);\n }", "protected void constructPartitions( Callback c, List nodes, int level ){\n //we want to ignore the dummy node partition\n String id = getPartitionID( mCurrentDepth );\n Partition p = new Partition( nodes, id );\n p.setIndex( mCurrentDepth );\n\n p.constructPartition();\n mLogger.log( \"Partition \" + p.getID() + \" is :\" + p.getNodeIDs(),\n LogManager.DEBUG_MESSAGE_LEVEL );\n c.cbPartition( p );\n\n }", "public static void readTasks(String filename,\n ArrayList<Task> task1, ArrayList<Task> task2,\n ArrayList<Task> task3) {\n int start;\n int deadline;\n int mins;\n int id = 0;\n File file = new File(\"src/\" + filename);\n try{\n Scanner sc = new Scanner(file);\n while(sc.hasNextInt()){\n id += 1;\n start = Integer.parseInt(sc.next());\n deadline = Integer.parseInt(sc.next());\n mins = Integer.parseInt(sc.next());\n //for each set of three numbers, create three tasks\n Task t1 = new Task1(id, start, deadline, mins);\n Task t2 = new Task2(id, start, deadline, mins);\n Task t3 = new Task3(id, start, deadline, mins);\n //add each to their respected queues\n task1.add(t1);\n task2.add(t2);\n task3.add(t3);\n }\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n\n\n }", "@Value.Parameter\n int partition();", "public void createPartition(int nPid);", "public static void main(String[] args) {\n int limit = a.length/2;\n int size = 2;\n while(size<=limit) {\n createPartitionsOfSize(a, size);\n size+=2;\n }\n System.out.println(\"Result: \" + Arrays.toString(a));\n }", "static void bucket_partition(int b_size, LikenessBuckets bk){\n\t\tint parts = b_size/partition_size; //#partitions per bucket\n\t\tdouble ratio; int offsetB; int offsetP;\n\t\tint chunk_size; int partSA;\n\t\tshort[][] tmpBucket;\n\t\tint[] loaded;\n\n\t\tif(parts == 0){\n\t\t\tparts = 1;\n\t\t\tchunk_sizes.add(b_size);\n\t\t}else{\n\t\t\tfor(int i=0; i<parts-1; i++){\n\t\t\t\tchunk_sizes.add(partition_size);\n\t\t\t}\n\t\t\tif ((b_size % partition_size) <= (partition_size/2)){\n\t\t\t\tchunk_sizes.addFirst(partition_size + (b_size % partition_size));\n\t\t\t}else{\n\t\t\t\tparts++;\n\t\t\t\tchunk_sizes.add(partition_size);\n\t\t\t\tchunk_sizes.addLast(b_size % partition_size);\n\t\t\t}\n\t\t}\n\t\tloaded = new int[parts];\n\n\t\tfor(int b=0; b<buckNum; b++){//for every bucket\n\t\t\ttmpBucket = new short[bucket_size][dims];\n\t\t\tArrayList<Integer> chg = bk.changeSA.get(b);\n\t\t\tint first = 0; int last;\n\t\t\tfor(int i=0; i<parts; i++){\n\t\t\t\tloaded[i] = 0;\n\t\t\t}\n\t\t\tfor(int i=0; i<chg.size(); i++){//for every SA\n\t\t\t\tlast = chg.get(i);\n\t\t\t\tif((last-first) > 1){\n\t\t\t\t\t//System.out.println(\"sorting bucket[\"+b+\"][\"\n\t\t\t\t\t//\t\t\t\t +first+\"--\"+last+\"]\");\n\t\t\t\t\tquickSortBucket(first, last, b);\n\t\t\t\t}\n\t\t\t\toffsetB = first;\n\t\t\t\toffsetP = 0;\n\t\t\t\tfor(int jj=0; jj<parts; jj++){//for every partition\n\t\t\t\t\tchunk_size = chunk_sizes.get(jj);\n\t\t\t\t\t//ratio = ((double)chunk_size) / ((double)bucket_size);\n\t\t\t\t\t//partSA = (int)(Math.ceil(ratio * ((float)(last-offsetB+1))));\n\t\t\t\t\tpartSA = (int)Math.ceil(((double)(last-offsetB+1)) / ((double)(parts-jj)));\n\t\t\t\t\tif (partSA > (chunk_size - loaded[jj]))\n\t\t\t\t\t\tpartSA = chunk_size - loaded[jj];\n\t\t\t\t\tfor(int j=0; j<partSA; j++){\n\t\t\t\t\t\ttmpBucket[offsetP + loaded[jj] + j] = buckets[b][offsetB + j];\n\t\t\t\t\t}\n\t\t\t\t\tloaded[jj] += partSA;\n\t\t\t\t\toffsetB += partSA;\n\t\t\t\t\toffsetP += chunk_size;\n\t\t\t\t}\n\t\t\t\tfirst = last+1;\n\t\t\t}\n\t\t\tbuckets[b] = tmpBucket;\n\t\t}\n\t}", "private static void generateDatasets(int time_span, int time_granularity) {\n\n String[] city = {\n \"dm\", //Des Moines\n \"bo\", //Boston\n \"sf\" //San Francisco\n };\n\n double[] gridLength = { //relates (mostly) to number of agents\n 10,\n 30,\n 50,\n 100,\n 350,\n 500,\n 850,\n 1000,\n 1500,\n 2000,\n };\n\n double[] clusterDiv = { //multiply grid length by this and plug into radius in order for this to be number of clusters\n 1,\n 2,\n 4,\n 8,\n 16,\n 32,\n 64,\n 128,\n 256,\n 512,\n 1024\n };\n\n final int MIN_DEV = 2; final int MAX_DEV = 6; //minimum and maximum amount of devices per house to generate files for\n final int NUM_GRID_SIZES = 5; //number of different grid sizes to generate from the list above, some of the larger problems might be to big for some computers to handle\n for(int i = 0; i < city.length; i++) { // for each city\n for(int j = 0; j < NUM_GRID_SIZES; j++) { //for each grid size\n\n Topology topo = generateTopology(i, gridLength[j], 1);\n for(int d = MIN_DEV; d <= MAX_DEV; d++) {\n String fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n\n if(d == MAX_DEV) {\n Topology temp = topo;\n for (int k = 2; temp != null && k < clusterDiv.length; k++) {\n temp = generateTopology(i, gridLength[j], clusterDiv[k]);\n if (temp == null) continue; // if num_agents < agents_per_cluster then stop\n else topo = temp;\n }\n fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n }\n }\n }\n }\n }", "public static void main(String args[]) throws FileNotFoundException {\n\t\tif ((args.length != 2) && (args.length != 3)) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Usage: FLowSpaceUtil config.xml <dpid> [slice]\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tFVConfig.readFromFile(args[0]);\n\t\tlong dpid = FlowSpaceUtil.parseDPID(args[1]);\n\n\t\tswitch (args.length) {\n\t\tcase 2:\n\t\t\tSet<String> slices = FlowSpaceUtil.getSlicesByDPID(\n\t\t\t\t\tFVConfig.getFlowSpaceFlowMap(), dpid);\n\t\t\tSystem.out.println(\"The following slices have access to dpid=\"\n\t\t\t\t\t+ args[1]);\n\t\t\tfor (String slice : slices)\n\t\t\t\tSystem.out.println(slice);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSet<Short> ports = FlowSpaceUtil.getPortsBySlice(dpid, args[2],\n\t\t\t\t\tFVConfig.getFlowSpaceFlowMap());\n\t\t\tSystem.out.println(\"Slice \" + args[2] + \" on switch \" + args[1]\n\t\t\t\t\t+ \" has access to port:\");\n\t\t\tif (ports.size() == 1\n\t\t\t\t\t&& ports.contains(Short.valueOf(OFPort.OFPP_ALL.getValue())))\n\t\t\t\tSystem.out.println(\"ALL PORTS\");\n\t\t\telse\n\t\t\t\tfor (Short port : ports)\n\t\t\t\t\tSystem.out.println(\"Port: \" + port);\n\t\t}\n\n\t}", "@Override\n public ArrayList<int[]> Split()\n {\n double hypervolume_best = -Double.MAX_VALUE;\n int hypervolume_best_i = 0;\n int hypervolume_best_j = 0;\n double hypervolume = 0d;\n\n for( int i = 0; i < Capacity_max + 1; i++)\n {\n for( int j = i + 1; j < Capacity_max + 1; j++)\n {\n hypervolume = 0d;\n double[] point1 = PointMatrix[ Items.get(i)[0] ][ Items.get(i)[1] ];\n double[] point2 = PointMatrix[ Items.get(j)[0] ][ Items.get(j)[1] ];\n\n for(int a = 0; a < Dimensions; a++)\n {\n if( point1[a] > point2[a] )\n hypervolume += Math.log10(point1[a] - point2[a]);\n if( point1[a] < point2[a] )\n hypervolume += Math.log10(point2[a] - point1[a]);\n }\n\n if( hypervolume_best < hypervolume)\n {\n hypervolume_best_i = i;\n hypervolume_best_j = j;\n hypervolume_best = hypervolume;\n }\n }\n }\n\n // Ready the split\n ArrayList<int[]> items_split = new ArrayList<>();\n items_split.addAll(Items);\n\n int point1_x = items_split.get(hypervolume_best_i)[0];\n int point1_y = items_split.get(hypervolume_best_i)[1];\n int point2_x = items_split.get(hypervolume_best_j)[0];\n int point2_y = items_split.get(hypervolume_best_j)[1];\n double[] point1 = PointMatrix[ point1_x ][ point1_y ];\n double[] point2 = PointMatrix[ point2_x ][ point2_y ];\n\n if(hypervolume_best_i > hypervolume_best_j)\n {\n items_split.remove(hypervolume_best_i);\n items_split.remove(hypervolume_best_j);\n }\n else\n {\n items_split.remove(hypervolume_best_j);\n items_split.remove(hypervolume_best_i);\n }\n\n // Create new box with point1\n BoundingBoxLeaf box1 = new BoundingBoxLeaf( PointMatrix, ParentBox, Tree, Depth, point1_x, point1_y );\n\n box1.SetBoxToFit(point1);\n box1.SetCoordsToFit( point1_x, point1_y);\n \n // Reset this box, and add point2\n BoundingBoxLeaf box2 = this;\n \n box2.SetBoxToFit(point2);\n box2.SetCoordsToFit( point2_x, point2_y);\n\n box2.Items.clear();\n box2.Items.add( new int[]{ point2_x, point2_y } );\n\n // Notify parent of split\n ParentBox.InsertBox_internal(box1);\n \n // Add items to the new boxes, up to min capacity\n int[] item_best;\n \n // box1\n while( box1.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n \n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box1.Items.add( new int[]{ item_best[0], item_best[1] } );\n box1.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box1.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // box2\n while( box2.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box2.Items.add( new int[]{ item_best[0], item_best[1] } );\n box2.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box2.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // return remaining to be reinserted into the tree\n return items_split; \n }", "static Integer partition(List<Integer> arr,Integer start,Integer end){\n\t\tint pivot = arr.get(end);\n\t\tint partitionIndex = start;\n\t\tfor(int i=start;i<end;i++){\n\t\t\tif(arr.get(i)<=pivot){\n\t\t\t\tint temp = arr.get(i);\n\t\t\t\tarr.set(i, arr.get(partitionIndex));\n\t\t\t\tarr.set(partitionIndex,temp);\n\t\t\t\tpartitionIndex++;\n\t\t\t}\n\t\t}\n\t\tint temp = arr.get(end);\n\t\tarr.set(end, arr.get(partitionIndex));\n\t\tarr.set(partitionIndex, temp);\n\t\treturn partitionIndex;\n\t}", "private static List<TestSetup> getTests() {\n PivotPicker middlePiv = Quick::alwaysPickMiddle;\n\n // Pivot Pickers\n PivotPicker leftPiv = Quick::alwaysPickLeftmost;\n PivotPicker rightPiv = Quick::alwaysPickRightmost;\n PivotPicker motPiv = Quick::medianOfThree;\n PivotPicker[] pivots = {leftPiv, middlePiv, rightPiv, motPiv};\n String[] pivotNames = {\"Always Pick Leftmost\", \"Always Pick Middle\", \"Always Pick Rightmost\", \"Median Of Three\"};\n\n // Partitioning methods\n Partitioner jonPart = (array, left, right, pivot) -> partition_Jon(array, left, right, pivot);\n Partitioner lomutoPart = Quick::partition_Lomuto;\n Partitioner hoarePart = Quick::partition_Hoare;\n Partitioner[] partitioners = {lomutoPart, hoarePart};\n String[] partNames = {\"lomuto\", \"hoare\"};\n\n // Subsort methods and sizes\n Subsort insertionSub = Quick::insertionSort;\n Subsort[] subsorts = {insertionSub};\n String[] subsortNames = {\"insertion\"};\n List<Integer> sizes = new ArrayList<>();\n for (int i = 3; i < 128; i = 1 + (int) (i * 1.45)) {\n sizes.add(i);\n }\n Integer[] subsortSizes = sizes.toArray(new Integer[sizes.size()]);\n\n // Data generators\n Generator randomGen = (size) -> {\n return generateArray(100, 999, size);\n };\n Generator sortedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = i;\n }\n return arr;\n };\n Generator reversedGen = (size) -> {\n int[] arr = new int[size];\n for (int i = 0; i < arr.length; i++) {\n arr[i] = arr.length - i;\n }\n return arr;\n };\n Generator[] generators = {\n randomGen,\n //sortedGen, reversedGen,\n //(size) -> { return generateArray(10000, 99999, size, 0xDEADBEEF); },\n //(size) -> { return generateArray(10000, 99999, size, 0xCAFEBABE); },\n //(size) -> { return generateArray(10000, 99999, size, 0xBAADF00D); },\n\n };\n String[] generatorNames = {\n \"Random\",\n //\"sorted\", \"reversed\",\n //\"Sequence:0xDEADBEEF\",\n //\"Sequence:0xCAFEBABE\",\n //\"Sequence:0xBAADF00D\",\n };\n\n // Default test data\n TestSetup defaultTest = new TestSetup(\"Default\", null, null, 0, null, null);\n\n List<TestSetup> tests = new ArrayList<>();\n tests.add(defaultTest);\n List<TestSetup> temp = new ArrayList<>();\n { // Block for creating partition method variants\n\n\n // Create variations of the test with different partitioning methods\n for (TestSetup setup : tests) {\n\n for (int i = 0; i < partitioners.length; i++) {\n TestSetup variant = new TestSetup(setup, partNames[i]);\n variant.part = partitioners[i];\n temp.add(variant);\n }\n }\n }\n\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n // Create variations of the test with different pivot picking methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < pivots.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" + \" + pivotNames[i]);\n variant.pivp = pivots[i];\n temp.add(variant);\n }\n }\n\n { // Block for creating generator (dataset) variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different data generation methods\n for (TestSetup setup : tests) {\n //temp.add(setup);\n\n for (int i = 0; i < generators.length; i++) {\n TestSetup variant = new TestSetup(setup, setup.name + \" on \" + generatorNames[i] + \" data\");\n variant.gen = generators[i];\n temp.add(variant);\n }\n }\n }\n\n\n { // Block for creating subsort variants\n // Swap arrays (don't want to add to a collection we're iterating)\n tests = temp;\n temp = new ArrayList<>();\n\n // Create variations of the test with different subsort methods and thresholds\n for (TestSetup setup : tests) {\n temp.add(setup);\n\n for (int i = 0; i < subsorts.length; i++) {\n // And also one version for each size!\n for (int k = 0; k < subsortSizes.length; k++) {\n TestSetup variant = new TestSetup(setup, setup.name + \"+\" + subsortNames[i] + \" below \" + subsortSizes[k]);\n variant.sst = subsortSizes[k];\n variant.ssort = subsorts[i];\n //temp.add(variant);\n\n TestSetup variant_finalSort = new TestSetup(variant, variant.name + \" once at end\");\n variant_finalSort.sortFinal = true;\n temp.add(variant_finalSort);\n }\n }\n }\n }\n\n\n // Return completed variation list\n return temp;\n }", "public void setGroupList() {\n \n String path = \".\"; //curent folder\n String files; //files name\n File folder = new File(path); // get the folfer\n File[] listOfFiles = folder.listFiles(); //list of files\n for (int i = 0; i < listOfFiles.length; i++) {//this loop go trough the folder\n if (listOfFiles[i].isFile()) {\n files = listOfFiles[i].getName();\n if (files.endsWith(\".xls\") || files.endsWith(\".XLS\")) {//filter all the xls file\n if(!files.equalsIgnoreCase(\".xls\")){\n // add a new objet CompoundBook in a our xlsBook\n xlsBook.add(new CompoundBook(files));\n //add only the name of the file without the .xls extension\n groups.add(files.substring(0, files.lastIndexOf(\".\")));\n }\n }\n }\n }\n gList.setListData(groups); // set the group List on the GUI\n }", "public void setPartitionNumber(int part) {\n\tpartitionNumber = part;\n }", "public void format(int files) {\n\n //Inodes now equals the max number of files\n totalInodes = files;\n \n //Loop through and intialize the inodes\n for (short i = 0; i < totalInodes; i++) {\n Inode newInode = new Inode(); \n newInode.toDisk(i); \n }\n \n //Determine freelist size\n freeList = 2 + totalInodes * 32 / Disk.blockSize;\n \n\n //For each block in the freelist create a block and empty the block\n for (int i = freeList; i < totalBlocks; i++) {\n byte[] block = new byte[Disk.blockSize];\n \n for (int j = 0; j < Disk.blockSize; j++){\n block[j] = 0;\n }\n \n SysLib.int2bytes(i + 1, block, 0);\n SysLib.rawwrite(i, block);\n }\n \n //Sync now that format is complete\n sync();\n }", "public SummaryRanges() {\n tree = new TreeMap<>();\n }", "protected abstract SortedMap<String, SampleDescriptor> computeSamples(File sampleDir) throws IOException;", "public StrippedPartition(long numberTuples) {\n this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();\n this.elementCount = numberTuples;\n // StrippedPartition only contains partition with more than one elements.\n if (numberTuples > 1) {\n LongBigArrayBigList newEqClass = new LongBigArrayBigList();\n for (int i = 0; i < numberTuples; i++) {\n newEqClass.add(i);\n }\n this.strippedPartition.add(newEqClass);\n }\n this.calculateError();\n }", "private java.util.List<Node> divideEvenly(Slice.D d, String prefix, String[] names, int n, float p) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\treturn_value.addAll(node.divideEvenly(d, prefix, names, n, p));\n\t\t}\n\t\treturn return_value;\n\t}", "public void createTable(DBTableDescriptor desc, byte [] startKey,\n byte [] endKey, int numRegions) throws IOException {\n DBTableDescriptor.isLegalTableName(desc.getName());\n if(numRegions < 3) {\n throw new IllegalArgumentException(\"Must create at least three regions\");\n } else if(Bytes.compareTo(startKey, endKey) >= 0) {\n throw new IllegalArgumentException(\"Start key must be smaller than end key\");\n }\n byte [][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);\n if(splitKeys == null || splitKeys.length != numRegions - 1) {\n throw new IllegalArgumentException(\"Unable to split key range into enough regions\");\n }\n createTable(desc, splitKeys);\n }", "@Override\n\t\t\tpublic void onPartitionsAssigned(Collection<TopicPartition> partitions) {\n\t\t\t\tconsumer.seek(tp0, 123L); //for partition 0, we want to consume starting from offset 123\n\t\t\t\tconsumer.seek(tp1, 54L); //the offset number must be in Long format\n\t\t\t\tconsumer.seek(tp2, 10000L);\n\t\t\t}", "public static void sort(String f1, String f2) throws FileNotFoundException, IOException {\n\t\tDataInputStream input = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(f1))));\n\t\tfileSize = (int) input.available()/4;\n\t\tif (fileSize == 0){ input.close(); return;} //file is empty\t\n\t\t\n\t\tRandomAccessFile f1a = new RandomAccessFile(f1,\"rw\");\n\t\tRandomAccessFile f2a = new RandomAccessFile(f2,\"rw\");\n\t\tDataOutputStream f1d = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f1a.getFD())));\n\t\tDataOutputStream f2d = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f2a.getFD())));\n\t\t\n\t\t//perform quicksort on partitions of quickSortSize\n\t\tquickSortSize = (int) (Math.min(quickSortSize, fileSize)); \n\t\tint numDivisions = (int) (Math.floor(fileSize/quickSortSize));\n\t\tint excess = (int) (fileSize%(numDivisions*quickSortSize));\n\t\tint[] tmp = new int[quickSortSize];\n\t\tfor (int j = 0; j < numDivisions; j++){\n\t\t\tfor (int i = 0; i< quickSortSize; i++){\n\t\t\t\ttmp[i] = input.readInt();\n\t\t\t}\n\t\t\tquickSort(tmp);\n\t\t\tfor (int i: tmp){\n\t\t\t\tf2d.writeInt(i);\n\t\t\t}\n\t\t}\n\t\ttmp = new int[excess];\n\t\tfor (int i = 0; i< excess; i++){\n\t\t\ttmp[i] = input.readInt();\n\t\t}\n\t\tquickSort(tmp);\n\t\tfor (int i: tmp){\n\t\t\tf2d.writeInt(i);\n\t\t}\n\t\tf2d.flush();\n\t\tinput.close();\n\t\t\n\t\t//Perform Merge sort on the larger partitions\n\t\tint iteration = (int) Math.ceil(Math.log(fileSize/(quickSortSize))/Math.log(2));\n\t\tfor (int i = 0; i < iteration; i++){\n\t\t\tint size = (int) Math.pow(2, i)*quickSortSize;\n\t\t\tif (i%2 == 0){ \n\t\t\t\tf1a.seek(0);\n\t\t\t\tstepSorter(f2, f1d, size);\n\t\t\t} else {\n\t\t\t\tf2a.seek(0);\n\t\t\t\tstepSorter(f1, f2d, size);\n\t\t\t}\n\t\t}\n\n\t\t//Copies f2 to f1 if the iteration ends with f2\n\t\tif (iteration%2==0){\n\t\t\tFileChannel source = null;\n\t\t\tFileChannel destination = null;\n\t\t\ttry {\n\t\t\t\tsource = new FileInputStream(f2).getChannel();\n\t\t\t\tdestination = new FileOutputStream(f1).getChannel();\n\t\t destination.transferFrom(source, 0, source.size());\n\t\t }\n\t\t finally {\n\t\t if(source != null) {\n\t\t source.close();\n\t\t }\n\t\t if(destination != null) {\n\t\t destination.close();\n\t\t }\n\t\t }\n\t\t}\n\t\tf1a.close();\n\t\tf2a.close();\n\t\tf1d.close();\n\t\tf2d.close();\n\t}", "private static void stepSorter(String file, DataOutputStream d, int size) throws FileNotFoundException, IOException {\n\t\tDataInputStream inputA = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tDataInputStream inputB = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tint numDivisions = (int) Math.ceil(fileSize/((double) size));\n\t\tinputB.skip(size*4);\n\t\tfor (int j = 0; j < numDivisions/2; j++){\t\n\t\t\tint counterA = size;\n\t\t\tint counterB = Math.min(fileSize - j*size*2 - size, size);\n\t\t\tInteger a = inputA.readInt();\n\t\t\tInteger b = inputB.readInt();\n\t\t\twhile (counterA > 0 && counterB > 0){\n\t\t\t\tif (a < b){\n\t\t\t\t\td.writeInt(a);\n\t\t\t\t\tif (counterA > 1){\n\t\t\t\t\t\ta = inputA.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterA--;\n\t\t\t\t} else {\n\t\t\t\t\td.writeInt(b);\n\t\t\t\t\tif (counterB > 1){\n\t\t\t\t\t\tb = inputB.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterB--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counterA == 0){\n\t\t\t\td.writeInt(b);\n\t\t\t\tcounterB--;\n\t\t\t\tfor (int i =0; i < counterB; i++){\n\t\t\t\t\td.writeInt(inputB.readInt());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\td.writeInt(a);\n\t\t\t\tcounterA--;\n\t\t\t\tfor (int i =0; i < counterA; i++){\n\t\t\t\t\td.writeInt(inputA.readInt());\n\t\t\t\t}\n\t\t\t}\n\t\t\tinputA.skip(size*4);\n\t\t\tinputB.skip(size*4);\n\t\t}\n\t\t\n\t\t//copy the excess\n\t\twhile (inputA.available()>0){\n\t\t\td.writeInt(inputA.readInt());\n\t\t}\n\t\tinputA.close();\n\t\tinputB.close();\n\t\td.flush();\n\t}", "private static <T extends Comparable<T>> int partition(T[] data, int start, int end) {\n\t\tint pivotLoc = (start + end) / 2;\n\t\tT pivot = data[pivotLoc];\n\t\twhile (start < end) {\n\t\t\twhile (data[start].compareTo(pivot) < 1) {\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\twhile (data[end].compareTo(pivot) > -1) {\n\t\t\t\tend--;\n\t\t\t}\n\t\t\tif (start < end) {\n\t\t\t\tT temp = data[start];\n\t\t\t\tdata[start] = data[end];\n\t\t\t\tdata[end] = temp;\n\t\t\t\tstart++;\n\t\t\t\tend--;\n\t\t\t}\n\t\t}\n\t\treturn start;\n\t}", "abstract E createSplit(RandomAccessFile raf, long length) throws IOException;", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfUploader(Integer lowerInclusive, Integer upperInclusive) {\n return fetchRange(Document.DOCUMENT.UPLOADER, lowerInclusive, upperInclusive);\n }", "@SuppressWarnings(\"FieldAccessNotGuarded\")\n @Override\n public int partitions()\n {\n return partitions.length;\n }", "private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }", "@Test\n public void testReplicateEntriesForHFiles() throws Exception {\n Path dir = TestReplicationSink.TEST_UTIL.getDataTestDirOnTestFS(\"testReplicateEntries\");\n Path familyDir = new Path(dir, Bytes.toString(TestReplicationSink.FAM_NAME1));\n int numRows = 10;\n List<Path> p = new ArrayList<>(1);\n final String hfilePrefix = \"hfile-\";\n // 1. Generate 25 hfile ranges\n Random rng = new SecureRandom();\n Set<Integer> numbers = new HashSet<>();\n while ((numbers.size()) < 50) {\n numbers.add(rng.nextInt(1000));\n } \n List<Integer> numberList = new ArrayList<>(numbers);\n Collections.sort(numberList);\n Map<String, Long> storeFilesSize = new HashMap<>(1);\n // 2. Create 25 hfiles\n Configuration conf = TestReplicationSink.TEST_UTIL.getConfiguration();\n FileSystem fs = dir.getFileSystem(conf);\n Iterator<Integer> numbersItr = numberList.iterator();\n for (int i = 0; i < 25; i++) {\n Path hfilePath = new Path(familyDir, (hfilePrefix + i));\n HFileTestUtil.createHFile(conf, fs, hfilePath, TestReplicationSink.FAM_NAME1, TestReplicationSink.FAM_NAME1, Bytes.toBytes(numbersItr.next()), Bytes.toBytes(numbersItr.next()), numRows);\n p.add(hfilePath);\n storeFilesSize.put(hfilePath.getName(), fs.getFileStatus(hfilePath).getLen());\n }\n // 3. Create a BulkLoadDescriptor and a WALEdit\n Map<byte[], List<Path>> storeFiles = new HashMap<>(1);\n storeFiles.put(TestReplicationSink.FAM_NAME1, p);\n org.apache.hadoop.hbase.wal.WALEdit edit = null;\n WALProtos.BulkLoadDescriptor loadDescriptor = null;\n try (Connection c = ConnectionFactory.createConnection(conf);RegionLocator l = c.getRegionLocator(TestReplicationSink.TABLE_NAME1)) {\n HRegionInfo regionInfo = l.getAllRegionLocations().get(0).getRegionInfo();\n loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(TestReplicationSink.TABLE_NAME1, UnsafeByteOperations.unsafeWrap(regionInfo.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1);\n edit = org.apache.hadoop.hbase.wal.WALEdit.createBulkLoadEvent(regionInfo, loadDescriptor);\n }\n List<WALEntry> entries = new ArrayList<>(1);\n // 4. Create a WALEntryBuilder\n WALEntry.Builder builder = TestReplicationSink.createWALEntryBuilder(TestReplicationSink.TABLE_NAME1);\n // 5. Copy the hfile to the path as it is in reality\n for (int i = 0; i < 25; i++) {\n String pathToHfileFromNS = new StringBuilder(100).append(TestReplicationSink.TABLE_NAME1.getNamespaceAsString()).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.TABLE_NAME1.getName())).append(SEPARATOR).append(Bytes.toString(loadDescriptor.getEncodedRegionName().toByteArray())).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.FAM_NAME1)).append(SEPARATOR).append((hfilePrefix + i)).toString();\n String dst = ((TestReplicationSink.baseNamespaceDir) + (Path.SEPARATOR)) + pathToHfileFromNS;\n Path dstPath = new Path(dst);\n FileUtil.copy(fs, p.get(0), fs, dstPath, false, conf);\n }\n entries.add(builder.build());\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 6. Assert no existing data in table\n Assert.assertEquals(0, scanner.next(numRows).length);\n }\n // 7. Replicate the bulk loaded entry\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(edit.getCells().iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 8. Assert data is replicated\n Assert.assertEquals(numRows, scanner.next(numRows).length);\n }\n // Clean up the created hfiles or it will mess up subsequent tests\n }", "public void readFromFileStartP(String nameFile, int lStart, int cStart, int lAmount, int cAmount)\n {\n //definir dados\n int lin;\n int col;\n int i, j;\n FILE arquivo;\n String linha;\n\n //abrir arquivo\n arquivo = new FILE(FILE.INPUT, nameFile);\n\n //verificar se arquivo e' valido\n if( arquivo == null )\n {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end\n else\n {\n //tentar ler a primeira linha do arquivo\n linha = arquivo.readln( );\n\n //verificar se ha' dados na linha\n if( linha == null )\n {\n IO.println(\"ERRO: Arquivo vazio. \");\n } //end\n else\n {\n lin = IO.getint(linha);\n\n //verificar se lin e' valida\n if( lin <= 0 )\n {\n IO.println(\"ERRO: Quantidade de linhas invalida. \");\n } //end\n else\n {\n linha = arquivo.readln();\n col = IO.getint(linha);\n\n //verificar se coluna e' valida\n if( col <= 0 )\n {\n IO.println(\"ERRO: Quantidade de colunas invalida. \");\n } //end\n else\n {\n //verificar se quantidade e' valida\n if( lAmount <= 0 || lAmount > lin || cAmount <= 0 || cAmount > col )\n {\n IO.println(\"ERRO: Quantidade de colunas/linhas invalida(s).\");\n } //end\n else\n {\n if( lStart < 0 || lStart > lin || cStart < 0 || cStart > col ||\n lStart > (lin - lAmount) || cStart > (col - cAmount) )\n {\n IO.println(\"ERRO: Posicoe(s) iniciais invalida(s). \");\n } //end\n else\n {\n //repetir para cada posicao\n for(i = lStart; i < lAmount; i++)\n {\n for(j = cStart; j < cAmount; j++)\n {\n linha = arquivo.readln();\n table[ i ][ j ] = linha;\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n } //end se\n } //end se\n } //end se\n }", "public static int partition(int[] data, int start, int end) {\n int pivotIndex = (int) (Math.random()*(end - start) + start);\n int pivot = data[pivotIndex];\n int low = start + 1;\n int high = end;\n data[pivotIndex] = data[0];//swap pivot and index\n data[0] = pivot;//swap pivot and index\n while(low <= high){//while still within bounds\n if(data[low] > pivot){//if less than the pivot\n swap(data, low, high);\n high--;\n }else{\n low++;//start moves over by one\n }\n }\n swap(data, start, high);\n return high;\n }", "public static void main(String[] args) {\n\t\tSummaryRanges obj = new SummaryRanges();\n\t\tobj.addNum(1);\n\t\t\n\t\tfor (Interval interval: obj.getIntervals()) {\n\t\t\tSystem.out.print(\"[\" + interval.start + \",\" + interval.end + \"]\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tobj.addNum(3);\n\t\t\n\t\tfor (Interval interval: obj.getIntervals()) {\n\t\t\tSystem.out.print(\"[\" + interval.start + \",\" + interval.end + \"]\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tobj.addNum(7);\n\t\t\n\t\tfor (Interval interval: obj.getIntervals()) {\n\t\t\tSystem.out.print(\"[\" + interval.start + \",\" + interval.end + \"]\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tobj.addNum(2);\n\t\t\n\t\tfor (Interval interval: obj.getIntervals()) {\n\t\t\tSystem.out.print(\"[\" + interval.start + \",\" + interval.end + \"]\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tobj.addNum(6);\n\t\t\n\t\tfor (Interval interval: obj.getIntervals()) {\n\t\t\tSystem.out.print(\"[\" + interval.start + \",\" + interval.end + \"]\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "public int createMultiRegionsWithWritableSerialization(final Configuration c,\n final TableName tableName, byte [][] startKeys)\n throws IOException {\n Arrays.sort(startKeys, Bytes.BYTES_COMPARATOR);\n HTable meta = new HTable(c, TableName.META_TABLE_NAME);\n\n List<HRegionInfo> newRegions\n = new ArrayList<HRegionInfo>(startKeys.length);\n int count = 0;\n for (int i = 0; i < startKeys.length; i++) {\n int j = (i + 1) % startKeys.length;\n HRegionInfo hri = new HRegionInfo(tableName, startKeys[i], startKeys[j]);\n Put put = new Put(hri.getRegionName());\n put.setDurability(Durability.SKIP_WAL);\n put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,\n getBytes(hri)); //this is the old Writable serialization\n\n //also add the region as it's daughters\n put.add(HConstants.CATALOG_FAMILY, HConstants.SPLITA_QUALIFIER,\n getBytes(hri)); //this is the old Writable serialization\n\n put.add(HConstants.CATALOG_FAMILY, HConstants.SPLITB_QUALIFIER,\n getBytes(hri)); //this is the old Writable serialization\n\n meta.put(put);\n LOG.info(\"createMultiRegionsWithWritableSerialization: PUT inserted \" + hri.toString());\n\n newRegions.add(hri);\n count++;\n }\n meta.close();\n return count;\n }", "private java.util.List<Node> divideBlocks(Slice.D d, Float[] sizes, String prefix, String[] names, float p) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : selected_nodes) {\n\t\t\treturn_value.addAll(node.divideBlocks(d, sizes, prefix, names, p));\n\t\t}\n\t\treturn return_value;\n\t}", "public SummaryRanges() {\n S.add(new MyPair(-INF, -INF)); S.add(new MyPair(INF, INF));\n }", "int createMultiRegionsWithPBSerialization(final Configuration c, final byte[] tableName,\n byte [][] startKeys) throws IOException {\n return createMultiRegionsWithPBSerialization(c,\n TableName.valueOf(tableName), startKeys);\n }", "@Test\n public void testHeterogeneousSegment() throws SqlParseException {\n\n val project = \"heterogeneous_segment\";\n val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\";\n val expectedRanges = Lists.<Pair<String, String>> newArrayList();\n val segmentRange1 = Pair.newPair(\"2012-01-01\", \"2012-01-02\");\n val segmentRange2 = Pair.newPair(\"2012-01-02\", \"2012-01-03\");\n val segmentRange3 = Pair.newPair(\"2012-01-03\", \"2012-01-04\");\n val segmentRange4 = Pair.newPair(\"2012-01-04\", \"2012-01-05\");\n val segmentRange5 = Pair.newPair(\"2012-01-05\", \"2012-01-06\");\n val layout_20000000001 = 20000000001L;\n val layout_20001 = 20001L;\n val layout_10001 = 10001L;\n\n val sql = \"select cal_dt, sum(price) from test_kylin_fact inner join test_account on test_kylin_fact.seller_id = test_account.account_id \";\n\n val no_filter = sql + \"group by cal_dt\";\n assertNoRealizationFound(project, no_filter);\n\n val sql1_date = sql\n + \"where cal_dt = DATE '2012-01-01' or (cal_dt >= DATE '2012-01-02' and cal_dt < DATE '2012-01-04') group by cal_dt\";\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n assertPrunedSegmentsRange(project, sql1_date, dfId, expectedRanges, layout_20001, null);\n\n val sql1_date_string = sql\n + \"where cal_dt = '2012-01-01' or (cal_dt >= '2012-01-02' and cal_dt < '2012-01-04') group by cal_dt\";\n assertPrunedSegmentsRange(project, sql1_date_string, dfId, expectedRanges, layout_20001, null);\n\n val sql2_date = sql + \"where cal_dt >= DATE '2012-01-03' and cal_dt < DATE '2012-01-10' group by cal_dt\";\n expectedRanges.clear();\n expectedRanges.add(segmentRange3);\n expectedRanges.add(segmentRange4);\n expectedRanges.add(segmentRange5);\n assertPrunedSegmentsRange(project, sql2_date, dfId, expectedRanges, layout_10001, null);\n\n val sql2_date_string = sql + \"where cal_dt >= '2012-01-03' and cal_dt < '2012-01-10' group by cal_dt\";\n assertPrunedSegmentsRange(project, sql2_date_string, dfId, expectedRanges, layout_10001, null);\n\n // pruned segments do not have capable layout to answer\n val sql3_no_layout = \"select trans_id from test_kylin_fact \"\n + \"inner join test_account on test_kylin_fact.seller_id = test_account.account_id \"\n + \"where cal_dt > '2012-01-03' and cal_dt < '2012-01-05'\";\n assertNoRealizationFound(project, sql3_no_layout);\n\n expectedRanges.clear();\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n val sql4_table_index = \"select trans_id from test_kylin_fact \"\n + \"inner join test_account on test_kylin_fact.seller_id = test_account.account_id \"\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03'\";\n assertPrunedSegmentsRange(project, sql4_table_index, dfId, expectedRanges, layout_20000000001, null);\n\n // pruned segments do not have capable layout to answer\n val sql5 = \"select trans_id, sum(price) \"\n + \"from test_kylin_fact inner join test_account on test_kylin_fact.seller_id = test_account.account_id \"\n + \"where cal_dt > '2012-01-03' and cal_dt < '2012-01-06' group by trans_id\";\n\n assertNoRealizationFound(project, sql5);\n }", "public static List<Integer> partitionLabels(String s) {\n Map<Character, Interval> charInterval = new HashMap<>();\n for (int i = 0;i<s.length();i++) {\n char c = s.charAt(i);\n Interval interval = charInterval.getOrDefault(c, null);\n if (interval == null) {\n interval = new Interval(i, i);\n charInterval.put(c, interval);\n }\n interval.e = i;\n }\n //merge the intervals\n List<Interval> intervals = new ArrayList<>(charInterval.values());\n Collections.sort(intervals);\n System.out.println(\"Intervals: \" + intervals);\n List<Interval> mergedIntervals = new ArrayList<>();\n List<Integer> partitions = new ArrayList<>();\n Interval nextInterval = new Interval();\n for (Interval interval: intervals) {\n if (nextInterval == null) {\n nextInterval = interval;\n continue;\n }\n if (interval.s > nextInterval.e) {\n mergedIntervals.add(nextInterval);\n partitions.add(nextInterval.e - nextInterval.s + 1);\n nextInterval = new Interval(interval.s, interval.e);\n } else if (interval.e > nextInterval.e) {\n nextInterval.e = interval.e;\n }\n }\n if (nextInterval != null) {\n mergedIntervals.add(nextInterval);\n partitions.add(nextInterval.e - nextInterval.s + 1);\n }\n System.out.println(\"Merged intervals: \" + mergedIntervals);\n System.out.println(\"Partitions: \" + partitions);\n return partitions;\n }", "@Test\n public void testScanTokensInterleavedRangePartitionDrops() throws Exception {\n Schema schema = getBasicSchema();\n CreateTableOptions createOptions = new CreateTableOptions();\n createOptions.addHashPartitions(ImmutableList.of(\"key\"), 2);\n\n final int numRows = 30;\n PartialRow lower0 = schema.newPartialRow();\n PartialRow upper0 = schema.newPartialRow();\n lower0.addInt(\"key\", 0);\n upper0.addInt(\"key\", numRows / 3);\n createOptions.addRangePartition(lower0, upper0);\n\n PartialRow lower1 = schema.newPartialRow();\n PartialRow upper1 = schema.newPartialRow();\n lower1.addInt(\"key\", numRows / 3);\n upper1.addInt(\"key\", 2 * numRows / 3);\n createOptions.addRangePartition(lower1, upper1);\n\n PartialRow lower2 = schema.newPartialRow();\n PartialRow upper2 = schema.newPartialRow();\n lower2.addInt(\"key\", 2 * numRows / 3);\n upper2.addInt(\"key\", numRows);\n createOptions.addRangePartition(lower2, upper2);\n\n KuduTable table = client.createTable(testTableName, schema, createOptions);\n KuduSession session = client.newSession();\n for (int i = 0; i < numRows; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n\n // Build the scan tokens.\n List<KuduScanToken> tokens = client.newScanTokenBuilder(table).build();\n assertEquals(6, tokens.size());\n\n // Drop the range partition [10, 20).\n AlterTableOptions dropMiddleOptions = new AlterTableOptions();\n dropMiddleOptions.dropRangePartition(lower1, upper1);\n client.alterTable(table.getName(), dropMiddleOptions);\n\n // Rehydrate the tokens.\n List<KuduScanner> scanners = new ArrayList<>();\n for (KuduScanToken token : tokens) {\n scanners.add(token.intoScanner(client));\n }\n\n // Drop the range partition [20, 30).\n AlterTableOptions dropEndOptions = new AlterTableOptions();\n dropEndOptions.dropRangePartition(lower2, upper2);\n client.alterTable(table.getName(), dropEndOptions);\n\n // Check the scanners work. The scanners for the tablets in the range [10, 20) definitely won't\n // see any rows. The scanners for the tablets in the range [20, 30) might see rows.\n int scannedRows = 0;\n for (KuduScanner scanner : scanners) {\n scannedRows += countRowsInScan(scanner);\n }\n assertTrue(String.format(\"%d >= %d / 3?\", scannedRows, numRows),\n scannedRows >= numRows / 3);\n assertTrue(String.format(\"%d <= 2 * %d / 3?\", scannedRows, numRows),\n scannedRows <= 2 * numRows / 3);\n }", "public static void randomNumsFile(String fileName, int howMany, int rangeFrom, int rangeTo) throws IOException\n {\n int temp; //to hold temporary value for swapping\n int number; //to hold generated random numbers\n if (rangeTo<rangeFrom) //check if upper limit is smaller than lower limit \n {\n //swap\n temp = rangeFrom;\n rangeFrom = rangeTo;\n rangeTo = temp;\n } \n // Open the file.\n PrintWriter outputFile = new PrintWriter(fileName);\n\n // Get data and write it to the file.\n for (int i = 1; i <= howMany; i++)\n {\n Random randomNumber = new Random();//set up an object to generate random nubmers\n number = randomNumber.nextInt((rangeTo - rangeFrom) + 1) + rangeFrom; // generate random number\n // Write the number to the file.\n outputFile.println(number);\n }\n // Close the file.\n outputFile.close();\n }", "List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);", "public void makeSegDats(){\n\t\ttry {\n\t\t\tFile preSgr = new File (ucscGeneTableFileSelect.getParentFile(),selectName+\"_exprGenes.sgr\");\n\t\t\tPrintWriter outPreSgr = new PrintWriter (new FileWriter (preSgr));\n\t\t\tFile postSgr = new File (ucscGeneTableFileSelect.getParentFile(),selectName+\"_exprGeneMedian.sgr\");\n\t\t\tPrintWriter outPostSgr = new PrintWriter (new FileWriter (postSgr));\n\t\t\t//instantiate Bar parser\n\t\t\tScoreParsedBars barParser = new ScoreParsedBars (barDirectory, bpPositionOffSetBar, bpPositionOffSetRegion);\n\t\t\t//make array to hold SegDats\n\t\t\tArrayList segDatsAL = new ArrayList();\n\t\t\t//for each chromosome in select genes\n\t\t\tIterator it = genesSelect.keySet().iterator();\n\t\t\twhile (it.hasNext()){\n\t\t\t\t//get genes\n\t\t\t\tString chrom = (String)it.next();\n\t\t\t\tUCSCGeneLine[] chrGenes = (UCSCGeneLine[])genesSelect.get(chrom);\n\t\t\t\t//for each gene \n\t\t\t\tfor (int i=0; i< chrGenes.length; i++){\n\t\t\t\t\t//fetch Grs\n\t\t\t\t\tArrayList al = barParser.fetchRegionGrs(chrom, chrGenes[i].getTxStart() - extensionToSegment, chrGenes[i].getTxEnd() + extensionToSegment);\n\t\t\t\t\tGr[] grs = new Gr[al.size()];\n\t\t\t\t\tal.toArray(grs);\n\t\t\t\t\t//for each Gr, check to see if it is entirely contained in the gene, if so assign the median value\n\t\t\t\t\tint posStart = -1;\n\t\t\t\t\tint posEnd = -1;\n\t\t\t\t\tfloat median = chrGenes[i].getScores()[0];\n\t\t\t\t\t//these gr positions have been modified by the bpPositionOffSet, shifted left to start of oligo\n\t\t\t\t\t//shrink size too\n\t\t\t\t\tint start = chrGenes[i].getTxStart()+ bpShrink;\n\t\t\t\t\tint end = chrGenes[i].getTxEnd() + bpPositionOffSetRegion - bpShrink;\n\t\t\t\t\tif (end < start) {\n\t\t\t\t\t\tSystem.out.println(\"\\tSkipping \"+chrGenes[i].getName() + \" End shrinking eliminated gene.\");\n\t\t\t\t\t}\n\t\t\t\t\tfor (int x =0; x< grs.length; x++){\n\t\t\t\t\t\toutPreSgr.println(chrom +\"\\t\"+grs[x]);\n\t\t\t\t\t\t//clip it to median\n\t\t\t\t\t\tif (grs[x].getScore() > median) grs[x].setScore(median);\n\t\t\t\t\t\t//is it contained? Set to median\n\t\t\t\t\t\tif (grs[x].getPosition() >= start && grs[x].getPosition() <= end) {\n\t\t\t\t\t\t\t//set score to median\n\t\t\t\t\t\t\tgrs[x].setScore(median);\t\t\t\t\t\t\n\t\t\t\t\t\t\t//set start\n\t\t\t\t\t\t\tif (posStart == -1) posStart = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//not contained, has start been set? if so then check stop\n\t\t\t\t\t\telse if (posStart != -1 && posEnd == -1){\n\t\t\t\t\t\t\t//start has been set, stop has not, thus set stop to prior Gr position\n\t\t\t\t\t\t\tposEnd = x - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutPostSgr.println(chrom +\"\\t\"+grs[x]);\n\t\t\t\t\t}\n\n\t\t\t\t\t//save data\n\t\t\t\t\tsegDatsAL.add(new SegDat(chrGenes[i], grs, posStart, posEnd));\n\t\t\t\t}\n\t\t\t}\n\t\t\tsegDats = new SegDat[segDatsAL.size()];\n\t\t\tsegDatsAL.toArray(segDats);\n\n\t\t\toutPreSgr.close();\n\t\t\toutPostSgr.close();\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void testPartitionColumnSelection() {\n Path filePath = new Path(\"hdfs:///w/x/y/z.csv\");\n ImplicitColumnManager implictColManager = new ImplicitColumnManager(\n fixture.getOptionManager(),\n standardOptions(filePath));\n\n String dir0 = ScanTestUtils.partitionColName(0);\n // Sic: case insensitivity, but name in project list\n // is preferred over \"natural\" name.\n String dir1 = \"DIR1\";\n String dir2 = ScanTestUtils.partitionColName(2);\n ScanLevelProjection scanProj = ScanLevelProjection.build(\n RowSetTestUtils.projectList(dir2, dir1, dir0, \"a\"),\n Lists.newArrayList(implictColManager.projectionParser()));\n\n assertEquals(4, scanProj.columns().size());\n assertEquals(dir2, scanProj.columns().get(0).name());\n assertEquals(dir1, scanProj.columns().get(1).name());\n assertEquals(dir0, scanProj.columns().get(2).name());\n assertEquals(\"a\", scanProj.columns().get(3).name());\n\n // Verify column type\n\n assertTrue(scanProj.columns().get(0) instanceof PartitionColumn);\n }", "public partition(String partition, int max_size){\n //max_size is the maximum number of Objects, NOT max bytes\n String[] keyTypes = partition.split(\"\\\\s+\"); //separted by any white space\n \n List<String> listStringKeys = new ArrayList<String>();\n List<String> listLongKeys = new ArrayList<String>();\n List<String> listDoubleKeys = new ArrayList<String>();\n List<String> listBoolKeys = new ArrayList<String>();\n \n for(int i = 0; i < keyTypes.length; i++){\n String[] parts = keyTypes[i].split(separator);\n if(parts[1].equals(\"STRING\"))\n listStringKeys.add(keyTypes[i]);\n else if(parts[1].equals(\"LONG\"))\n listLongKeys.add(keyTypes[i]);\n else if(parts[1].equals(\"DOUBLE\"))\n listDoubleKeys.add(keyTypes[i]);\n else if(parts[1].equals(\"BOOL\"))\n listBoolKeys.add(keyTypes[i]);\n }\n \n keyForString = listStringKeys.toArray(new String[listStringKeys.size()]);\n keyForLong = listLongKeys.toArray(new String[listLongKeys.size()]);\n keyForDouble = listDoubleKeys.toArray(new String[listDoubleKeys.size()]);\n keyForBool = listBoolKeys.toArray(new String[listBoolKeys.size()]);\n \n longValues = new long[max_size];\n doubleValues = new double[max_size];\n booleanValues = new byte[max_size];\n stringValues = new long[max_size];\n \n objectIds= new int[max_size];\n numObject = 0;\n UndefByte[0] = -1;\n }", "private void createRegions() {\n\t\t// create pitch regions\n\t\tfor (int column = 0; column < REGION_COLUMNS; column++) {\n\t\t\tfor (int row = 0; row < REGION_ROWS; row++) {\n\t\t\t\tthis.regions.add(new Rectangle(column * REGION_WIDTH_IN_PX, row * REGION_HEIGHT_IN_PX,\n\t\t\t\t\t\t REGION_WIDTH_IN_PX, REGION_HEIGHT_IN_PX));\n\t\t\t}\n\t\t}\n\t}", "public void loadSpinnerStart(){\r\n \r\n ObservableList<Integer> start = FXCollections.observableArrayList(\r\n 7,8,9,10,11,12,13,14,15,16,17,18,19,20);\r\n\r\n // Value factory.\r\n SpinnerValueFactory<Integer> valueFactory = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<Integer>(start);\r\n SpinnerValueFactory<Integer> valueFactory2 = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<Integer>(start);\r\n \r\n valueFactory.setValue(7);\r\n valueFactory2.setValue(7);\r\n \r\n \r\n spnStart1.setValueFactory(valueFactory);\r\n spnStart2.setValueFactory(valueFactory2);\r\n \r\n ObservableList<Integer> end = FXCollections.observableArrayList(\r\n 8,9,10,11,12,13,14,15,16,17,18,19,20,21);\r\n\r\n // Value factory.\r\n SpinnerValueFactory<Integer> valueFactory3 = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<Integer>(end);\r\n SpinnerValueFactory<Integer> valueFactory4 = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<Integer>(end);\r\n \r\n valueFactory3.setValue(8);\r\n valueFactory4.setValue(8);\r\n \r\n \r\n spnEnd1.setValueFactory(valueFactory3);\r\n spnEnd2.setValueFactory(valueFactory4);\r\n \r\n }" ]
[ "0.6009191", "0.56652415", "0.5236926", "0.51691186", "0.5144511", "0.51141816", "0.50413775", "0.50235015", "0.50170314", "0.49688017", "0.49509385", "0.49398622", "0.4925246", "0.4868305", "0.48529792", "0.4825527", "0.48082158", "0.4800891", "0.4751627", "0.4746135", "0.47339907", "0.47062415", "0.4673757", "0.4663872", "0.46542037", "0.4654093", "0.46435526", "0.46395522", "0.4629901", "0.46202376", "0.4611086", "0.45992076", "0.4597766", "0.45959964", "0.45840093", "0.45799732", "0.4570174", "0.45607105", "0.45585576", "0.45569846", "0.45475793", "0.45467326", "0.45454827", "0.45319083", "0.45285425", "0.45273742", "0.45266908", "0.45237926", "0.4522126", "0.4520895", "0.45166612", "0.45127293", "0.45044297", "0.45013735", "0.4499707", "0.4497229", "0.44952208", "0.44883388", "0.4485817", "0.4484538", "0.44835052", "0.4465112", "0.4464135", "0.44572213", "0.44550905", "0.44526783", "0.44522786", "0.44516823", "0.44494137", "0.44428608", "0.44396445", "0.4438092", "0.44379818", "0.44318113", "0.44286022", "0.44267496", "0.44143942", "0.4405716", "0.44048345", "0.43986544", "0.43949452", "0.4388394", "0.43872458", "0.43862364", "0.43819934", "0.43808386", "0.437976", "0.4378795", "0.4375819", "0.43754828", "0.4372356", "0.4365834", "0.43622708", "0.4361779", "0.43589452", "0.43576452", "0.4348463", "0.43468672", "0.4341999", "0.43414977" ]
0.47718865
18
overload that uses default sample size.
public static ValueRange[] designPartitions (SampleableTupleReader tupleReader, int partitioningColumnIndex, int numPartitions) throws IOException { return designPartitions(tupleReader, partitioningColumnIndex, numPartitions, DEFAULT_SAMPLE_SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public void setSampleSize(int size){\r\n\t\tSampleSize = size;\r\n\t}", "int getSampleSize();", "public int getSampleSize(){\n\t\treturn sampleSize;\n\t}", "public int getSampleSize() {\n return sampleSize;\n }", "public void setSampleSize(int n){\n\t\tsetParameters(populationSize, type1Size, n);\n\t}", "public void setSamples(int samples){ \n this.samples = samples; \n }", "public void setInitialSampleSize(int initialSampleSize) throws ConfigException {\n if (this.initialSize == initialSampleSize) return;\n this.initialSampleSize = initialSampleSize;\n update();\n }", "public void setSampleSize(int sampleSize)\n {\n this.bitmapSampleSize = sampleSize;\n }", "public void setSampleMode( SampleMode sampleMode );", "public void setSamplingRate( int samplingRate ) {\r\n this.samplingRate = samplingRate;\r\n }", "public int nSamples() {\n return samples.nSamples();\n }", "@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}", "@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}", "@Override\n public Builder sampling(double sampling) {\n super.sampling(sampling);\n return this;\n }", "void setSamplingIntervalMs(long ms);", "public int getAudioSampleSize() {\n\t\treturn mSampleSize;\n\t}", "public static int size_sampleCnt() {\n return (32 / 8);\n }", "public void setSamplingRate(int value) {\n this.samplingRate = value;\n }", "public int calculateSize( int numSamples )\n {\n return numSamples * 2;\n }", "@Test\n public void setSampleSizeInBits_8() {\n final int SAMPLE_SIZE_BITS = 8;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "public int getBytesPerSample();", "int getSampleMs();", "public abstract double sample();", "public int getSampleRate() {\n return 0;\n }", "@Test\n public void setSampleSizeInBits_1() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = 1;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "double sample();", "public void setType1Size(int r){\n\t\tsetParameters(populationSize, r, sampleSize);\n\t}", "private void loadSamplesWithScale() {\n\t\tpixelsPerSample = (int)(guiScale * 2);\n\t\t//pixelsPerSample = 10;\n\t\tassert(pixelsPerSample != 0);\n\t\t// Get the amount of samples that can be rendered in the display\n\t\tGSamplesInDisplay = displayWidth / pixelsPerSample;\n\t\tSystem.out.println(\"GSamplesInDisplay: \" + GSamplesInDisplay + \" - of \" + pixelsPerSample + \" pixel each\");\n\t\t// How Many Music Samples from the audio file do we want to 'show' in the window\n\t\t// Default 'all'\n\t\tint AUSamplesInWindow = (int) (loader.getStreamSampleLength()*scale);\n\t\tAUSamplesInGSample = AUSamplesInWindow / GSamplesInDisplay;\n\t\t\n\t\tassert(AUSamplesInGSample != 0); \n\t\t// Get how many pixels are per second\n\t\tsecondsInDisplay = AUSamplesInWindow / sampleRate; // Normally 44100\n\t\tSystem.out.println(\"Seconds Calculalted After: \" + secondsInDisplay);\n\t\t\n\t\tpixelsPerSecond = (displayWidth / secondsInDisplay);\n\t\tSystem.out.println(\"Pixels Per Second: \" + pixelsPerSecond);\n\t\tassert(pixelsPerSecond != 0);\n\t\t// Now Get the XEnd of what is resting to show from the music\n\t\t\n\t\t\n\t}", "public SampleMemory(int size) {\n this.memory = new double[size];\n this.pointer = 0;\n }", "private static void sample1(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n ScoredDocIDsIterator it = collection.iterator();\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n int prime = findGoodStepSize(collectionSize, sampleSize);\n int mod = prime % collectionSize;\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n int sampleCount = 0;\n int index = 0;\n for (; sampleCount < sampleSize;) {\n if (index + mod < collectionSize) {\n for (int i = 0; i < mod; i++, index++) {\n it.next();\n }\n } else {\n index = index + mod - collectionSize;\n it = collection.iterator();\n for (int i = 0; i < index; i++) {\n it.next();\n }\n }\n sample[sampleCount++] = it.getDocID();\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "public SampleMode getSampleMode();", "public interface Sampler<T> {\n\n T sample();\n}", "@Test\n public void setSampleSizeInBits_24() {\n final int SAMPLE_SIZE_BITS = 24;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "public int getSamplingRate() {\n return samplingRate;\n }", "@Test\n public void setSampleSizeInBits_16() {\n final int SAMPLE_SIZE_BITS = 16;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n }", "static void run_sample(int i)\r\n\t{\r\n\t}", "@Test\n\tpublic void testSampleSize1() {\n\t\t// Check size of pyr piece\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(2, pyr1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(3, pyr2.getHeight());\n\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tPiece l = new Piece(Piece.STICK_STR);\n\t\tassertEquals(1, l.getWidth());\n\t\tassertEquals(4, l.getHeight());\n\t}", "@Override\n public void setBufferSize(int arg0) {\n\n }", "private static void sample2(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n IntPriorityQueue pq = new IntPriorityQueue(sampleSize);\n /*\n * Convert every value in the collection to a hashed \"weight\" value, and insert\n * into a bounded PQ (retains only sampleSize highest weights).\n */\n ScoredDocIDsIterator it = collection.iterator();\n while (it.next()) {\n pq.insertWithReuse((int)(it.getDocID() * PHI_32) & 0x7FFFFFFF);\n }\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n /*\n * Extract heap, convert weights back to original values, and return as integers.\n */\n Object[] heap = pq.getHeap();\n for (int si = 0; si < sampleSize; si++) {\n sample[si] = (int)(((IntPriorityQueue.MI)(heap[si+1])).value * PHI_32I) & 0x7FFFFFFF;\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "public abstract double samplingFrequency();", "public static int sizeBits_sampleCnt() {\n return 32;\n }", "public int getSamplingRate( ) {\r\n return samplingRate;\r\n }", "protected void setSampleCountImpl(int newSampleCount) {\n\t\tif (sampleCount != newSampleCount) {\n\t\t\tsampleCount = newSampleCount;\n\t\t}\n\t}", "public int getSamples(){ \n return this.samples; \n }", "public int getSampleRate() {\r\n\treturn SAMPLES_IN_SECOND;\r\n}", "private static int calculateInSampleSize(Options options, int reqWidth, int reqHeight) {\n\t\tfinal int height = options.outHeight;\r\n\t\tfinal int width = options.outWidth;\r\n\t\tint inSampleSize = 1;\r\n\r\n\t\tif (height > reqHeight || width > reqWidth) {\r\n\t\t\tif (width > height) {\r\n\t\t\t\tinSampleSize = Math.round((float) height / (float) reqHeight);\r\n\t\t\t} else {\r\n\t\t\t\tinSampleSize = Math.round((float) width / (float) reqWidth);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn inSampleSize;\r\n\t}", "public void updateSamples();", "@Override\r\n\tpublic float getSample(long us) {\n\t\treturn 0;\r\n\t}", "int pauseSamples() {\n return 0;\n }", "private void addSampleData() {\r\n }", "@Override public long getSimulatedSize() {\n return 1;\n }", "public void setSampleRate(Integer sampleRate) {\n this.sampleRate = sampleRate;\n }", "protected int pixelOneSample() {\r\n\t\treturn getGraphWidth() / section.getLength();\r\n\t}", "public void setSampleRate(int value) {\n this.sampleRate = value;\n }", "public void reset ()\r\n\t{\r\n\t\tsuper.reset();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "private static int[] repeatableSample(ScoredDocIDs collection,\n int collectionSize, int sampleSize)\n throws IOException {\n return repeatableSample(collection, collectionSize,\n sampleSize, Algorithm.HASHING, Sorted.NO);\n }", "void setBufferSize(int bufferSize);", "public JavaRandomSampleOperator(int sampleSize, DataSetType type) {\n super(sampleSize, type, Methods.RANDOM);\n rand = new Random();\n }", "public static void resample(){\n System.out.println(\"Type in how many random people you want in the db\");\n String s = sc.nextLine();\n int sampleSize = getValidSampleCount(s);\n Db.getDb().resampleDb(sampleSize);\n System.out.println(\"New sample of \" + s + \" generated.\");\n }", "boolean startSample(int loopCount, float gain, int delay) {\n if (debugFlag)\n debugPrint(\"JSChannel: startSample must be overridden\");\n return false;\n }", "public int readSamples(float[] samples);", "@Test\n\tpublic void testSampleSize() {\n\t\t// Check size of pyr piece\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(2, pyr1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(3, pyr2.getHeight());\n\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tPiece l = new Piece(Piece.STICK_STR);\n\t\tassertEquals(1, l.getWidth());\n\t\tassertEquals(4, l.getHeight());\n\t\t\n assertEquals(4, stickRotated.getWidth());\n assertEquals(1, stickRotated.getHeight());\n \n assertEquals(2, square.getWidth());\n assertEquals(2, square.getHeight());\n \n assertEquals(2, sRotated.getWidth());\n assertEquals(3, sRotated.getHeight());\n\t}", "@Override\n protected void initializeSample(SamplingContext context) {\n for(int i = 0 ; i < this.EVars.length ; i++) {\n Variable EVar = this.EVars[i];\n int EVal = this.EVals[i];\n int EIndex = Toolkit.indexOf(this.sampledVars, EVar);\n context.sampledVarsAssignment[EIndex] = EVal;\n }\n // produce a few samples to get the network into a more \"normal\" state\n for(int i = 0 ; i < this.resamplingActions.size() * 2 ; i++)\n this.produceSample(context);\n context.sampleWeight = 1.0;\n\n /*WeightedSampleProducer weightedSampler = new WeightedSampleProducer(\n this.bn, this.XVars, this.YVars, this.EVars, this.EVals);\n // the variable values are preserved after the following call\n weightedSampler.produceSample(context); // evidence is correctly set\n context.sampleWeight = 1.0;*/\n }", "void initScale(){\n samplingScale = getScaleAdaptive(x);\n }", "@Override\n\tpublic void setBufferSize(int size) {\n\t}", "public int getSampleRate() {\n return sampleRate;\n }", "public void setSamples(List<Sample> samples)\n {\n this.samples = samples;\n }", "@Test\n public void setSampleSizeInBits_minus1() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = -1;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "void enableSampledStatistics();", "public void set_sampleCnt(long value) {\n setUIntBEElement(offsetBits_sampleCnt(), 32, value);\n }", "public int SampleNum() {\n\t\treturn sample_map.size();\n\t}", "private static int calculateInSampleSize(\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\n final int width = options.outWidth;\n int inSampleSize = 1;\n\n if (height > reqHeight || width > reqWidth) {\n\n final int halfHeight = height / 2;\n final int halfWidth = width / 2;\n\n // Calculate the largest inSampleSize value that is a power of 2 and keeps both\n // height and width larger than the requested height and width.\n while ((halfHeight / inSampleSize) > reqHeight\n && (halfWidth / inSampleSize) > reqWidth) {\n inSampleSize *= 2;\n }\n }\n\n Log.i(\"sampleImage\", \"Displaying img at \" + reqWidth + \"px x \" + reqHeight + \"px (\" + inSampleSize + \" SampleSize)\");\n\n return inSampleSize;\n }", "public Sample(int numberOfInputs, int numberOfOutputs)\n {\n inputs = new ArrayList<>();\n outputs = new ArrayList<>();\n this.numberOfInputs = numberOfInputs;\n this.numberOfOutputs = numberOfOutputs;\n }", "public void setSampleRate(int sampleRate) {\r\n\t\tthis.sampleRate = sampleRate;\r\n\t}", "@Test\n public void setSampleRate_8000() {\n final float SAMPLE_RATE = 8000f;\n AudioConfigManager.setSampleRate(SAMPLE_RATE);\n assertEquals(AudioFormatConfig.sampleRate, SAMPLE_RATE);\n }", "private int calculateInSampleSize(Options options, int reqWidth,\n\t\t\t\tint reqHeight) {\n\t\t\tfinal int height = options.outHeight;\n\t\t\tfinal int width = options.outWidth;\n\t\t\tint inSampleSize = 1;\n\t\t\t\n\t\t\tif (height > reqHeight || width > reqWidth){\n\t\t\t\tif(width > height){ // 작은 크기에 맞춰서 줄이는데 왜? // 큰키게에 맞춰서 줄여야지 여백이 생기더라도 이미지가 잘리지 않을 텐데\n\t\t\t\t\t//600,800경우와 300, 80 경우를 생각을 해보면 req100,100일때... 맞는거 같은데 궁금\n\t\t\t\t\t//그래서 내 생각대로 바꿈\n\t\t\t\t\tinSampleSize = Math.round((float)width / (float)reqWidth);\t\t\t\t\t\n\t\t\t\t} else{\n\t\t\t\t\tinSampleSize = Math.round((float)height / (float)reqHeight);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn inSampleSize;\n\t\t}", "@Test\n\tpublic void testSampleSize2() {\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(1, stick1.getWidth());\n\t\tassertEquals(2, square1.getWidth());\n\t\tassertEquals(2, l1_1.getWidth());\n\t\tassertEquals(2, l2_1.getWidth());\n\t\tassertEquals(3, s1_1.getWidth());\n\t\tassertEquals(3, s2_1.getWidth());\n\t\t\n\t\tassertEquals(2, pyr1.getHeight());\n\t\tassertEquals(4, stick1.getHeight());\n\t\tassertEquals(2, square1.getHeight());\n\t\tassertEquals(3, l1_1.getHeight());\n\t\tassertEquals(3, l2_1.getHeight());\n\t\tassertEquals(2, s1_1.getHeight());\n\t\tassertEquals(2, s2_1.getHeight());\n\t\t\n\t\t// Now try after rotation\n\t\t// Effectively we're testing size and rotation code here\n\t\tassertEquals(2, pyr2.getWidth());\n\t\tassertEquals(4, stick2.getWidth());\n\t\tassertEquals(2, square2.getWidth());\n\t\tassertEquals(3, l1_2.getWidth());\n\t\tassertEquals(3, l2_2.getWidth());\n\t\tassertEquals(2, s1_2.getWidth());\n\t\tassertEquals(2, s2_2.getWidth());\n\t\t\n\t\tassertEquals(3, pyr2.getHeight());\n\t\tassertEquals(1, stick2.getHeight());\n\t\tassertEquals(2, square2.getHeight());\n\t\tassertEquals(2, l1_2.getHeight());\n\t\tassertEquals(2, l2_2.getHeight());\n\t\tassertEquals(3, s1_2.getHeight());\n\t\tassertEquals(3, s2_2.getHeight());\n\t\t\t\n\t\t// Now try with some other piece, made a different way\n\t\tassertEquals(3, pyr1.getWidth());\n\t\tassertEquals(1, stick3.getWidth());\n\t\tassertEquals(2, square3.getWidth());\n\t\tassertEquals(2, l1_5.getWidth());\n\t\tassertEquals(2, l2_5.getWidth());\n\t\tassertEquals(3, s1_5.getWidth());\n\t\tassertEquals(3, s2_5.getWidth());\n\t\t\n\t\tassertEquals(2, pyr1.getHeight());\n\t\tassertEquals(4, stick3.getHeight());\n\t\tassertEquals(2, square3.getHeight());\n\t\tassertEquals(3, l1_5.getHeight());\n\t\tassertEquals(3, l2_5.getHeight());\n\t\tassertEquals(2, s1_5.getHeight());\n\t\tassertEquals(2, s2_5.getHeight());\n\t\t\n\t}", "@Test\n public void setSampleSizeInBits_7() {\n Assertions.assertThrows(IllegalArgumentException.class, () -> {\n final int SAMPLE_SIZE_BITS = 7;\n AudioConfigManager.setSampleSizeInBits(SAMPLE_SIZE_BITS);\n assertEquals(AudioFormatConfig.sampleSizeInBits, SAMPLE_SIZE_BITS);\n });\n }", "public float getSampleRate();", "public int samplesOnePixel() {\r\n\t\tif (getGraphWidth() > 0) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn section.getLength() / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "int getNumSampleDimensions();", "public JavaRandomSampleOperator(int sampleSize, long datasetSize, DataSetType type) {\n super(sampleSize, datasetSize, type, Methods.RANDOM);\n rand = new Random();\n }", "public void setSampleRate(float rate)\n {\n samplingDelay = (int)(ONE_SECOND/rate);\n }", "public void setConstantSamples(String sourceEntry);", "@java.lang.Override\n public io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getRandomSamplingOrBuilder() {\n return getRandomSampling();\n }", "protected void processSamples(byte[] sample, int offset, int length,\n\t\t\tint numberOfSamples) throws IOException {\n\n\t}", "private int caculateInSampleSize(BitmapFactory.Options options, int width, int height) {\r\n int outWidth = options.outWidth;\r\n int outHeight = options.outHeight;\r\n int inSampleSize=1;\r\n if (outWidth>width||outHeight>height){\r\n int widthRadio= Math.round(outWidth*1.0f/width);\r\n int heightRadio= Math.round(outHeight*1.0f/height);\r\n inSampleSize= Math.max(widthRadio,heightRadio);\r\n }\r\n\r\n return inSampleSize;\r\n }", "int nextSample(final double mean);", "@Test\n public void sampleRateChangeChangesFrameRate() {\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n AudioConfigManager.setSampleRate(16000f);\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n AudioConfigManager.setSampleRate(44100f);\n assertEquals(AudioFormatConfig.frameRate, AudioFormatConfig.sampleRate);\n }", "public void initialize(int size);", "@java.lang.Override\n public boolean getUsePlayerBasedSampling() {\n return usePlayerBasedSampling_;\n }", "public static boolean isArray_sampleCnt() {\n return false;\n }", "public final int[] getSampleSize() {\n int sampleSize[] = new int[numBands];\n int sizeInBits = getSampleSize(0);\n\n for (int i = 0; i < numBands; i++)\n sampleSize[i] = sizeInBits;\n\n return sampleSize;\n }", "void update_sample(int new_sample) {\n\t sample_choice = new_sample;\n\t combine_message_and_sample();\n\t update_content();\n }", "public void setBufferSize(int bufferSize) {\n this.bufferSize = bufferSize;\n }", "public void set_sampling_parameter(double pass_freq) {\n\t\tfinal double pi = 3.1415926535897932385;\n\n\t\t// Low-pass: R = 10kOhm, C = 1000pF; w0l = 1/RC = 1/(1e4*1e-9) = 100000\n\t\t// High-pass: R = 1kOhm, C = 10uF; w0h = 1/RC = 1/(1e3*1e-5) = 100\n\t\t// Multiply with 1.048576 to facilitate division by 1 000 000 by right-\n\t\t// shifting 20 times (2 ^ 20 = 1048576).\n\n\t\tw0hp = 105;\n\t\tw0lp = (int /* sound_sample */) (pass_freq * (2.0 * pi * 1.048576));\n\t\tif (w0lp > 104858)\n\t\t\tw0lp = 104858;\n\t}", "public void writeSamples( short[] samples, int offset, int numSamples );", "@Test\n public void testCreateScalableQuantizedRecorderSource() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorderSource\");\n Object forWhat = \"bla\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorderSource result = RecorderFactory.createScalableQuantizedRecorderSource(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<5000; i++) {\n result.getRecorder(\"X\"+ i%2).record(i);\n Thread.sleep(1);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n }", "public void AddKSamples(int max_num) {\n\t\t\n\t\tfor(int i=0; i<space.k_neighbour.size(); i++) {\n\t\t\tKDNodeDim dim = space.k_neighbour.get(i);\n\t\t\t\n\t\t\tfor(int j=0; j<space.sample_buff.size(); j++) {\n\t\t\t\tSample s = space.sample_buff.get(j);\n\t\t\t\tdim.kdnode.AddSample(s, max_num, dim.dim);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void setFrameSize_4() {\n final int FRAME_SIZE = 4;\n AudioConfigManager.setFrameSize(FRAME_SIZE);\n assertEquals(AudioFormatConfig.frameSize, FRAME_SIZE);\n }" ]
[ "0.7980416", "0.7814389", "0.769275", "0.7644276", "0.7557473", "0.69000196", "0.6845457", "0.66210735", "0.6553523", "0.65480196", "0.6368946", "0.63599765", "0.6331578", "0.6331578", "0.6268218", "0.61848253", "0.6182265", "0.6143171", "0.6139072", "0.6130328", "0.6065063", "0.5996774", "0.59723717", "0.59597915", "0.5919829", "0.5913347", "0.5893012", "0.5887579", "0.58842885", "0.5875845", "0.5859644", "0.5848465", "0.58287317", "0.58217704", "0.58051544", "0.58030325", "0.580127", "0.5798849", "0.5798657", "0.5797367", "0.5797344", "0.5791777", "0.57792914", "0.5760904", "0.5747826", "0.573579", "0.57325244", "0.57214326", "0.57086533", "0.5692211", "0.56773657", "0.56685257", "0.5660386", "0.5656383", "0.56480736", "0.56448454", "0.5642082", "0.5641292", "0.56223255", "0.56076735", "0.56041145", "0.5596404", "0.55915713", "0.5591405", "0.55843014", "0.55796134", "0.55723315", "0.5553444", "0.5550146", "0.55479866", "0.5536938", "0.5531817", "0.5531815", "0.55237913", "0.55153054", "0.5510693", "0.5505198", "0.54962116", "0.5494513", "0.54937154", "0.5484535", "0.54769504", "0.54609954", "0.54544026", "0.5447261", "0.54383457", "0.54266465", "0.5416643", "0.5408021", "0.5352488", "0.5332107", "0.5328254", "0.5320444", "0.5309455", "0.5300276", "0.5299866", "0.52993137", "0.5297996", "0.5294628", "0.52937275", "0.5293508" ]
0.0
-1
String prompt used to capture info.
public String getToken(String prompt) { do { try { System.out.print(prompt); String line = reader.readLine(); StringTokenizer tokenizer = new StringTokenizer(line,"\n\r\f"); if (tokenizer.hasMoreTokens()) { return tokenizer.nextToken(); } } catch (IOException ioe) { System.exit(0); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrompt(){\n\t\treturn getString(KEY_PROMPT);\n\t}", "String promptString();", "public String getPrompt() { return prompt; }", "static String promptForString(String prompt) {\n String line = \"\";\n\n System.out.println(prompt);\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public String getPrompt() {\n return prompt;\n }", "public static void printPrompt() {\n System.out.print(\" > \");\n }", "private String selectString(String prompt) {\n System.out.println(\"\\n\" + prompt);\n return input.next();\n }", "private String getCommandWithPrompt() {\n print(\"dbg<\" + pc + getLabel(pc) + \">\");\n return nextLine();\n }", "public String getPrompt() {\n\t\treturn prompt;\n\t}", "public String getPrompt(){ return _prompt ; }", "private String getCmdPromptString()\n {\n String prompt = currentUser.getName() + '@' + HOST_NAME + ':';\n prompt += currentUser.getHomeDir().getName().equals(currentUser.getCurrentDirectory().getName())\n ? '~'\n : currentUser.getCurrentDirectory().getName();\n\n prompt += currentUser.isRootUser() ? \"# \" : \"$ \";\n return prompt;\n }", "static String promptForString() {\n String line = \"\";\n\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "public String getString(String pPrompt) {\r\n\t\tSystem.out.println(pPrompt + \"\");\r\n\t\treturn input.nextLine();\r\n\t}", "public static String getString(String prompt)\n {\n System.out.print(prompt + \" \");\n return in.nextLine();\n }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "static String promptForString(String prompt, String defaultOption) {\n String line;\n System.out.println(prompt + \" (default=\" + defaultOption + \")\");\n\n System.out.print(\">\");\n // if (Menus.reader.()) {\n line = Menus.reader.nextLine().strip();\n //}\n\n if (line.compareTo(\"\") == 0)\n return defaultOption;\n return line;\n }", "private static String promptString(String descricao) {\n System.out.print(\"\\t>>> \" + descricao + \": \");\n return scan.nextLine();\n }", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "public static String promptForString(String title) {\n return (JOptionPane.showInputDialog(null,\n title));\n }", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "String prompt(String message) throws IOException;", "private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}", "public String promptString(String message) {\n ui.say(message);\n return ui.readString();\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "public void printPrompt() {\r\n\t\tif (!promptVisible) {\r\n\t\t\tsetPromptVisible(true);\r\n\t\t}\r\n\t\tprompt(rPrompt);\r\n\t}", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public String printNewEmailPrompt() {\n return \"Please enter new email: \";\n }", "public String printNewUsernamePrompt() {\n return \"Please enter new username: \";\n }", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "public static String inputBox(String promptMsg) {\n return JOptionPane.showInputDialog(promptMsg);\n }", "private static String promptFileContent(String prompt) {\n\t\tSystem.out.println(prompt);\n\t\tString line = null;\n\t\tString content = \"\";\n\t\twhile (!(line = scnr.nextLine()).equals(\"q\")) {\n\t\t\tcontent += line + \"\\n\";\n\t\t}\n\t\treturn content;\n\t}", "public static void printPrompt(String prompt) {\n System.out.print(prompt + \" \");\n System.out.flush();\n }", "public static void printNormalPrompt() {\n System.out.println(\"[Normal]\");\n System.out.print(\" > \");\n }", "public void setPrompt() {\n\t\tcommandLine.append(\"$ \");\n\t}", "private String getPrompt(){\n return \"Now \" + (isWhiteTurn ? \"White\" : \"Black\");\n }", "private String promptForAlbumName() {\n\t\treturn (String)\n\t\t JOptionPane.showInputDialog(\n\t\t\t\talbumTree, \n\t\t\t\t\"Album Name: \", \n\t\t\t\t\"Add Album\",\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\t\"\");\t\t\n\t}", "public void printTitleAndPrompt(){\n System.out.println(\"\\n\\nSimple Chat System (CLIENT)\");\n System.out.println(\"Programmed by Kelvin Watson, OSU ID 932540242, onid: watsokel)\");\n System.out.println(\"**************************************************************\");\n System.out.println(\"TCP Connection established. Welcome to Simple Chat.\");\n System.out.print(\"Enter a user name (max 10 characters): \");\n }", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public void promptUser(String string) {\n\t\tJOptionPane.showMessageDialog(frame,string);\n\t\t\n\t}", "public abstract void printPromptMessage();", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public String printNewPasswordPrompt() {\n return \"Please enter new password: \";\n }", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "public boolean displayPrompt(String msg);", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "private static void displayPrompt() {\n System.out.println(\"This program converts a temperature in degrees Celsius into\");\n System.out.println(\"a temperature in degrees Fahrenheit. Enter a temperature in\");\n System.out.print(\"degrees Celsius: \");\n }", "public static String getString(String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n String s;\n\n // enter the string\n if (prompt != null) {\n System.out.print(prompt);\n }\n s = scanner.nextLine();\n return s;\n }", "public void startInfo() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = this.getInputString();\n\t\tSystem.out.println(\"Enter your mobile number:\");\n\t\tint number = this.getInputInteger();\n\t\tSystem.out.println(\"Enter your email:\");\n\t\tString email = this.getInputString();\n\t}", "public void setPrompt(String prompt) {\n\t\tthis.prompt = prompt;\n\t}", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "public String getPromptText(){\n\t\tString textPrev = text.substring(0, pointerPos);\n\t\tString textAfter =\"\";\n\t\tif(pointerPos < text.length() -1)\n\t\t\ttextAfter = text.substring(pointerPos+1,text.length());\n\t\tString str = textPrev.concat(textAfter);\n\t\tstr = str.trim().replaceAll(\" +\", \" \");\n\t\treturn (str);\n\t}", "protected abstract void fillPromptText();", "private static void promptAddress() {\n\t\tSystem.out.print(\"Please enter an address: \");\n\t}", "String prompt(String message, Color color) throws IOException;", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "public String getUserInput(String prompt) {\n Scanner scanner = new Scanner(System.in);\n\n // prompt for the user's name\n System.out.print(prompt);\n\n // get their input as a String\n String userInput = scanner.next();\n\n return userInput;\n }", "public static void main(String[] args) {\nString answer= JOptionPane.showInputDialog(\"do you like dogs\");\n\tJOptionPane.showMessageDialog(null,(answer));\n\t}", "public Scene deliverPrompt()\n {\n System.out.println(prompt);\n deliverOptions();\n return takeResponse();\n }", "public void promptTitle(String title)\n {\n this.title = title;\n }", "private String askForLine(String message) {\r\n System.out.print(message);\r\n return sc.nextLine();\r\n }", "public void setPrompt(String prompt){\n\t\tsetValue(KEY_PROMPT, prompt);\n\t}", "public static String getString(Scanner scnr, String prompt) {\n\t\t// This approach uses exception handling.\n\t\tSystem.out.print(prompt);\n\t\treturn scnr.nextLine();\n\t}", "public Prompt getPrompt() {\n return prompt;\n }", "public void Prompt(){\n System.out.println(\"Enter information about the topping: \\n\\n\");\n super.Prompt();\n System.out.println(\"Enter any topping: \");\n this.Topping = new String(this.read.next());\n this.read.nextLine();\n System.out.println(\"Density:\\n 1. Heavy\\n 2. Standard\\n 3. Light\\n(Enter corresponding number): \");\n this.Density = this.read.nextInt();\n System.out.println(\"Is it vegetarian? (true or false): \");\n this.Vegetarian = this.read.nextBoolean();\n System.out.println(\"\\n\");\n }", "public static String inString(String prompt) {\n inputFlush();\n printPrompt(prompt);\n return inString();\n }", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "String promptSecureString();", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Echo\")\n public void echo() {\n // Query the user for an input\n String answer = JOptionPane.showInputDialog(null, \"This is an example.\\nType in any text to echo.\");\n // Show an information message\n JOptionPane.showMessageDialog(null, \"You typed '\" + answer + \"'\", \"Example Echo\", JOptionPane.INFORMATION_MESSAGE);\n }", "private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n return result;\r\n \r\n }", "public static String readEntry(String prompt) {\n\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while (c != '\\n' && c != -1) // while not newline or EOF\n {\n buffer.append((char) c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "private String getName()\r\n {\r\n return JOptionPane.showInputDialog(frame, \"Choose a screen name:\", \"Screen name selection\",\r\n JOptionPane.PLAIN_MESSAGE);\r\n }", "public static String promptWithOptions(List<String> options, String prompt) {\n String input = \"\";\n String optionsFormatter = \"(\" + String.join(\"|\", options) + \")\";\n\n\n while (!options.contains(input)) {\n System.out.println(prompt + \" \" + optionsFormatter);\n System.out.print(\">\");\n input = promptForString();\n }\n return input;\n }", "public void askForSpeaker(){\n System.out.println(\"Enter the speaker username\");\n }", "public void setPrompt(String prompt) {\n this.prompt = prompt == null ? null : prompt.trim();\n }", "public static void mainText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'STU' 3.'FAC' 4.SQL query 5.'MORE' -for more detail about options\");\n\t}", "public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }", "public void setPrompt(Prompt prmpt) {\n this.prompt = prmpt;\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "void drawPrompt(String message);", "@Override \n\tpublic String toString(){\n\t\tString info = \"label: \" + label + \"\\nmessage: \" + message + \"\\nprompt: \" + prompt;\n\t\treturn info;\n\t}", "public static void printEnterQuestionLine() {\n System.out.println(ENTER_QUESTION_LINE);\n printPrompt();\n }", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "InputPromptTransmitter getInputPromptTransmitter();", "private static String[] prompt(String prompt) {\n\t\tSystem.out.print(prompt);\n\t\tString line = scnr.nextLine();\n\t\tString []words = line.trim().split(\" \", 2);\n\t\treturn words;\n\t}", "String consoleInput();", "public void displayPrompt()\n\t{\n\t\tif (ch.usingJog.length() > 0)\n\t\t\treturn;\n\t\t\t\n\t\tif (showPrompt)\n\t\t{\n\t\t\t// Show the pageMode prompt if necessary.\n\t\t\tif (pageMode)\n\t\t\t{\n\t\t\t\tpageMode = false;\n\t\t\t\tsendln(\"\");\n\t\t\t\tsendln(\"{Y[== {CPAGE MODE: {wPush enter to continue. See {W'{chelp pagemode{W' {wfor details. {Y==]{x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\tpageMode = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Show the editor prompt if necessary.\n\t\t\tif (cs == ConnState.EDITING)\n\t\t\t{\n\t\t\t\tsend(\"{G > {x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsend(\"{x\");\n\t\t\tif (!prefs.get(\"compact\"))\n\t\t\t\tsendln(\"\");\n\t\t\tif (tempPrompt.length() > 0)\n\t\t\t\tsendln(tempPrompt);\n\t\t\telse\n\t\t\t{\n\t\t\t\tString pr = prompt;\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t\tpr = bprompt;\n\t\t\t\tif (!prefs.get(\"prompt\"))\n\t\t\t\t\tpr = \"\";\n\t\t\t\t\n\t\t\t\tString exitLine = \"\";\n\t\t\t\tfor (Exit e : ch.currentRoom.exits)\n\t\t\t\t\tif (e.flags.get(\"hidden\") && !(e.flags.get(\"door\") && !e.flags.get(\"closed\")))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (e.flags.get(\"door\") && e.flags.get(\"closed\"))\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toLowerCase();\n\t\t\t\t\telse\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toUpperCase();\n\t\t\t\t\n\t\t\t\tString lightString = \"\";\n\t\t\t\tint hour = Fmt.getHour();\n\t\t\t\tint season = Fmt.getSeason();\n\t\t\t\tint sunrise = Fmt.getSunrise(season);\n\t\t\t\tint sunset = Fmt.getSunset(season);\n\t\t\t\tif (hour < sunrise || hour > sunset)\n\t\t\t\t\tlightString = \"{D(){x\";\n\t\t\t\telse if (hour >= sunrise && hour < sunrise+2)\n\t\t\t\t\tlightString = \"{D({Y){x\";\n\t\t\t\telse if (hour <= sunset && hour > sunset-2)\n\t\t\t\t\tlightString = \"{Y({D){x\";\n\t\t\t\telse\n\t\t\t\t\tlightString = \"{Y(){x\";\n\n\t\t\t\tpr = pr.replace(\"%%\", \"SPEC_PERCENT\");\n\n\t\t\t\tpr = pr.replace(\"%h\", \"\"+ch.hp);\n\t\t\t\tpr = pr.replace(\"%H\", \"\"+ch.maxHp());\n\t\t\t\tpr = pr.replace(\"%p\", \"\"+((ch.hp*100)/ch.maxHp()));\n\t\t\t\tpr = pr.replace(\"%m\", \"\"+ch.mana);\n\t\t\t\tpr = pr.replace(\"%M\", \"\"+ch.maxMana());\n\t\t\t\tpr = pr.replace(\"%n\", \"\"+((ch.mana*100)/ch.maxMana()));\n\t\t\t\tpr = pr.replace(\"%s\", \"\"+ch.energy);\n\t\t\t\tpr = pr.replace(\"%S\", \"\"+ch.maxEnergy());\n\t\t\t\tpr = pr.replace(\"%i\", \"\"+((ch.energy*100)/ch.maxEnergy()));\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%x\", \"\"+ch.tnl);\n\t\t\t\tpr = pr.replace(\"%g\", \"\"+ch.gold);\n\t\t\t\tpr = pr.replace(\"%G\", \"\"+ch.bank);\n\t\t\t\tpr = pr.replace(\"%c\", \"\"+ch.combatQueue.size()/2);\n\n\t\t\t\tpr = pr.replace(\"%a\", ch.currentArea().name);\n\t\t\t\tpr = pr.replace(\"%r\", ch.currentRoom.name);\n\t\t\t\tpr = pr.replace(\"%e\", \"\"+exitLine);\n\t\t\t\tpr = pr.replace(\"%t\", \"\"+savedTells.size());\n\t\t\t\tpr = pr.replace(\"%T\", \"\"+timeFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%d\", \"\"+dateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%D\", \"\"+longDateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%l\", lightString);\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%A\", \"\"+ch.currentArea().id);\n\t\t\t\tpr = pr.replace(\"%R\", \"\"+ch.currentRoom.id);\n\t\t\t\tpr = pr.replace(\"%o\", olcMode);\n\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t{\n\t\t\t\t\tpr = pr.replace(\"%O\", Fmt.seeName(ch, ch.fighting));\n\t\t\t\t\tpr = pr.replace(\"%P\", \"\"+((ch.fighting.hp*100)/ch.fighting.maxHp()));\n\t\t\t\t\tpr = pr.replace(\"%N\", \"\"+((ch.fighting.mana*100)/ch.fighting.maxMana()));\n\t\t\t\t\tpr = pr.replace(\"%I\", \"\"+((ch.fighting.energy*100)/ch.fighting.maxEnergy()));\n\t\t\t\t}\n\n\t\t\t\tpr = pr.replace(\"SPEC_PERCENT\", \"%\");\n\t\t\t\t\n\t\t\t\tsend(pr+\"{x\");\n\t\t\t}\n\t\t\tshowPrompt = false;\n\t\t}\n\t}", "private void basicInfoDialogPrompt() {\n if(!prefBool){\n BasicInfoDialog dialog = new BasicInfoDialog();\n dialog.show(getFragmentManager(), \"info_dialog_prompt\");\n }\n }", "public static void printInfo() {\n System.out.println(\n \"This program asks user to enter vertical and horizontal sides\\n\"\n + \"for envelope A and envelope B both respectively.\"\n + \"Then it tells if some of envelope can fit into another.\\n\"\n + \"If user wants to repeat procedure with new envelopes he types y or yes (case insensitive)\\n\"\n + \"after the question \\\"Would you like to try again?\\\"\");\n }", "public static String promptCity(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the city: \");\n String output = scan.nextLine();\n return output;\n }", "abstract void mainPrompt();", "public static byte[] getPromptSuffix() {\n return p().promptSuffix;\n }", "public static void promptMsg(String infoMessage, String titleBar)\n {\n JOptionPane.showMessageDialog(null, infoMessage, \"Message: \" + titleBar, JOptionPane.INFORMATION_MESSAGE);\n }", "public String getUserInput(String question) {\r\n System.out.print(question);\r\n return scanner.next();\r\n }", "public static String promptForSelection(String title, String message, String[] options) {\n return (String) JOptionPane.showInputDialog(null,\n message,\n title,\n QUESTION_MESSAGE,\n null,\n options,\n options[0]);\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Imprime por pantalla la caca esta\");\r\n\t\t\r\n\t\tScanner entrada=new Scanner(System.in);\r\n\t\t\r\n\t\tString a=entrada.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(a);\r\n\t\t\r\n\t\tString caca=JOptionPane.showInputDialog(\"HOlaaa\");\r\n\t\t\r\n\t\tSystem.out.println(caca);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\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\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "String ask();", "public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }", "String getUserInput();" ]
[ "0.76307034", "0.7493219", "0.7319197", "0.71672463", "0.7115158", "0.7078978", "0.70619404", "0.70602727", "0.7022229", "0.70154256", "0.70057166", "0.69876796", "0.6986994", "0.69443125", "0.69410837", "0.68817204", "0.68433386", "0.68319666", "0.68256515", "0.67951566", "0.6750874", "0.6742499", "0.66935676", "0.6672901", "0.66680604", "0.66554797", "0.6594629", "0.6555582", "0.6538421", "0.6514894", "0.6508119", "0.6489352", "0.6460057", "0.64404136", "0.6416308", "0.6388558", "0.6387095", "0.63868827", "0.6382929", "0.6340597", "0.63138956", "0.63007885", "0.62978995", "0.6283495", "0.6275018", "0.62659097", "0.62610596", "0.62505364", "0.6239103", "0.6213401", "0.62031573", "0.6202248", "0.6176755", "0.61701393", "0.61567247", "0.6150979", "0.6148536", "0.61481005", "0.6142941", "0.612986", "0.6127139", "0.61210495", "0.6116983", "0.61151654", "0.61127317", "0.61018753", "0.6089899", "0.60624987", "0.6038849", "0.6029776", "0.60130715", "0.60046726", "0.5993561", "0.59867567", "0.59845483", "0.59661275", "0.59651846", "0.593733", "0.5926511", "0.59175146", "0.5917245", "0.5917188", "0.59161097", "0.59058696", "0.5891769", "0.5862712", "0.5856553", "0.5845602", "0.5838597", "0.5833404", "0.58317405", "0.5829369", "0.58168876", "0.58123523", "0.5806987", "0.5804364", "0.57964444", "0.5788905", "0.5784817", "0.5781465", "0.5779279" ]
0.0
-1
Integer prompt using token method.
public int getInt(String prompt) { do { try { String item = getToken(prompt); Integer num = Integer.valueOf(item); return num.intValue(); } catch (NumberFormatException nfe) { System.out.println("Please input a number "); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int promptNumber();", "public static int promptUserForInt(String prompt){\n Scanner scannerln = new Scanner(System.in);\n System.out.print(prompt);\n return scannerln.nextInt();\n }", "public int getInteger(String prompt) {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tString item = getToken(prompt);\r\n\t\t\t\tInteger number = Integer.valueOf(item);\r\n\t\t\t\treturn number.intValue();\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.println(\"Please input a number.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "private static int getIntFromUser(String prompt)\n\t {\n\t System.out.print(prompt); // Prompt user to enter input value\n\t return input.nextInt(); // Read and return user's response\n\t }", "private int readIntWithPrompt (String prompt) {\n System.out.print(prompt); System.out.flush();\n while (!in.hasNextInt()) {\n in.nextLine();\n System.out.print(prompt); System.out.flush();\n }\n int input = in.nextInt();\n in.nextLine();\n return input;\n }", "private static int getIntReply(String prompt) {\n System.out.print(prompt + \": \");\n String input = sc.nextLine();\n if (input.charAt(0) < 48 || input.charAt(0) > 57) {\n System.out.println(\"Invalid input\");\n return -1;\n } else return Integer.parseInt(input);\n }", "static int promptForNumber(String prompt) {\n String input;\n int value = -1;\n\n System.out.println(prompt);\n while (value == -1) {\n System.out.print(\">\");\n\n if (Menus.reader.hasNext()) {\n input = Menus.reader.nextLine().strip();\n try {\n value = Integer.parseInt(input);\n } catch (NumberFormatException e) {\n value = -1;\n }\n }\n }\n return value;\n }", "public int readInt(String prompt);", "public static int promptForInt(String prompt, int min, int max) throws IOException {\r\n\t\treturn (int) promptForLong(prompt, min, max);\r\n\t}", "public static int promptInt(Scanner console) {\n int num = 0;\n try {\n num = console.nextInt();\n } catch (InputMismatchException e) {\n console.next();\n }\n return num;\n }", "public String getToken(String prompt) {\n do {\n try {\n System.out.print(prompt);\n String line = reader.readLine();\n StringTokenizer tokenizer = new StringTokenizer(line,\"\\n\\r\\f\");\n if (tokenizer.hasMoreTokens()) {\n return tokenizer.nextToken();\n }\n }\n catch (IOException ioe) {\n System.exit(0);\n }\n } while (true);\n }", "public String getToken(String prompt) {\n do {\n try {\n System.out.print(prompt);\n String line = reader.readLine();\n StringTokenizer tokenizer = new StringTokenizer(line,\"\\n\\r\\f\");\n if (tokenizer.hasMoreTokens()) {\n return tokenizer.nextToken();\n }\n }\n catch (IOException ioe) {\n System.exit(0);\n }\n } while (true);\n }", "String prompt(String message) throws IOException;", "private boolean promptID() {}", "public String getToken(String prompt) {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(prompt);\r\n\t\t\t\tString line = reader.readLine();\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line, \"\\n\\r\\f\");\r\n\t\t\t\tif (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\treturn tokenizer.nextToken();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "static int promptForNumber() {\n String input;\n int value = -1;\n\n\n while (value == -1) {\n System.out.print(\">\");\n\n if (Menus.reader.hasNext()) {\n input = Menus.reader.nextLine().strip();\n try {\n value = Integer.parseInt(input);\n } catch (NumberFormatException e) {\n value = -1;\n }\n }\n }\n return value;\n }", "public static int promptForInt(String prompt, int min, int max) {\n if(min > max) throw new IllegalArgumentException(\"min cannot be greater than max.\");\n if(prompt == null) throw new IllegalArgumentException(\"prompt cannot be null.\");\n int result = (int) promptForLong(prompt, min, max);\n return result;\n }", "public static int askInt(String message) {\n return askObject(message, \"Please enter a Number!\", Scanner::nextInt);\n }", "int promptOption(IMenu menu);", "private static int getUserChoice() {\n System.out.println(\"Please choose your operation: \");\n return intScanner.nextInt();\n }", "public int getChoice(String prompt) {\n System.out.print(prompt);\n try {\n return Integer.valueOf(scanner.nextLine());\n } catch (Exception e) {\n // if user does not enter a valid integer, -1 is returned to indicate invalid input\n return -1;\n }\n }", "String promptString();", "public void twoStageAuthentication() throws IOException, ClassNotFoundException {\r\n int confirmationCode = 1234;\r\n Scanner input = new Scanner(System.in);\r\n System.out.print(\"Enter Your Confirmation code: \");\r\n\r\n for(int confirmCode = input.nextInt(); confirmationCode != confirmCode; confirmCode = input.nextInt()) {\r\n System.out.println(\"The code entered is Incorrect,Please try again!\");\r\n System.out.print(\"Enter confirmation code: \");\r\n }\r\n\r\n this.showMenu(); // Calling the Mentioned Function\r\n }", "public static Integer getIntegerFromDialog(String prompt){\n Integer i = 0;\n while(true)\n {\n try\n {\n i = Integer.parseInt(JOptionPane.showInputDialog(prompt + \" \"));\n break;\n }\n catch(Exception e)\n {\n //System.out.println(\"Not a valid Integer\");\n break;\n }\n }\n return i;\n }", "private static int getInt(String prompt) {\n \t\n Scanner input;\n \n int result = 10; // default if there's no input\n \n \n try {\n \n \tinput = new Scanner(System.in);\n \n System.out.println(prompt);\n \n result = input.nextInt(); //take input\n \n //in case user enters something else than int\n } catch (NumberFormatException e) {\n System.out.println(\"Could not convert to int\");\n System.out.println(e.getMessage());\n System.out.println(\"Value has been set to default (10)\");\n \n //other error exception\n } catch (Exception e) {\n System.out.println(\"There was an error with System.in\");\n System.out.println(e.getMessage()); \n System.out.println(\"Value has been set to default (10)\");\n }\n return result;\n }", "private boolean promptCommand() {}", "public static Integer getInteger(String prompt)\n {\n Integer i = 0;\n while(true)\n {\n try\n {\n System.out.print(prompt + \" \");\n i = Integer.parseInt(in.nextLine());\n break;\n }\n catch(Exception e)\n {\n System.out.println(\"Not a valid Integer\");\n }\n }\n return i; \n }", "public static int getInt(String prompt) {\n Scanner sc = new Scanner(System.in);\n int userInput;\n\n System.out.println(prompt);\n\n try {\n userInput = sc.nextInt();\n sc.close();\n return userInput;\n } catch (InputMismatchException e) {\n return getInt(prompt);\n }\n\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public Character getPromptSymbol();", "public static int getInt(Scanner console, String prompt) {\r\n System.out.print(prompt);\r\n while (!console.hasNextInt()) {\r\n console.next(); // to discard the input\r\n System.out.println(\"Not an integer; try again.\");\r\n System.out.print(prompt);}return console.nextInt();\r\n }", "public static Integer nextInteger(String prompt)\n { // Gets an integer value.\n int originalLength = prompt.length();\n boolean done = false;\n Integer i = null;\n String input;\n\n\n // Get the integer.\n while (!done)\n {\n input = JOptionPane.showInputDialog(prompt);\n if (input == null || input.isEmpty())\n {\n break;\n }\n\n // Try to get something meaningful out of this.\n try\n {\n i = Integer.parseInt(input);\n done = true;\n }\n catch (NumberFormatException ex)\n {\n // Change the prompt if we need to do so.\n if (prompt.length() == originalLength)\n {\n prompt = \"Please enter a numeric value.\\n\" + prompt;\n }\n }\n }\n\n // Return the integer that was entered.\n return i;\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "public static int promptForNumber(String title) {\n return Integer.parseInt(JOptionPane.showInputDialog(null,\n title));\n }", "InputPromptTransmitter getInputPromptTransmitter();", "public int initialAsk(){\n System.out.println(\"Hi, what would you like to do? \");\n System.out.println(\"Please type in the number: \");\n System.out.println(\"1. Add a client to the database \");\n System.out.println(\"2. Add an order to the database \");\n System.out.println(\"3. Display all clients from the database \");\n System.out.println(\"4. Display all orders from the database \");\n System.out.println(\"5. Update the client data \");\n System.out.println(\"6. Update the order data \");\n System.out.println(\"7. Delete the client from a database \");\n System.out.println(\"8. Delete the order from a database \");\n System.out.println(\"9. Find the client\");\n System.out.println(\"10. Find the order\");\n System.out.println(\"11. Finish work/ Close app\");\n return inN.nextInt();\n}", "public int getUserIntInput(String question) {\r\n System.out.print(question);\r\n while (!scanner.hasNextInt()) {\r\n scanner.next();\r\n }\r\n int result = scanner.nextInt();\r\n return result;\r\n }", "public String getPrompt(){ return _prompt ; }", "public static int askForInt(String message){\n int value = Integer.parseInt(JOptionPane.showInputDialog(message));\n return value;\n }", "public static int readInt(String prompt){\n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\ttry{\n\t\t\tintInput = Integer.parseInt(stringInput);\n\t\t}\n\t\tcatch (NumberFormatException ex) {\n\t\t System.err.println(\"Not a valid number: \" + stringInput);\n\t\t}\n\t\treturn intInput; \t\t\n\t}", "String ask();", "public static int getInt(String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n String localPrompt = prompt;\n boolean validInput = false;\n int num = 0;\n\n // enter the number\n do {\n if (localPrompt != null) {\n System.out.print(localPrompt);\n }\n try { // If (works)\n num = scanner.nextInt();\n scanner.nextLine();\n validInput = true;\n } catch (InputMismatchException ime) { // else (fails)\n System.out.println(\"That is not an integer.\");\n scanner.nextLine();\n if (localPrompt == null)\n localPrompt = \"Enter an integer: \";\n num = 0;\n }\n } while (!validInput);\n return num;\n }", "String prompt(String message, Color color) throws IOException;", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static int receberSelecaoDoConsoleInt() {\n\t\tScanner entrada = new Scanner(System.in);\n\t\tint valor = 0;\n\t\t//pega o input que decide se a entrada será no terminal ou em arquivo\n\t\n\t\tvalor = entrada.nextInt();\n\t\t\n\t\treturn valor;\n\t}", "public abstract void promptForInput(final String msg);", "public static byte promptForByte(String prompt, byte min, byte max) throws IOException {\r\n\t\treturn (byte) promptForLong(prompt, min, max);\r\n\t}", "public int getCommand() {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tint value = Integer.parseInt(getToken(\"\"));\r\n\t\t\t\tif (value >= EXIT && value <= SAVE) {\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new NumberFormatException();\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.print(\"Invalid entry please try again.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "void askForNumber(String spieler,String playerChoices) throws IOException;", "public void setPromptSymbol(Character symbol);", "public String getPrompt() { return prompt; }", "private int getInput()\n {\n int input = 0;\n Scanner scanner = new Scanner(System.in);\n\n try {\n input = scanner.nextInt();\n }\n catch(Exception e) {\n System.out.println(\"Vælg et tal fra menuen.\");\n scanner.nextLine();\n }\n\n return input;\n }", "abstract void mainPrompt();", "public Integer readIntegerFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your number:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString number = null;\r\n\t\tnumber = br.readLine();\r\n\t\treturn new Integer(number);\r\n\t}", "public static int getInt(int min, int max, String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n String localPrompt = prompt;\n boolean validInput = false;\n int num = 0;\n do {\n if (localPrompt != null) {\n System.out.print(localPrompt);\n }\n try {\n num = scanner.nextInt();\n scanner.nextLine();\n validInput = true;\n } catch (InputMismatchException ime) {\n System.out.println(\"That is not an integer.\");\n scanner.nextLine();\n if (localPrompt == null)\n localPrompt = String.format(\"Enter a integer between %d and %d: \", min, max);\n num = 0;\n }\n if (num < min || num > max) {\n System.out.printf(\"\\nThe number %d is out of range\\n\", num);\n if (localPrompt == null)\n localPrompt = String.format(\"Enter an integer between %d and %d: \", min, max);\n validInput = false;\n }\n } while (!validInput);\n return num;\n }", "public static int f_number_user() {\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"Input the number\");\n int number = keyboard.nextInt();\n return number;\n }", "static <T> T promptUser(BufferedReader console, List<T> options, Function<T, String> optionToString) {\n Map<Integer, T> intToOptionMap = toMapForUserSelection(options);\n\n intToOptionMap.forEach((integer, option) ->\n System.out.println(\"\\t\" + integer + \") \" + optionToString.apply(option))\n );\n\n return promptUserForSelection(console, intToOptionMap, optionToString);\n }", "private Integer promptPositiveInteger(String message) {\n\t\tboolean done = false;\n\t\tint result = -1;\n\t\twhile (!done) {\n\t\t\tdone = true;\n\t\t\tString s = JOptionPane.showInputDialog(\n\t\t\t\t\t_frame,\n\t\t\t\t\tmessage,\n\t\t\t\t\t_frame.getTitle(),\n\t\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\n\t\t\tif (s == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tresult = Integer.parseInt(s);\n\t\t\t\tif (result < 0) {\n\t\t\t\t\tdone = false;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tdone = false;\n\t\t\t}\n\n\t\t\tif (!done) {\n\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\t_frame,\n\t\t\t\t\t\t\"Invalid Input!\",\n\t\t\t\t\t\t_frame.getTitle(),\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "private static void instructions()\n {\n System.out.println(\"Input integer on console to invoke method of your choice as follows:\\n\");\n System.out.println( \"0 User's Home Page BY DATE\\n\"\n + \"1 User's Home Page BY USER\\n\"\n + \"2 User's Home Page BY CONVERSATION\\n\"\n + \"3 LeaderBoard MOST SOCIAL\\n\"\n + \"4 LeaderBoard MOST TALKATIVE\\n\"\n + \"5 LeaderBoard LEAST TALKATIVE\\n\"\n + \"-1 To Quit\");\n }", "public static int askUser(Scanner in)\n {\n System.out.println(\"What do you want, respectable human being?\");\n System.out.println(\"1. Add Reminder\");\n System.out.println(\"2. View Reminder\");\n System.out.println(\"3. Edit Reminder\");\n System.out.println(\"4. Delete Reminder\");\n System.out.println(\"5. Exit\");\n System.out.print(\"User Input : \");\n return in.nextInt();\n }", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public static int prompt_input1(int mx){\n System.out.print(\"Please select your option: \");\n String choice = in.nextLine(); \n boolean invalid = !U.isInteger(choice);\n int c=-1;\n if(!invalid)c = Integer.parseInt(choice)-1;\n while(invalid||c<0||c>=mx){\n System.out.println(\"Invalid Input.\");\n System.out.printf(\"%s %d %s %d: \",\"Enter your choice between\",1,\"-\",mx);\n choice = in.nextLine(); \n invalid = !U.isInteger(choice);\n if(!invalid)c = Integer.parseInt(choice)-1;\n //System.err.println(\"choice: \"+choice);\n }\n return c;\n }", "private int getNumber() {\n while (!scanner.hasNextInt()) {\n scanner.nextLine();\n System.out.print(\"Please, Enter a munber : \");\n }\n return scanner.nextInt();\n }", "private int nextInt() {\n if (console) {\n return con.nextInt();\n }\n return scan.nextInt();\n }", "private Integer askInt(String label){\n try{\n System.out.println(label);\n String input = in.nextLine();\n if (input.isEmpty()){\n return null;\n }\n else {\n return Integer.parseInt(input);\n }\n }\n catch(NumberFormatException e){\n return askInt(label);\n }\n }", "public int getValidIntCmd(String msg) {\n String readInt = getCommand(msg);\n while (!isNumeric(readInt)) {\n readInt = getCommand(ANSI_RED+\"Not a valid input. Please enter again\"+ANSI_RESET);\n }\n\n return Integer.parseInt(readInt);\n }", "public static short promptForShort(String prompt, short min, short max) throws IOException {\r\n\t\treturn (short) promptForLong(prompt, min, max);\r\n\t}", "public int askWhatAssistants(int assi);", "public static int inputOptions() {\n\t\tSystem.out.println(PROMPT);\n\t\tint responseNum = -1;\n\t\tin = new Scanner(System.in);\n\t\t// Ensure that response is 0 or 1\n\t\twhile (in.hasNext()) {\n\t\t\tString rawResponse = in.nextLine();\n\t\t\tString response = rawResponse.trim();\n\t\t\tresponseNum = Integer.parseInt(response);\n\t\t\tif (responseNum == 0 || responseNum == 1) {\n\t\t\t\treturn responseNum;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(INVALID_ENTRY_MSG);\n\t\t\t}\n\t\t}\n\t\treturn responseNum;\n\t}", "private static Long userInputInt(String message) {\n\t\tLong result = 0L;\n\t\tboolean answer = false;\n\t\twhile (!answer) {\n\t\t\tSystem.out.println(message);\n\t\t\ttry {\n\t\t\t\tresult = scanner.nextLong();\n\t\t\t\tif (result >= 0) {\n\t\t\t\t\tanswer = true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"Please could you indicate a positive number.\");\n\t\t\t\t}\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.err.println(\"Your answer is not a correct number, please try again.\");\n\t\t\t} finally {\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "public void setToken(int value){token = value;}", "public static int getInt(Scanner sc, String prompt) {\n\t\tint i = 0;\n\t\tboolean isValid = false;\n\t\twhile (isValid == false) {\n\t\t\tSystem.out.print(prompt);\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\ti = sc.nextInt();\n\t\t\t\tisValid = true;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error! Invalid integer value. Try again.\");\n\t\t\t}\n\t\t\tsc.nextLine(); // discard any other data entered on the line\n\t\t}\n\t\treturn i;\n\t}", "public int getPlayerAnswer()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your answer (0-3): \");\r\n\t\treturn in.nextInt();\r\n\t}", "public static int solicitarHora(){\n int hora;\r\n Scanner teclado = new Scanner(System.in);\r\n System.out.println(\"Introduce hora\");\r\n hora= teclado.nextInt();\r\n return hora;\r\n }", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "@Nullable\n/* */ protected abstract Prompt acceptValidatedInput(@NotNull ConversationContext paramConversationContext, @NotNull Number paramNumber);", "public static void main(String[] args) {\n\t\tString answer = JOptionPane.showInputDialog(\"how many times do you want the totoise to spin from 1-10\");\n\t\tint x = Integer.parseInt(answer);\n\t\tdance(x);\n\t\t\n\n\t}", "private int getOrderNumber()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast ordrenummer: \");\n return scanner.nextInt();\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "private static int requestStartingFunds() {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"How much money would you like to bring to Las Vegas?\\t\");\n return scanner.nextInt();\n }", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static int imprimirMenu(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"1 – Alta de usuario\\n\" +\n \"2 – Alta de objeto\\n\" +\n \"3 – Alquiler de objeto\\n\" +\n \"4 – Listar todos los objetos\\n\" +\n \"5 – Baja de objeto\\n\" +\n \"6 – Mostrar saldos\\n\" +\n \"7 - Modificar importe de un objeto\\n\" +\n \"8 - Guardar Saldos en fichero\\n\" +\n \"9 - Eliminar Usuario\\n\" +\n \"10 - Listar mas asiduos\\n\" +\n \"11 – Salir\\n\");\n int opcion = keyboard.nextInt();\n return opcion;\n }", "Token next();", "private int optionQuestion(String message, int max) {\n System.out.println(message + \" (enter the number without parenthesis)\");\n return obtainIntSafely(1, max, (\"Type a number between 1 and \" + max));\n }", "public static int solicitarSueldo(){\n int sueldo;\r\n Scanner teclado = new Scanner(System.in);\r\n System.out.println(\"Introduce sueldo\");\r\n sueldo= teclado.nextInt();\r\n return sueldo;\r\n }", "private String selectString(String prompt) {\n System.out.println(\"\\n\" + prompt);\n return input.next();\n }", "public static int adminFirstPage(){\r\n\tScanner inputone = new Scanner(System.in);\r\n\tSystem.out.println(\"Admin Menu Options\");\r\n\tSystem.out.println(\"==================\");\r\n\tSystem.out.println(\"0 - Quit\");\r\n\tSystem.out.println(\"1 - Add Shares\");\r\n\tSystem.out.println(\"2 - Update Share price\");\r\n\tSystem.out.println(\"3 - Update Share quantity\");\r\n\tSystem.out.println(\"4 - Update Transaction Charge \");\r\n\tSystem.out.println(\"5 - Update STT\");\r\n\tSystem.out.println(\"Enter Option : \");\r\n\tint adminchoice = inputone.nextInt();\r\n\treturn adminchoice;\r\n}", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "public abstract void newPromptType(long ms, PromptType type);", "public int getUserGuess(){\n int n;\n\n System.out.print(\"Guess a number between 1 and 100:\\t\"); // Prompts for input\n while (!scanner.hasNextInt()) { // Checks to see if input is an integer\n System.out.print(\"Enter a number please: \\t\");\n scanner.next();\n }\n\n n = scanner.nextInt();\n return n;\n }", "public String getPrompt() {\n return prompt;\n }", "public static void luckyNumber() {\n System.out.println(\"What is your lucky number? \");\n int luckyNum = sc.nextInt(); \n }", "public static int getUserChoice(){\r\n return Input.getInt(\"Enter 1 to add a song, 2 to display all songs, or 3 to quit the program: \");\r\n }", "String promptSecureString();" ]
[ "0.68931276", "0.6804663", "0.6608833", "0.64553356", "0.631204", "0.62542325", "0.6227073", "0.620908", "0.62074566", "0.61734235", "0.612848", "0.612848", "0.60707283", "0.6024502", "0.596335", "0.59604925", "0.59370977", "0.590367", "0.5903301", "0.5880984", "0.5834445", "0.5833451", "0.58199006", "0.5813247", "0.5798178", "0.57861644", "0.57800657", "0.57486916", "0.57414466", "0.5730227", "0.57268566", "0.5702894", "0.5694395", "0.5686101", "0.56560296", "0.56240094", "0.5598872", "0.5586846", "0.55673903", "0.5567231", "0.5542311", "0.55344033", "0.5515277", "0.55120015", "0.55092216", "0.5501576", "0.54799885", "0.5478373", "0.5477606", "0.54039127", "0.53904015", "0.5390195", "0.5383128", "0.5375596", "0.5374935", "0.53669405", "0.53668135", "0.534641", "0.5339099", "0.53110236", "0.53104246", "0.52928853", "0.5289418", "0.5274882", "0.52708906", "0.5258545", "0.52541554", "0.52412367", "0.5240659", "0.5221459", "0.52137256", "0.51967824", "0.5190445", "0.5181061", "0.51691955", "0.5166739", "0.5166392", "0.5166108", "0.5165858", "0.51655364", "0.5160901", "0.5158839", "0.5154184", "0.515191", "0.5151561", "0.51410586", "0.51376057", "0.5126216", "0.5121347", "0.5114922", "0.51120543", "0.510547", "0.50915706", "0.50905323", "0.5071967", "0.5067404", "0.50632066", "0.50600886", "0.50549954" ]
0.6693707
3
Float prompt using token method.
public double getDouble(String prompt) { do { try { String item = getToken(prompt); double f = Double.parseDouble(item); return f; } catch (NumberFormatException nfe) { System.out.println("Please input a number "); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static float queryFloat (String prompt)\n\t{\n\t\tString entry ;\n\t\tfloat entryFloat ;\n\t\tSystem.out.print (prompt) ;\n\t\tentry = scanIn.nextLine() ;\n\t\tif (entry.length() == 0)\n\t\t{\n\t\t\tentryFloat = 0f ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tentryFloat = Float.parseFloat (entry) ;\n\t\t}\n\n\t\treturn entryFloat ;\n\t}", "public static float promptForFloat(String prompt, float min, float max) throws IOException {\r\n\t\treturn (float) promptForDouble(prompt, min, max);\r\n\t}", "public static float promptForFloat(String prompt, float min, float max) {\n if(min > max) throw new IllegalArgumentException(\"min cannot be greater than max.\");\n float result = (float) promptForDouble(prompt, min, max);\n return result;\n }", "private static void displayPrompt() {\n System.out.println(\"This program converts a temperature in degrees Celsius into\");\n System.out.println(\"a temperature in degrees Fahrenheit. Enter a temperature in\");\n System.out.print(\"degrees Celsius: \");\n }", "public String getToken(String prompt) {\n do {\n try {\n System.out.print(prompt);\n String line = reader.readLine();\n StringTokenizer tokenizer = new StringTokenizer(line,\"\\n\\r\\f\");\n if (tokenizer.hasMoreTokens()) {\n return tokenizer.nextToken();\n }\n }\n catch (IOException ioe) {\n System.exit(0);\n }\n } while (true);\n }", "public String getToken(String prompt) {\n do {\n try {\n System.out.print(prompt);\n String line = reader.readLine();\n StringTokenizer tokenizer = new StringTokenizer(line,\"\\n\\r\\f\");\n if (tokenizer.hasMoreTokens()) {\n return tokenizer.nextToken();\n }\n }\n catch (IOException ioe) {\n System.exit(0);\n }\n } while (true);\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public String getToken(String prompt) {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(prompt);\r\n\t\t\t\tString line = reader.readLine();\r\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(line, \"\\n\\r\\f\");\r\n\t\t\t\tif (tokenizer.hasMoreTokens()) {\r\n\t\t\t\t\treturn tokenizer.nextToken();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public Character getPromptSymbol();", "public void setPromptSymbol(Character symbol);", "public static double getOperand(String prompt) {\n\t Scanner input = new Scanner(System.in);\t// Create a Scanner object\r\n\r\n\t System.out.print(prompt);\r\n\t double operand = input.nextDouble();\r\n\t return operand; \r\n\r\n\t }", "int promptNumber();", "String prompt(String message) throws IOException;", "private double selectDouble(String prompt) {\n System.out.println(\"\\n\" + prompt);\n return input.nextDouble();\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "public void Calculation(){\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf/ButtonValue;\n }\n printAnswer = Double.toString(AnswerHalf);\n AfterEqual = 1;\n SymbolMark = 0;\n c = 0;\n AfterAnswer = 0;\n TFCalcBox.setText(printAnswer);\n }", "public abstract void promptForInput(final String msg);", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "String ask();", "public static double promptUserForDouble(String prompt){\n Scanner scannerln = new Scanner(System.in);\n System.out.print(prompt);\n return scannerln.nextDouble();\n }", "public interface PFloatingToken extends PToken {\r\n\t/**\r\n\t * get the number encode\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic CNumberEncode get_encode();\r\n\r\n\t/**\r\n\t * get the integer part literal\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic String get_integer_part();\r\n\r\n\t/**\r\n\t * get the fraction part literal\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic String get_fraction_part();\r\n\r\n\t/**\r\n\t * true if positive, false if negative\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic boolean get_exponent_sign();\r\n\r\n\t/**\r\n\t * get the exponent part literal\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic String get_exponent_part();\r\n\r\n\t/**\r\n\t * get the floating suffix: f | F | d | D | l | L\r\n\t *\r\n\t * @return\r\n\t */\r\n\tpublic char get_floating_suffix();\r\n}", "public String getPrompt(){ return _prompt ; }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "public static float inputFloat()\n\t{\n\t\treturn(sc.nextFloat());\n\t}", "String promptString();", "public FloatRule(IToken token) {\n\t\tfToken = token;\n\t\tassert token != null;\n\t}", "public boolean displayPrompt(String msg);", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "@Override\r\n\t\tpublic void setPromptSymbol(Character symbol) {\n\r\n\t\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Introduce token\");\n\t\tScanner sc = new Scanner(System.in);\n\t\t//double numero = sc.nextDouble();\n\t\tString token = sc.next();\n\t\tsc.close();\n\t\tSystem.out.println(\"Token recibido: \" + token);\n\t\t// aplicar la expresión regular\n\t\tString regex = \"^-?[\\\\d]+([,.][\\\\d]+)?$\";\n\t\tboolean valido = token.matches(regex);\n\t\tSystem.out.printf(\"Válido el token %s, %b%n\", \n\t\t\t\ttoken, valido);\n\t\t\n\t\tif ( valido ) {\n\t\t\t// reemplazar las , por . en el nº decimal\n\t\t\tString numeroCadena = token.replace(',','.');\n\t\t\t// convertir el String a double\n\t\t\tdouble numero = Double.parseDouble(numeroCadena);\n\t\t\t// mostrar la raiz cúbica con tres decimales\n\t\t\tSystem.out.printf(\"Raiz cubica de %s vale %.3f%n\",\n\t\t\t\t\ttoken, Math.cbrt(numero));\n\t\t}\n\t\t\n\n\t}", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "view2() {\n Scanner input = new Scanner(System.in);\n Scanner StringInput = new Scanner(System.in);\n System.out.println(\"Calculator\");\n System.out.println(\"Enter the numbers you would like to operate on in order.\");\n System.out.print(\"Enter the first number: \");\n float first = StringInput.nextInt();\n System.out.print(\"which operation would you like to perform? ( Enter +, -, *, or / ) \");\n String operator = input.nextLine();\n System.out.print(\"Enter the second number: \");\n float second = input.nextInt();\n\n setFirstNumber(first);\n setOperator(operator);\n setSecondNumber(second);\n input.close();\n }", "InputPromptTransmitter getInputPromptTransmitter();", "private boolean promptCommand() {}", "String prompt(String message, Color color) throws IOException;", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Welcome to the calculator. What operation would you like to do?(+,-,*,/)\");\n\t\tString answer = input.next();\n\t\t\n\t\tif (answer.equals(\"add\") || answer.equals(\"Add\") || answer.equals(\"+\")) \n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to add?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat add1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number you want to add\");\n\t\t\t\tfloat add2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat addanswer = add1 + add2;\n\t\t\t\tSystem.out.println(addanswer);\n\t\t\t\t}\n\t\telse if(answer.equals(\"minus\") || answer.equals(\"-\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to subtract?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat sub1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat sub2 = input.nextFloat();\n\t\t\t\t\t\n\t\t\t\tfloat subanswer = sub1 - sub2;\n\t\t\t\tSystem.out.println(subanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"multiply\") || answer.equals(\"x\") || answer.equals(\"*\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to multiply?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat mul1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat mul2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat mulanswer = mul1 * mul2;\n\t\t\t\tSystem.out.println(mulanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"divide\") || answer.equals(\"/\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to divide?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat div1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat div2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat divanswer = div1 / div2;\n\t\t\t\tSystem.out.println(divanswer);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Please try again.\");\n\t\t\t}\n\t\tinput.close();\n\t\t}", "public void buttonF(View v) {\n expression += \"F\";\n\n /* Update the screen. */\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "abstract void mainPrompt();", "void drawPrompt(String message);", "public void fireLoginCommandToken(DSMPHandler h, byte flags, \n byte handle, String token) {\n if (printdebug && dodebug) {\n System.out.println(\"-----fireLoginCommandToken: \" + \n \"\\n\\tflags[\" +flags+\"] hand[\"+handle+\"]\");\n System.out.println(\"\\ttoken [\" + token + \"]\");\n }\n }", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "static void GuilhermeMethod() {\n \n=======\n */\n \n>>>>>>> 0dbc3f3d638d98bed6bf34a8da56866d82c4f8ee\n try {\n BufferedReader myKb = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Please, enter a number\");\n float input = Float.parseFloat(myKb.readLine());\n\n System.out.println(\"Please, enter a second number\");\n float input2 = Float.parseFloat(myKb.readLine()) ;\n \n if (input2 == 0) {\n\n System.out.println(\"Error!\");\n } else {\n System.out.println(\"The first number divided by the second number is \" + input / input2);\n \n }\n } catch (Exception e) {\n System.out.println(\"Error!\");\n } \n }", "protected abstract void fillPromptText();", "@Override\r\n\t\tpublic Character getPromptSymbol() {\n\t\t\treturn null;\r\n\t\t}", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "public static double promptSquareFootage(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the square footage: \");\n double output = scan.nextDouble();\n return output;\n }", "public String getPrompt() { return prompt; }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "public double getDouble(String prompt) {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tString item = getToken(prompt);\r\n\t\t\t\tDouble number = Double.valueOf(item);\r\n\t\t\t\treturn number.doubleValue();\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.println(\"Please input a number.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public static double promptForCoeff( String prompt ) \r\n {\n return 0;\r\n }", "public abstract void printPromptMessage();", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "protected abstract void highLightPrompt();", "public static float leerNumeros(String mensaje){\n Scanner entrada = new Scanner(System.in);\n System.out.println(mensaje);\n return entrada.nextFloat();\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public <T> T promptUser(Prompt<T> prompt) {\n return null;\n }", "public static int f_number_user() {\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"Input the number\");\n int number = keyboard.nextInt();\n return number;\n }", "@Override\n @SneakyThrows\n public void nextRound() {\n Interpreter interpreter = Zuul.getInstance().getInterpreter();\n /*\n Getting player's input\n */\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n interpreter.handleCommand(this, reader.readLine());\n }", "private String getPrompt(){\n return \"Now \" + (isWhiteTurn ? \"White\" : \"Black\");\n }", "private void promptSpeechInput() {\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tRecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n\t\t\t\tgetString(R.string.speech_prompt));\n\t\ttry {\n\t\t\tstartActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n\t\t} catch (ActivityNotFoundException a) {\n\t\t\tToast.makeText(getActivity(),\n\t\t\t\t\tgetString(R.string.speech_not_supported),\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }", "private CommandResult promptUserToConfirm(List<Facilitator> fetch) {\n StringBuilder builder = new StringBuilder(\n String.format(Messages.MESSAGE_PARTIAL_FACILITATOR_NAME_MATCHING_FOUND, fname));\n fetch.forEach(x -> builder.append(\" \").append(x.getName().toString()).append('\\n'));\n builder.append(Messages.MESSAGE_ASK_TO_CONFIRM_FACILITATOR);\n return new CommandResult(builder.toString(), CommandType.PROMPTING);\n }", "public void tinhtoan() {\n\t\t/*so1= Double.parseDouble(txtInput.getText().toString());\n\t\tcurResult=\"\";*/\n\t\ttry {\n\t\t\t\n\t\t\tDouble inNum = Double.parseDouble(simple.ThayDoi_Phay(curResult));\n\t\t\tcurResult = \"0\";\n\t\t\tif (pheptoan == ' ') {\n\t\t\t\tresult = inNum; //nhan gia tri vao result\n\t\t\t} else if (pheptoan == '+') {\n\t\t\t\tresult += inNum;\n\t\t\t\t//tinhtoan();\n\t\t\t\t//pheptoan = '+';\n\t\t\t\t//curResult=\"\";\n\t\t\t} else if (pheptoan == '-') {\n\t\t\t\t\n\t\t\t\tresult -= inNum;\n\n\t\t\t} else if (pheptoan == '*') {\n\t\t\t\tresult *= inNum;\n\n\t\t\t} else if (pheptoan == '/') {\n\t\t\t\tif(result==0){\n\n\t\t\t\t}else{\n\t\t\t\t\tresult /= inNum;\n\t\t\t\t}\n\t\t\t} else if (pheptoan == '=') {\n\t\t\t//\tToast.makeText(this.getContext(), \"Press C to continue...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t// Keep the result for the next operation\\\n\t\t\t}\n\t\t\ttxtInput.setText(simple.LamTronSoFloat(result));\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"TAG\",\"Loi o Calculator.class->tinhtoan\" + e.getMessage());\n\t\t}\n\t\t\n\n\t}", "private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"us-US\");\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }", "public static void printPrompt() {\n System.out.print(\" > \");\n }", "public static double promptPrice(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the price: \");\n double output = scan.nextDouble();\n return output;\n }", "void askUsername();", "void tokenchange();", "public void showPasswordPrompt();", "public float readFloat() {\n\t\tif(!isInit) return 0F;\n\t\tfloat result = 0F;\n\t\tisListening = true;\n\t\twriteLine(\"Waiting for Float input...\");\n\t\twhile(isListening) {\n\t\t\ttry {\n\t\t\t\tresult = Float.parseFloat(inputArea.getText());\n\t\t\t} catch(NumberFormatException nfe) {\n\t\t\t\tresult= 0F;\n\t\t\t}\n\t\t}\n\t\tinputArea.setText(\"\");\n\t\twriteLine(\"Input: \" + result);\n\t\treturn result;\n\t}", "public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "private double promptForDepositAmount() {\n\n // display the prompt\n depositView.PrintAmountInCent();\n int input = keypad.getInput(); // receive input of deposit amount\n \n // check whether the user canceled or entered a valid amount\n if (input == CANCELED) {\n return CANCELED;\n }\n else {\n return (double) input / 100; // return dollar amount\n }\n }", "public void inputFraction() {\n\t\tSystem.out.println(\"Input Numerator\");\n\t\tint num = scan.nextInt();\n\t\tSystem.out.println(\"Input Denominator\");\t\n\t\tint deno = scan.nextInt();\n\t\tsetNumerator(num);\n\t\tsetDenominator(deno);\n\t}", "public void go() {\n Counter counter = new Counter();\n UserInput userInput = new UserInput();\n System.out.println(\"Input the x: \");\n int x = userInput.lengthInput();\n mainLogger.info(\"The user has entered {} as x\", x);\n mainLogger.info(\"Answer of the equation is: {}\", counter.wholeAnswer(x));\n }", "private void float_to_float_step( ExpressionNode nd, VMState vms ) {\n Assert.check( vms.top().at( nd ) == null ) ;\r\n \r\n // Clear the selection\r\n vms.top().setSelected( null ) ;\r\n \r\n // Get values of operands\r\n double x = getFloatOperand( nd, vms, 0 ) ;\r\n \r\n // Compute the value\r\n double value ;\r\n switch( op_code ) {\r\n case FABS :\r\n value = x < 0 ? -x : x ;\r\n break ;\r\n case SIN :\r\n value = Math.sin(x) ;\r\n break ;\r\n case COS :\r\n value = Math.cos(x) ;\r\n break ;\r\n case TAN :\r\n value = Math.tan(x) ;\r\n break ;\r\n case ASIN :\r\n value = Math.asin(x) ;\r\n break ;\r\n case ACOS :\r\n value = Math.acos(x) ;\r\n break ;\r\n case ATAN :\r\n value = Math.atan(x) ;\r\n break ;\r\n case EXP :\r\n value = Math.exp(x) ;\r\n break ;\r\n case EXPM1 :\r\n // This won't give as good a result as the real expm1\r\n // function.\r\n value = Math.exp(x-1.0) ;\r\n break ;\r\n case LOG :\r\n value = Math.log(x) ;\r\n break ;\r\n case LOG10 :\r\n value = Math.log(x) / Math.log( 10 ) ;\r\n break ;\r\n case LOG1P :\r\n // This won't give as good a result as the real log1p\r\n // function.\r\n value = Math.log(x+1.0);\r\n break ;\r\n case CEIL :\r\n value = Math.ceil(x) ;\r\n break ;\r\n case FLOOR :\r\n value = Math.floor(x) ;\r\n break ;\r\n case SIGNUM :\r\n if(x == Double.NaN ) {\r\n value = x ; }\r\n else if( x == 0.0 ) {\r\n value = x ; }\r\n else if( x < 0 ) {\r\n value = -1.0 ; }\r\n else {\r\n value = +1.0 ; }\r\n break ;\r\n case ROUND :\r\n value = Math.round(x) ;\r\n break ;\r\n case SQRT :\r\n value = Math.sqrt(x) ;\r\n break ;\r\n case SINH :\r\n value = (pow(Math.E, x) - pow(Math.E, -x)) / 2.0 ;\r\n break ;\r\n case COSH :\r\n value = (pow(Math.E, x) + pow(Math.E, -x)) / 2.0 ;\r\n break ;\r\n case TANH :\r\n value = (pow(Math.E, x) - pow(Math.E, -x))\r\n / (pow(Math.E, x) + pow(Math.E, -x)) ;\r\n break ;\r\n case TODEGS :\r\n value = x * 57.2957795 ;\r\n break ;\r\n case TORADS :\r\n value = x / 57.2957795 ;\r\n break ;\r\n case RINT :\r\n value = Math.rint(x) ;\r\n break ;\r\n case CBRT :\r\n if( x == Double.NaN ) value = Double.NaN ;\r\n else if( x < 0 ) value = -pow( -x, 1.0/3.0);\r\n else value = pow(x,1.0/3.0) ;\r\n break ;\r\n case ULP_DOUBLE :\r\n if( x == Double.NaN )\r\n value = Double.NaN ;\r\n else if( x == Double.NEGATIVE_INFINITY || x == Double.POSITIVE_INFINITY )\r\n value = Double.POSITIVE_INFINITY ;\r\n else if( x == 0.0 )\r\n value = Double.MIN_VALUE ;\r\n else {\r\n /* TODO\r\n * Fix this algorithm.\r\n */\r\n Assert.apology(\"ulp is not implemented\") ;\r\n value = 0.0 ; }\r\n break ;\r\n case ULP_FLOAT :\r\n // The assumption is that converting from a float\r\n // to a double loses nothing and is invertable.\r\n float xf = (float) x ; // Get back to the float.\r\n if( xf == Float.NaN )\r\n value = Float.NaN ;\r\n else if( xf == Float.NEGATIVE_INFINITY || xf == Float.POSITIVE_INFINITY )\r\n value = Float.POSITIVE_INFINITY ;\r\n else if( xf == 0.0 )\r\n value = Float.MIN_VALUE ;\r\n else {\r\n /* TODO\r\n * Fix this algorithm.\r\n */\r\n Assert.apology(\"ulp is not implemented\") ;\r\n value = 0.0 ; }\r\n break ;\r\n default: Assert.check(false) ; value = 0 ;\r\n }\r\n \r\n AbstractFloatDatum d = putFloatResult(nd, vms, value);\r\n \r\n // NOTE: mpbl May 2008 I believe this is superfluous\r\n \r\n vms.top().map(nd, d) ;\r\n }", "public void displaySecond() {\r\n System.out.println(secondPrompt);\r\n }", "private void float_x_float_to_float_step( ExpressionNode nd, VMState vms ) {\n Assert.check( vms.top().at( nd ) == null ) ;\r\n \r\n // Clear the selection\r\n vms.top().setSelected( null ) ;\r\n \r\n // Get values of operands\r\n double x = getFloatOperand( nd, vms, 0 ) ;\r\n double y = getFloatOperand( nd, vms, 1 ) ;\r\n \r\n // Compute the value\r\n double value ;\r\n switch( op_code ) {\r\n case ATAN2 :\r\n value = Math.atan2(x, y) ;\r\n break ;\r\n case POW :\r\n // The following is not quite right for Java\r\n // because it will not throw an exception.\r\n value = pow(x, y);\r\n break ;\r\n case HYPOT :\r\n if( x == Double.POSITIVE_INFINITY\r\n || x == Double.NEGATIVE_INFINITY\r\n || y == Double.POSITIVE_INFINITY\r\n || y == Double.NEGATIVE_INFINITY ) {\r\n value = Double.POSITIVE_INFINITY ; }\r\n else if( x == Double.NaN || y == Double.NaN ) {\r\n value = Double.NaN ; }\r\n else {\r\n value = pow(x*x + y*y, 0.5) ; }\r\n break ;\r\n case FMAX :\r\n value = Math.max(x, y) ;\r\n break ;\r\n case FMIN :\r\n value = Math.min(x, y) ;\r\n break ;\r\n case IEEEREM :\r\n value = Math.IEEEremainder(x, y) ;\r\n break ;\r\n default: Assert.check(false) ; value = 0 ;\r\n }\r\n \r\n AbstractFloatDatum d = putFloatResult(nd, vms, value);\r\n }", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void getToken(){\n\t\tboolean primaryFirst=false;\t\t\t// determines whether the current token is a primary (true) or an operator (false)\n\t\tboolean primaryIsReal=false;\t\t// determines whether the current primary is a numerical number (true) or a name (false)\n\t\tboolean checkedPrimaryType=false;\t// determine whether the primary type has already been checked (true) or not (false)\n\t\t\n\t\twhile(true){\n\t\t\tcurr_pos++;\n\t\t\tif(curr_pos>input.length()-1){\n\t\t\t\tcurr_tok=token_value.END;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(\n\t\t\t\tinput.charAt(curr_pos)=='+' ||\n\t\t\t\tinput.charAt(curr_pos)=='-' ||\n\t\t\t\tinput.charAt(curr_pos)=='*'\t||\t\n\t\t\t\tinput.charAt(curr_pos)=='/'\t||\n\t\t\t\tinput.charAt(curr_pos)=='('\t||\n\t\t\t\tinput.charAt(curr_pos)==')'\t||\n\t\t\t\tinput.charAt(curr_pos)=='^'\t||\n\t\t\t\tinput.charAt(curr_pos)=='_'\t||\n\t\t\t\tinput.charAt(curr_pos)=='='\n\t\t\t){\n\t\t\t\tif(!primaryFirst){\n\t\t\t\t\tfor(int i=0; i<charToEnum.length; i++){\n\t\t\t\t\t\tif(input.charAt(curr_pos) == charToEnum[i]){\n\t\t\t\t\t\t\tcurr_tok=token_value.values()[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurr_pos--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(!checkedPrimaryType){\n\t\t\t\t\tcheckedPrimaryType=true;\n\t\t\t\t\tint num = (int)input.charAt(curr_pos);\n\t\t\t\t\tif(num > 47 && num < 58){ // number case\n\t\t\t\t\t\tprimaryIsReal=true;\n\t\t\t\t\t}\n\t\t\t\t\tstring_value=\"\";\n\t\t\t\t}\n\t\t\t\tprimaryFirst=true;\n\t\t\t\tstring_value+=input.charAt(curr_pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(primaryFirst){\n\t\t\tif(primaryIsReal){\n\t\t\t\tnumber_value = Double.parseDouble(string_value);\n\t\t\t\tcurr_tok=token_value.NUMBER;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurr_tok=token_value.NAME;\n\t\t\t}\n\t\t}\n\t}", "public void retConfirm(float draw){\n System.out.println(\"La cantidad de \"+draw+\" ha sido retirada correctamente\");\n System.out.println(\"\");\n}", "public float getFloat() throws NoSuchElementException,\n\t NumberFormatException\n {\n\tString s = tokenizer.nextToken();\n\treturn Float.parseFloat(s);\n }", "public void setPrompt(Prompt prmpt) {\n this.prompt = prmpt;\n }", "public static void main(String[] args) {\n intro();\n Scanner input = new Scanner(System.in);\n while( exit != true) {\n System.out.println(\"_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\");\n System.out.print(\"Please enter an operation ( +, -, /, *, = or Q to quit.) : \");\n String operator = input.nextLine();\n operator = getOperation(operator);\n if (operator.equals(\"Q\") || operator.equals(\"q\")) {\n exit = true;\n break;\n }\n int flag;\n if (operator.equals(\"+\")) {\n flag = 1;\n }\n else if (operator.equals(\"-\")) {\n flag = 2;\n }\n else if (operator.equals(\"/\")) {\n flag = 3;\n }\n else if (operator.equals(\"*\")) {\n flag = 4;\n }\n else {\n flag = 5;\n }\n System.out.print(\"Please enter a fraction (a/b) or integer (a): \");\n String fr1 = input.nextLine();\n Fraction f1 = getFraaction(fr1);\n System.out.print(\"Please enter a fraction (a/b) or integer (a): \");\n String fr2 = input.nextLine();\n Fraction f2 = getFraaction(fr2);\n Fraction fr3;\n switch (flag) {\n case 1: {\n fr3 = f1.add(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 2: {\n fr3 = f1.subtract(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 3: {\n fr3 = f1.divide(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 4: {\n fr3 = f1.multiply(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 5: {\n boolean bol = f1.equals(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" is \" + bol);\n break;\n }\n }\n }\n\n }", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "int promptOption(IMenu menu);", "static void askQuestion() {\n\t\t// Setting up a Scanner to get user input\n\t\tScanner userInput = new Scanner(System.in);\n\n\t\t// Declaring variables\n\t\tdouble num1, num2, answer, userAnswer;\n\n\t\t// GENERATING QUESTION\n\n\t\t// Getting two new random numbers, rounded to one decimal place (with numbers generation from 0 to 50)\n\t\tnum1 = Math.round((Math.random() * 50)*10.0)/10.0;\n\t\tnum2 = Math.round((Math.random() * 50)*10.0)/10.0;\n\n\t\t// Generating a random number between 1 and 4 to randomize the math operation. A switch case is used to calculate the answer based on the math operation that gets generated.\n\t\tswitch ((int) Math.round(Math.random() * 3 + 1)) {\n\t\t\tcase 1: // Similar structure for each case (and the default case), structured as follows\n\t\t\t\tSystem.out.print(num1 + \" + \" + num2 + \" = \"); // Printing the question (based on the generated operation)\n\t\t\t\tanswer = num1 + num2; // Calculating the answer (based on the generated operation)\n\t\t\t\tbreak; // Exit the switch statement\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(num1 + \" - \" + num2 + \" = \");\n\t\t\t\tanswer = num1 - num2;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(num1 + \" / \" + num2 + \" = \");\n\t\t\t\tanswer = num1 / num2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.print(num1 + \" * \" + num2 + \" = \");\n\t\t\t\tanswer = num1 * num2;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tanswer = Math.round(answer * 10.0) / 10.0; // Rounding the answer to one decimal place\n\t\tuserAnswer = userInput.nextDouble(); // Getting the user's answer\n\n\t\tif (answer == userAnswer) System.out.println(\"That's right. Good Job!\\n\"); // If the answers match, the user is correct and the staetment is printed accordingly.\n\t\telse System.out.println(\"Incorrect. The correct answer was \" + answer + \".\\n\"); // Otherwise, show that the user's answer is incorrect and output an according statement.\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "String userInput(String question);", "public static String inputBox(String promptMsg) {\n return JOptionPane.showInputDialog(promptMsg);\n }", "public void getMessage() {\r\n // use JOptionPane to have a pop up box informing user of the invalid token\r\n JOptionPane.showMessageDialog(null, \"Invalid Token \" + invalidToken);\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}" ]
[ "0.63284063", "0.63182694", "0.6246625", "0.6034125", "0.56526405", "0.56526405", "0.5521322", "0.5516257", "0.54980195", "0.54479474", "0.54430443", "0.54042625", "0.5367877", "0.53517497", "0.535116", "0.53290266", "0.5328768", "0.529072", "0.5290079", "0.5268839", "0.52558917", "0.5235185", "0.52291125", "0.5223344", "0.5216216", "0.5214645", "0.5209709", "0.5207741", "0.5206942", "0.5178369", "0.51749766", "0.5169715", "0.5167918", "0.5151188", "0.5150193", "0.5126594", "0.5117861", "0.51123035", "0.5111274", "0.50701237", "0.5039398", "0.501085", "0.4999838", "0.49977803", "0.49908802", "0.49890554", "0.49885967", "0.4944628", "0.49396643", "0.49207014", "0.49169767", "0.49154466", "0.4913632", "0.4913632", "0.49126524", "0.49021995", "0.49000484", "0.49000484", "0.49000484", "0.49000484", "0.4897392", "0.48951754", "0.4887169", "0.48831058", "0.48805457", "0.48778257", "0.48707122", "0.48656076", "0.4864524", "0.4851362", "0.48361343", "0.48323932", "0.48276487", "0.48180538", "0.48124835", "0.48119375", "0.48070607", "0.47994587", "0.47988796", "0.47933966", "0.4782886", "0.47762468", "0.47730213", "0.47712323", "0.47539917", "0.47539106", "0.4753509", "0.47399053", "0.47387308", "0.47385815", "0.4728982", "0.47268936", "0.4724263", "0.47220892", "0.47199264", "0.47148344", "0.47081092", "0.47073376", "0.46825257" ]
0.51433426
36
Yes or no prompt.
private boolean yesOrNo(String prompt) { String more = getToken(prompt + " (Y|y)[es] or anything else for no: "); if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean promptYesNo(String str)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "@Override\r\n\t\tpublic boolean promptYesNo(String message) {\n\t\t\treturn true;\r\n\t\t}", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "static boolean yesNoQuestion(String prompt){\r\n while(true){\r\n System.out.println(prompt);\r\n String input = Console.in.readWord();\r\n if (input.equals(\"yes\")) return true;\r\n else if (input.equals(\"no\")) return false;\r\n }\r\n }", "private boolean yesOrNo(String prompt) {\r\n\t\tString more = getToken(prompt + \" (Y|y)[es] or anything else for no\");\r\n\t\tif (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean yesNo(String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n boolean response;\n\n // enter the string\n if (prompt != null) {\n System.out.print(prompt);\n }\n response = scanner.nextLine().toLowerCase().contains(\"y\");\n return response;\n }", "boolean yesNoQuery(String prompt) throws IOException\n\t{\n\t\tboolean result = false;\n\t\tm_out.print(prompt);\n\t\tm_out.print(getLocalizationManager().getLocalizedTextString(\"yesOrNoAppendedToAllQuestions\")); //$NON-NLS-1$\n\n\t\tString in = readLine();\n\t\tif (in != null && in.equals(getLocalizationManager().getLocalizedTextString(\"singleCharacterUserTypesForYes\"))) //$NON-NLS-1$\n\t\t\tresult = true;\n\t\telse if (in != null && in.equals(\"escape\")) //$NON-NLS-1$\n\t\t\tthrow new IllegalArgumentException(\"escape\"); //$NON-NLS-1$\n\t\telse\n\t\t\tout(getLocalizationManager().getLocalizedTextString(\"yesNoQueryNotConfirmed\")); //$NON-NLS-1$\n\t\treturn result;\n\t}", "static boolean promptForComfirmation(String prompt) {\n String line;\n\n line = promptWithOptions(Arrays.asList(\"y\", \"n\"), prompt);\n\n return (line.compareTo(\"y\") == 0);\n }", "public static boolean askYesNo(String message) {\n\n\t\t// Present the choice (and log it where chosen.)\n\t\tpresent(message + \" [Y/N] :: \");\n\n\t\tString choice = \"\";\n\n\t\t// Get a result from the user.\n\t\ttry {\n\t\t\tboolean chosen = false;\n\t\t\twhile ( !(chosen)) {\n\n\t\t\t\tchoice = System.console().readLine();\n\n\t\t\t\tchoice = choice.toUpperCase().trim();\n\n\t\t\t\tif ((choice.compareTo(\"Y\") == 0) || (choice.compareTo(\"N\") == 0) ){\n\t\t\t\t\tchosen = true;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch\t(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Log the user's choice. \n\t\taddLine(\"(The user chose: \\\"\" + choice + \"\\\".)\");\n\n\t\tif (choice.compareTo(\"Y\") == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public static boolean promptForYesNo(String title, String message) {\n // Bury Bones\n int yes = JOptionPane.showOptionDialog(null,\n message,\n title,\n JOptionPane.YES_NO_OPTION,\n JOptionPane.INFORMATION_MESSAGE,\n null,\n new String[]{\"Yes\", \"No\"},\n \"Yes\");\n\n return yes == 0;\n }", "public boolean saidYes(boolean onQuit) {\r\n\r\n System.out.print(\" (Y/N) \");\r\n \r\n\t\tchar responce = Keyboard.readChar();\r\n responce = Character.toLowerCase(responce);\r\n\r\n\t\tswitch (responce) {\r\n case 'y':\r\n return true;\r\n\r\n case 'q':\r\n case 'e':\r\n\r\n // Is the user is being asked to quit?\r\n if (onQuit) {\r\n return true;\r\n\t\t\t\t}\r\n\r\n endGameSwitch = true;\r\n return false;\r\n\r\n default:\r\n return false;\r\n }\r\n\t}", "public boolean yesNoQuestion(String message) {\n System.out.println(message + \" y/n\");\n String answer = scanner.nextLine();\n while (!(answer.equals(\"y\") || (answer.equals(\"n\")))) {\n System.out.println(\"Type 'y' or 'n'\");\n answer = scanner.nextLine();\n }\n return answer.equals(\"y\");\n }", "public static boolean askUserYesNo() {\n // Variable declarations\n String userInput = \"\"; // User input string\n\n // Get user input\n userInput = scnr.nextLine();\n\n // Validate whether user input is ok, and continue asking until right\n while (!userInput.equalsIgnoreCase(\"y\") &&\n !userInput.equalsIgnoreCase(\"yes\") &&\n !userInput.equalsIgnoreCase(\"n\") &&\n !userInput.equalsIgnoreCase(\"no\")) {\n System.out.print(\"That is not a valid input. Please try again. (y/n): \");\n userInput = scnr.nextLine();\n }\n\n // Return true if user says yes, and false if user says no\n if (userInput.equalsIgnoreCase(\"y\") || userInput.equalsIgnoreCase(\"yes\")) {\n return true;\n } else {\n return false;\n }\n }", "private static boolean getUserYesOrNo(SimpleReader in, SimpleWriter out) {\r\n String answer = in.nextLine();\r\n boolean answerIsYes = true;\r\n while (!answer.equalsIgnoreCase(\"y\") && !answer.equalsIgnoreCase(\"n\")) {\r\n out.print(\"Error: please enter 'y' or 'n' as a response: \");\r\n answer = in.nextLine();\r\n }\r\n if (answer.equalsIgnoreCase(\"n\")) {\r\n answerIsYes = false;\r\n }\r\n return answerIsYes;\r\n }", "private boolean promptCommand() {}", "protected boolean promptBoolean(String prompt) {\r\n\tSystem.out.print(prompt + \" ('y' or 'n'): \");\r\n\tchar userResponse = reader.nextLine().charAt(0);\r\n\r\n\twhile (userResponse != 'y' && userResponse != 'n') {\r\n\t System.out.print(\"Please enter a valid choice.\\n\" + prompt + \" ('y' or 'n'): \");\r\n\t userResponse = reader.nextLine().charAt(0);\r\n\t}\r\n\r\n\tif (userResponse == 'y') {\r\n\t return true;\r\n\t} else {\r\n\t return false;\r\n\t}\r\n }", "public boolean displayPrompt(String msg);", "@SuppressWarnings(\"resource\")\n public static boolean askYN()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Continue(Y/N)?\");\n while (true)\n {\n char ans = Character.toUpperCase(scanner.nextLine().charAt(0));\n if (ans == 'Y' || ans == 'N')\n return (ans == 'Y');\n System.err.println(\"Error: y or n only.\");\n }\n }", "public Boolean displayMessage(String message)\n\t{\n\t\tSystem.out.println(message +\" yes or no?\");\n\t\tString choice = new Scanner(System.in).next();\n\t\tif(choice.toLowerCase().equals(\"yes\") || choice.toUpperCase().equals(\"YES\"))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static String yes() {\n\t\treturn \"allowusersetup yes\" + delimiter + \"allowusersetup yes \";\n\t}", "public boolean showYesNoDialog(String title, String message) {\n int n = JOptionPane.showConfirmDialog(\n this,\n message,\n title,\n JOptionPane.YES_NO_OPTION);\n return n == JOptionPane.YES_OPTION;\n }", "private void askConfirm(String question) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString confirm = \"y\";\n\t\twhile (!confirm.equals(\"y\") && !confirm.equals(\"n\")) {\n\t\t\tSystem.out.println(question);\n\t\t\tconfirm = scanner.nextLine();\n\t\t\tif (confirm.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"Thank you.\");\n\t\t\t} else if (confirm.equals(\"n\")) {\n\t\t\t\tSystem.out.println(\"You can edit the config settings in src/main/config\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Really funny. Try again.\");\n\t\t\t}\n\n\t\t}\n\t\tscanner.close();\n\t}", "public static boolean isSure() {\n Scanner in = new Scanner(System.in);\n in = new Scanner(System.in);\n String danger = \"This action might result in a loss of data,\";\n danger += \" do you want to continue? (yes/no)\";\n System.out.println(danger);\n String answer = in.nextLine();\n if (answer.equals(\"no\")) {\n return false;\n }\n return true;\n }", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "boolean checkYesNo (String choice){\r\n if (choice.equalsIgnoreCase(\"N\") || choice.equalsIgnoreCase(\"Y\")){\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "protected boolean Confirm(String message) {\n String line = inputLine(message);\n if (line.length() == 0 || line.toUpperCase().charAt(0) == 'Y') {\n return true;\n } else {\n return false;\n }\n }", "public static String promptConfirmation(String[] parseInput) {\n String text = \" Are you sure all the listed details are correct?\\n\"\n + \" NRIC : \" + parseInput[0].toUpperCase().trim() + \"\\n\"\n + \" Date : \" + parseInput[1].trim() + \"\\n\"\n + \" Time : \" + parseInput[2].trim() + \"\\n\"\n + \" Reason : \" + parseInput[3].trim() + \"\\n\"\n + \" (Y/N)?\";\n return text;\n }", "public static int yesNoMenu() {\n\t\tString userInput;\n\t\tint userInt;\n\t\tboolean valid;\n\n\t\tvalid = false;\n\t\tuserInt = 0;\n\n\t\tSystem.out.println(\"1. Yes\\n2. No\");\n\n\t\tdo {\n\t\t\tuserInput = UserInput.getUserInputString().trim().toLowerCase();\n\n\t\t\tif (userInput.length() > 0) {\n\t\t\t\tswitch (userInput.charAt(0)) {\n\t\t\t\tcase '1':\n\t\t\t\tcase 'y':\n\t\t\t\t\tuserInt = 1;\n\t\t\t\t\tvalid = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '2':\n\t\t\t\tcase 'n':\n\t\t\t\t\tuserInt = 2;\n\t\t\t\t\tvalid = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid input - please try again\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} while (!valid);\n\n\t\treturn userInt;\n\n\t}", "public void confirmation() throws InterruptedException {\n Scanner scan = new Scanner(System.in);\n String confirm = \"\";\n confirm = InputValidation.regexValidate(scan, \"yn\");\n\n if (confirm.equalsIgnoreCase(\"Y\")) {\n entryCheck();\n computeResult();\n System.out.println(Pet.petCollection.get(Pet.getIndex()).getCompetition());\n }\n Competition.c.setOpponent(Pet.PetGenerator());\n }", "public boolean showQuestion(final String question) {\r\n return JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(window, question, getTitle(), JOptionPane.YES_NO_OPTION);\r\n }", "private boolean areYouSure(String text) {\n return JOptionPane.showConfirmDialog(null, text, \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;\n }", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}", "private static boolean yesNo(String string) {\n\t\tstring = string.toLowerCase();\n\t\t\n\t\treturn string.equals(\"yes\") || string.equals(\"y\") || string.equals(\"true\")\n\t\t\t\t|| string.equals(\"t\");\n\t}", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "public String sayYes(){\n return \"Yes\";\n }", "public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }", "private boolean promptNewOrder(String productName) {\r\n System.out.println(\"It doesn't look like you've placed this order before. \"\r\n + \"Would you like to place a new order for - \" + productName + \"?\\n\"\r\n + \"ENTER \\\"YES\\\" to Place a New Order or \\\"NO\\\" to continue.\");\r\n boolean responseIsYes;\r\n try {\r\n responseIsYes = scan.next().equalsIgnoreCase(\"yes\");\r\n } \r\n //if the user does not type anything, default to \"Yes\"\r\n catch(java.util.NoSuchElementException e){\r\n responseIsYes = true;\r\n }\r\n if (responseIsYes) {\r\n System.out.println(\"Thank you! A new Order will be placed.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return true;\r\n }\r\n System.out.println(\"Thank you! This order has been cancelled.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return false;\r\n }", "public void yes() {\n\t\tyes = new JButton(\"Yes\");\n\n\t\t// \"yes\" button's action listener\n\t\tyes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprevious = current;\n\t\t\t\tcurrent = current.getLeft();\n\n\t\t\t\t// if current is not a node, not a leaf\n\t\t\t\tif (current != null) {\n\t\t\t\t\tquestion.setText((String) current.getData());\n\t\t\t\t\tvalidate();\n\t\t\t\t}\n\n\t\t\t\t// Once you hit a leaf, set a final message\n\t\t\t\telse {\n\t\t\t\t\tquestion.setText(\"Wonderful! Hopefully, you found a story and lesson plan that will help you move forward in your journey! \");\n\t\t\t\t\tsouth.remove(yes);\n\t\t\t\t\tsouth.remove(no);\n\t\t\t\t\tvalidate();\n\t\t\t\t\t// add a restart button that restores the game\n\t\t\t\t\trestartGame();\n\n\t\t\t\t}\n\n\t\t\t\t// if current.getNext() is\n\t\t\t}\n\t\t});\n\n\t\t// add Yes button to left\n\t\tsouth.add(yes, BorderLayout.WEST);\n\t\tvalidate();\n\n\t}", "public static boolean yesOrno(){\n boolean result;\n Scanner input = new Scanner(System.in);\n do {\n String choice = input.next();\n if (choice.equals(\"y\")) {\n result = true;\n break;\n } else if (choice.equals(\"n\")) {\n result = false;\n break;\n } else {\n System.out.println(\"Wrong Input please enter y or n !\");\n }\n } while (true);\n\n return result;\n\n }", "public static boolean showConfirmDialog(String action) {\n\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you wish to \" + action + \"?\", \"Confirmation\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t\n\treturn reply == JOptionPane.YES_OPTION;\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "private boolean promptID() {}", "public boolean nextYN() {\n this.inputStr = this.s.nextLine();\n\n if (inputStr.toLowerCase().contains(\"yes\")) {\n return true;\n } else if (inputStr.toLowerCase().contains(\"y\")) {\n return true;\n }\n return false;\n }", "public static int yesNoCancelPop(String title, String message, String yesButton, String noButton, String cancelButton) {\n\t\t\t//Custom button text\n\t\t\tObject[] options = {yesButton, noButton, cancelButton};\n\t\t\tint n = JOptionPane.showOptionDialog(null, message, title, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,\n\t\t\t options,\n\t\t\t options[2]);\n\t\t\t\n\t\t\treturn n;\n\t\t}", "public static String promptForDecision(String title, String message, String optOne, String optTwo) {\n int option = JOptionPane.showOptionDialog(null,\n message,\n title,\n JOptionPane.YES_NO_OPTION,\n JOptionPane.INFORMATION_MESSAGE,\n null,\n new String[]{optOne, optTwo},\n optOne);\n\n if (option == 0) {\n return optOne;\n }\n\n return optTwo;\n\n }", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "public static String checkYesOrNo(String yesOrNo)\n\t{\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tboolean correctValue;\n\t\tif (yesOrNo.equalsIgnoreCase(\"yes\") || yesOrNo.equalsIgnoreCase(\"no\"))\n\t\t{\n\t\t\tcorrectValue = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcorrectValue = false;\n\t\t\twhile(!correctValue)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"Oops did your finger slip? Please try again. \");\n\t\t\t\tyesOrNo = keyboard.next().toLowerCase();\n\t\t\t\tif (yesOrNo.equalsIgnoreCase(\"yes\") || yesOrNo.equalsIgnoreCase(\"no\"))\n\t\t\t\t{\n\t\t\t\t\tcorrectValue = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn yesOrNo;\n\t}", "private void newGame() \n {\n int input = JOptionPane.showConfirmDialog(null, \"Would you like to play again?\\n\",\"Game has ended\",JOptionPane.YES_NO_OPTION);\n if (input == JOptionPane.NO_OPTION){\n JOptionPane.showMessageDialog(null, \"Thank you for playing! \\n\\nBye Bye!\",\"Game Over\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (input == JOptionPane.YES_OPTION){\n isFirst = false;\n init();\n gameLogic();\n }\n }", "private boolean promptToSave() throws IOException {\n applicationTemplate.getDialog(Dialog.DialogType.CONFIRMATION).show(\"Save work?\", \n \"Would you like to save your current work?\");\n return ((ConfirmationDialog)applicationTemplate.getDialog(Dialog.DialogType.CONFIRMATION)).getSelectedOption().equals(Option.YES) \n || ((ConfirmationDialog)applicationTemplate.getDialog(Dialog.DialogType.CONFIRMATION)).getSelectedOption().equals(Option.NO);\n }", "private boolean confirmAlert(String title, String message) {\n\t\tStage window = new Stage();\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\n\t\twindow.setTitle(title);\n\t\twindow.setHeight(100);\n\n\t\tLabel errorMessage = new Label(message);\n\t\terrorMessage.setPrefWidth(150 + message.length() * 5);\n\t\terrorMessage.setAlignment(Pos.CENTER);\n\t\twindow.setWidth(errorMessage.getPrefWidth());\n\n\t\tButton yes = new Button(\"yes\");\n\t\tButton no = new Button(\"no\");\n\n\t\tyes.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = true;\n\t\t});\n\t\tno.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = false;\n\t\t});\n\n\n\t\tHBox answers = new HBox(yes, no);\n\t\tanswers.setSpacing(15);\n\t\tanswers.setAlignment(Pos.CENTER);\n\t\tVBox layout = new VBox();\n\t\tlayout.getChildren().addAll(errorMessage, answers);\n\t\tlayout.setAlignment(Pos.CENTER);\n\t\tlayout.setSpacing(15);\n\n\t\tScene scene = new Scene(layout);\n\t\twindow.setScene(scene);\n\t\twindow.showAndWait();\n\n\t\treturn answer;\n\t}", "protected boolean showConfirm (String msg, String title)\n {\n String[] options = {\n UIManager.getString(\"OptionPane.okButtonText\"),\n UIManager.getString(\"OptionPane.cancelButtonText\")\n };\n return 0 == JOptionPane.showOptionDialog(\n this, _msgs.get(msg), _msgs.get(title),\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null,\n options, options[1]); // default to cancel\n }", "public static boolean isResponseYes(String userResponse) {\n boolean result = false;\n if (null != userResponse) {\n char firstCharacter = userResponse.charAt(0);\n result = (firstCharacter == 'y' || firstCharacter == 'Y');\n }\n\n return result;\n }", "public abstract boolean confirm();", "public Button getYes() {\n return yes;\n }", "protected boolean confirm (String title, String message)\n {\n return JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(\n this, message, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);\n }", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tString answer = JOptionPane.showInputDialog(null,\"Are you happy? or is your name bob?\"); //IS THESE CORRECT?????\n\t\t\n\t\t\n\t\t/*\n\t\t * no, yes, bob\n\t\t */\n\t\t\n\t\t/*\n\t\t * psudo code.. \n\t\t * if - else statements are conditional dependent clauses.\n\t\t * As soon as the first if/else-if evaluates to true.. it will run its \n\t\t * block, and then drop out of the entire if-else block..\n\t\t * \n\t\t * int i = 1;\n\t\t * \n\t\t * if(i == 0) -> i is 1 NOT 0.. therefore false.\n\t\t * {\n\t\t * \t\n\t\t * \n\t\t * } else if (i == 1 ) { it is 1 therefore true\n\t\t * \n\t\t * System.out.println(\"ITS TRUE!\");\n\t\t * \n\t\t *\n\t\t * } else if (i == 2) {\n\t\t * \n\t\t * \n\t\t * \n\t\t * } else if (i >=3 ) {\n\t\t * \n\t\t * \t\n\t\t * } else {\n\t\t * \n\t\t * \t\t//Default catch all!\n\t\t * }\n\t\t * \n\t\t * if - statements are not dependent clauses. Each one is evaluated \n\t\t * separate from the previous if statement. if one evalutates to true,\n\t\t * the next statement will be evaluated independently as well.\n\t\t * \n\t\t * if(i == 0) {\n\t\t * \t\tSystem.out.println(\"its 0\");\n\t\t * }\n\t\t * \n\t\t * if(i == 1) {\n\t\t * \t\tSystem.out.println(\"its 1\");\n\t\t * }\n\t\t * \n\t\t * if(i == 2) {\n\t\t * \t\tSystem.out.println(\"its 2\");\n\t\t * }\n\t\t * \n\t\t * if(i == 1 || i ==2) {\n\t\t * \n\t\t * \t\tSystem.out.println(\"its 1 or 2\");\n\t\t * }\n\t\t */\n\t\t\n\t\tif(answer.contentEquals(\"no\"))\n\t\t{\n\t\t\t//Stuff when answer is no happens here.\n\t\t\tString answer2 = JOptionPane.showInputDialog(null,\"Do you want to be happy\");\n\t\t\t\n\t\t\tif(answer2.contentEquals(\"no\"))\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Keep on doing what you are doing\");\n\t\t\t\t\n\t\t\t} else if(answer2.contentEquals(\"yes\")) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Change something\");\n\t\t\t}\n\t\t} else if(answer.contentEquals(\"yes\")) {\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"Keep on doing what you are doing\");\n\t\t} else if(answer.contentEquals(\"bob\")) {\n\t\t\n\t\t\tJOptionPane.showMessageDialog(null,\"Nice you like bob too!!!\");\n\n\t\t} else {\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"THEY ANSWERED ANYTHING OTHER THAN NO, YES, and BOB\");\n\t\t}\n\t\t\n\t}", "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 }", "void confirm();", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n return result;\r\n \r\n }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "private int confirmQuestion(String message) {\n\t\treturn JOptionPane.showConfirmDialog(\n\t\t\t\t_frame,\n\t\t\t\tmessage, _frame.getTitle(),\n\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION,\n\t\t\t\tJOptionPane.QUESTION_MESSAGE);\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 }", "private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "String prompt(String message) throws IOException;", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "public boolean parseYesNo() {\n\t\tboolean ret = false;\n\t\tboolean validParse = false;\n\t\twhile(!validParse) {\n\t\t\tString parse = parseString().toUpperCase();\n\t\t\tswitch(parse) {\n\t\t\tcase \"Y\":\n\t\t\t\tret = true;\n\t\t\t\tvalidParse = true;\n\t\t\t\tbreak;\n\t\t\tcase \"N\":\n\t\t\t\tret = false;\n\t\t\t\tvalidParse = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tprintErrorParse();\n\t\t\t\tvalidParse = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public static Boolean YesNo(String arg){\n\t\tif(arg.matches(\"^[yYnN]{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private static void JGUI4() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "public void presetYesNo() {\n pollOptions.clear();\n pollOptions.add(\"Yes\");\n pollOptions.add(\"No\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "private static void JGUI2() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "public static void main(String[] args) {\n\t\tString response=JOptionPane.showInputDialog(null,\"Do you know how to write code?\");\n\t\t// 2. If they say \"yes\", tell them they will rule the world.\n\t\tif(response.equalsIgnoreCase(\"yes\") || response.equalsIgnoreCase(\"sure\"))\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\"Than you will rule the world!\");\n\t\t}\n\t\t// 3. Otherwise, wish them good luck washing dishes.\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null,\"Good luck on your career!\");\n\t\t}\n\t}", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}", "private static void prompt(boolean isTestRun) {\n if (!isTestRun)\n System.out.print(\"> \");\n }", "public void showNextMovePrompt() {\n\n if(model.isXTurn()){\n resultLabel.setText(\"X's Turn\");\n }\n else{\n resultLabel.setText(\"O's Turn\");\n }\n }", "public static boolean getRepeat(){\r\n boolean repeat = true, repeatLoop = true;\r\n String yon = \"\";//yes or no\r\n do{\r\n System.out.println(\"Please answer yes or no(y/n) if you want to repeat!\\n\");\r\n yon = sc.nextLine();\r\n yon = yon.trim(); \r\n if(yon.equalsIgnoreCase(\"y\")){\r\n repeat = true;\r\n repeatLoop = false;\r\n }\r\n else if(yon.equalsIgnoreCase(\"yes\")){\r\n repeat = true;\r\n repeatLoop = false;\r\n }\r\n else if(yon.equalsIgnoreCase(\"n\")){\r\n repeat = false;\r\n repeatLoop = false;\r\n }\r\n else if(yon.equalsIgnoreCase(\"no\")){\r\n repeat = false;\r\n repeatLoop = false;\r\n }\r\n else{\r\n System.out.println(\"You didn't enter yes(y) or no(n)\");\r\n }\r\n }while(repeatLoop);\r\n sc.nextLine();\r\n return repeat;\r\n }", "public boolean promptPassword(String message) \r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "public int showOkCancelMessage(String title, String msg) {\r\n return JOptionPane.showConfirmDialog(this,\r\n\t\t\t\t\t msg, title, JOptionPane.OK_CANCEL_OPTION);\r\n }", "public static boolean confirmAction(Container parent, String msg) {\n int rsp = JOptionPane.showConfirmDialog(\n parent,\n msg,\n \"Question\",\n JOptionPane.YES_NO_OPTION\n );\n if (rsp == JOptionPane.NO_OPTION || rsp == JOptionPane.CLOSED_OPTION) {\n return false; //don't replace\n }\n return true;\n }", "public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "boolean hasInitialPromptFulfillment();", "public static boolean playAgain() {\n\t\t// Have the system ask the user if they want to play again.\n\t\tSystem.out.print(\"Play again? y = yes: \");\n\t\tScanner manualInput = new Scanner(System.in);\n\t\tString playAgain = manualInput.nextLine();\n\t\t// Create an if statement that runs if the playAgain variable is equal to y.\n\t\tif(playAgain.equals(\"y\")) {\n\t\t\t// Have the function return true.\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public static void main(String[] args) {\nString answer= JOptionPane.showInputDialog(\"do you like dogs\");\n\tJOptionPane.showMessageDialog(null,(answer));\n\t}", "int confirmar(String s) {\n\t\treturn JOptionPane.showConfirmDialog(this, s, \"Alerta\", 0, 1, null);\n\t}", "@OnClick(R.id.buttonConfirmSymptoms)\n public void buttonConfirmSymptoms() {\n if (sharedPreferences.getInt(\"symptomCounter\", 0) == 0) {\n Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show();\n } else {\n startActivity(new Intent(ExaminationActivity.this, DiagnoseActivity.class));\n finish();\n }\n }", "private static void gameOver() {\n\t\tSystem.out.println(\"Would you like to play again?\");\n\t\tinput.nextLine();\n\t\tuserInput = input.nextLine();\n\t\tif(userInput.contains(\"yes\")||userInput.equals(\"y\"))\n\t\t{\n\t\t\tgame();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Stay golden.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void promptUser(String string) {\n\t\tJOptionPane.showMessageDialog(frame,string);\n\t\t\n\t}", "private void promptPlayerTurn(Player player) {\r\n JOptionPane.showMessageDialog(\r\n null,\r\n player.getName() + \", it's your turn!\",\r\n \"Player Confirmation\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n }", "private static void JGUI5() {\n\t\tint response = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Do you want to continue?\", \"Confirm\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n\t\tif (response == JOptionPane.NO_OPTION) {\n\t\t\tSystem.out.println(\"No button clicked\");\n\t\t} else if (response == JOptionPane.YES_OPTION) {\n\t\tSystem.out.println(\"Yes button clicked\");\n\t\t} else if (response == JOptionPane.CLOSED_OPTION) {\n\t\t\tSystem.out.println(\"JOptionPane closed\");\n\t\t}\n\t}", "public boolean isConfirmKey() {\n switch (this) {\n case DPAD_CENTER:\n case ENTER:\n case SPACE:\n case NUMPAD_ENTER:\n return true;\n default:\n return false;\n }\n }" ]
[ "0.82262903", "0.82113916", "0.78521967", "0.78521967", "0.77241117", "0.76621777", "0.7423772", "0.7388453", "0.73752874", "0.73386973", "0.73383695", "0.7226958", "0.72088933", "0.717253", "0.7135645", "0.7122433", "0.71161014", "0.7102853", "0.69744766", "0.6908673", "0.68942386", "0.6885302", "0.6865983", "0.68394387", "0.6838749", "0.66908497", "0.6677589", "0.667335", "0.664122", "0.6586373", "0.6583838", "0.65644574", "0.65558165", "0.6555429", "0.653245", "0.6524169", "0.6517712", "0.64993745", "0.64871365", "0.64310783", "0.64057124", "0.6383657", "0.6374389", "0.63715714", "0.63032126", "0.62966657", "0.62956", "0.6279407", "0.6275276", "0.6263034", "0.62596726", "0.6256572", "0.6237544", "0.62372166", "0.62370104", "0.6224963", "0.619134", "0.61834747", "0.61737686", "0.6154384", "0.6142986", "0.61387795", "0.6122268", "0.6120122", "0.60961825", "0.6084285", "0.6065648", "0.6057666", "0.6050628", "0.6049356", "0.6046009", "0.60448086", "0.6038469", "0.60095644", "0.5996864", "0.5987577", "0.5983956", "0.59838045", "0.5976138", "0.59737897", "0.5964143", "0.5942471", "0.59330857", "0.5931253", "0.59275335", "0.59246904", "0.59086645", "0.5905671", "0.5892761", "0.588158", "0.5871744", "0.5871386", "0.58701307", "0.58665985", "0.5852046", "0.5846465", "0.58449733", "0.5837092", "0.58256334" ]
0.7552539
7
System.out.print("currentState [" + currentState + "] > transition [" + transition + "]");
public void changeState(int transition) { lastState = currentState; currentState = nextState[currentState][transition]; // System.out.println(" = " + currentState); if (currentState == -2) { System.out.println("Error [" + currentState + "] has occured"); terminate(); } else if (currentState == -1) { terminate(); } states[currentState].run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printCurrentState() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tSystem.out.print(this.currentState[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "void printstate()\n\t{\n\t\toperation.printstate();\n\t}", "@Override\n\tpublic String toString() {\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(super.toString());\n\t\tbuffer.append('\\n');\n\t\tfor (final State state : getStates()) {\n\t\t\tif (initialState == state) {\n\t\t\t\tbuffer.append(\"--> \");\n\t\t\t}\n\t\t\tbuffer.append(state);\n\t\t\tif (isFinalState(state)) {\n\t\t\t\tbuffer.append(\" **FINAL**\");\n\t\t\t}\n\t\t\tbuffer.append('\\n');\n\t\t\tfor (final Transition transition : getTransitionsFromState(state)) {\n\t\t\t\tbuffer.append('\\t');\n\t\t\t\tbuffer.append(transition);\n\t\t\t\tbuffer.append('\\n');\n\t\t\t}\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "public void printStateInt() {\n StringBuilder out = new StringBuilder();\n for (int r = 0; r < rows; r++) {\n out.append(\"[\");\n for (int c = 0; c < columns; c++) {\n int number = currentState[r][c];\n out.append(number);\n if (number < 10) {\n out.append(\" \");\n }\n if (c != columns - 1)\n out.append(\" \");\n }\n out.append(\"]\");\n if (r != rows - 1)\n out.append(\"\\n\");\n\n }\n System.out.println(out);\n }", "public String printState(){\n if (this.state.equals(\"unstarted\")) return \"unstarted 0\";\n\n else if (this.state.equals(\"terminated\")) return \"terminated 0\";\n else if (this.state.equals(\"blocked\")) {\n return String.format(\"blocked %d\", ioBurstTime);\n }\n else if (this.state.equals(\"ready\")) {\n if (remainingCPUBurstTime !=null){\n return String.format(\"ready %d\", remainingCPUBurstTime);\n }\n return \"ready 0\";\n }\n\n else if (this.state.equals(\"running\")){\n return String.format(\"running %d\", cpuBurstTime);\n }\n\n else return \"Something went wrong.\";\n }", "public StateTransition getStateTransition() {\n\t\treturn (sb);\n\t}", "private static String getTransitionString(Transition expected) {\n\t\treturn expected.getFromState().getName()+\"-->\"+expected.getDescription()+\"-->\"+expected.getToState().getName();\n\t}", "public void update() \n {\n System.out.print( \" \" + Integer.toHexString( subj.getState() ) ); \n}", "public String toString() {\n try {\n StringBuilder sb = new StringBuilder();\n sb.append((\"STATES\") + System.getProperty(\"line.separator\"));\n sb.append((\"-----------\") + System.getProperty(\"line.separator\"));\n sb.append(statesToString());\n sb.append((\"TRANSITIONS\") + System.getProperty(\"line.separator\"));\n sb.append((\"-------------------\") + System.getProperty(\"line.separator\"));\n sb.append(transitionsToString());\n return sb.toString();\n } catch (RuntimeException sbe) {\n throw sbe;\n } catch (Exception sbe) {\n throw new RuntimeException(sbe);\n }\n }", "public void displayCurrentState(State game);", "@Override\n public String toString()\n {\n return state.toString();\n }", "public String printPair() {\n\t\treturn \"(\"+leftState.getStateNo() + \",\" + rightState.getStateNo()+\")\";\n\t}", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn state.toString();\r\n\t}", "public String toString()\n {\n \tint tempIndex;\n \tStringBuilder statesStr = new StringBuilder(\"States: { \");\n \tfor(ComplexState state: states)\n \t\tstatesStr.append(state.getName() + \", \");\n\t\ttempIndex = statesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tstatesStr.deleteCharAt(statesStr.lastIndexOf(\",\"));\n \tstatesStr.append(\"}\\n\");\n \tStringBuilder initStatesStr = new StringBuilder(\"Initial states: { \");\n \tfor(ComplexState state: initialStates)\n \t\tinitStatesStr.append(state.getName() + \", \");\n \ttempIndex = initStatesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tinitStatesStr.deleteCharAt(initStatesStr.lastIndexOf(\",\"));\n \tinitStatesStr.append(\"}\\n\");\n \tStringBuilder transitionFuncStr = new StringBuilder(\"Transition relation: { \");\n \tArrayList<ComplexState> destStates = new ArrayList<ComplexState>();\n \tfor(ComplexState srcState: states) \n \t{\n \t\tdestStates = transitionRelation.get(srcState);\n \t\tif(destStates != null)\n\t \t\tfor(ComplexState destState: destStates)\n\t \t\t\ttransitionFuncStr.append(\"( \" + srcState.getName() + \", \" + destState.getName() + \" ), \" );\t\n \t}\n \ttempIndex = transitionFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\ttransitionFuncStr.deleteCharAt(transitionFuncStr.lastIndexOf(\",\"));\n \ttransitionFuncStr.append(\"}\\n\");\n \tStringBuilder labelingFuncStr = new StringBuilder(\"Labeling function: { \");\n \tArrayList<AtomicProp> atomicProps = new ArrayList<AtomicProp>();\n \tfor(ComplexState state: states) \n \t{\n \t\tlabelingFuncStr.append(\"( \" + state.getName() + \", { \");\n \t\tatomicProps = state.getLabels();\n \t\tif(atomicProps != null)\n \t\t\tfor(AtomicProp ap: state.getLabels())\n \t\t\t\tlabelingFuncStr.append(ap.getName() + \", \");\n \t\ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \t\tlabelingFuncStr.append(\"} ), \");\n \t}\n \ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \tlabelingFuncStr.append(\"}\\n\"); \t\n \tString result = statesStr.toString() + initStatesStr.toString() + transitionFuncStr.toString() + labelingFuncStr.toString() + \"Type: \" + type.toString();\n \treturn result;\n }", "@Test\n\tpublic void statePrint_test()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(0,1, 'o');\n\t\tb.set(0,2, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.statePrint();\n\t\tassertTrue(out.toString().contains(\"x|o|x\\n------\\no|x| \\n------\\n | | \\n\"));\n\t}", "public String toString() {\n String result=\"Initial state: 0\\nFinal state: \"+(transitionTable.length-1)+\"\\nTransition list:\\n\";\n for (int i=0;i<epsilonTransitionTable.length;i++) for (int state: epsilonTransitionTable[i])\n result+=\" \"+i+\" -- epsilon --> \"+state+\"\\n\";\n for (int i=0;i<transitionTable.length;i++) for (int col = 0; col< NFA.N; col++)\n if (transitionTable[i][col]!=-1) result+=\" \"+i+\" -- \"+(char)col+\" --> \"+transitionTable[i][col]+\"\\n\";\n return result;\n }", "public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }", "public void update() \n {\n System.out.print( \" \" + Integer.toOctalString( subj.getState() ) );\n }", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "@Test\n\tpublic void statePrint_test1()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(1,2, 'o');\n\t\tb.set(0,2, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.statePrint();\n\t\tassertTrue(out.toString().contains(\"x| |x\\n------\\no|x|o\\n------\\n | | \\n\"));\n\t}", "public String describeTransition (double cutoff) { return \"\"; }", "public void print() {\r\n for (final Map.Entry<State, StatePolicyProperties> mapping : mStateMap.entrySet()) {\r\n final StatePolicyProperties properties = mapping.getValue();\r\n\r\n // Print the state\r\n mapping.getKey().print();\r\n System.out.println(\" State value = \" + properties.getValue());\r\n\r\n // Print the actions with their probability\r\n for (Map.Entry<Action, Double> actionProbability : properties.getActionProbabilities().entrySet()) {\r\n System.out.println(\" Action probability \" + actionProbability.getKey() + \" = \"\r\n + actionProbability.getValue());\r\n }\r\n // Print the actions with their value\r\n for (Map.Entry<Action, Double> actionValue : properties.getActionValues().entrySet()) {\r\n System.out.println(\" Action value \" + actionValue.getKey() + \" = \" + actionValue.getValue());\r\n }\r\n }\r\n System.out.println();\r\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\tstringBuilder.append(\"\\n|\");\n\t\tfor (int i = 0; i < state.size(); i++)\n\t\t{\n\t\t\tstringBuilder.append(state.get(i)).append(\"|\");\n\t\t\tif (i % size == size - 1 && i < state.size() - 1)\n\t\t\t{\n\t\t\t\tstringBuilder.append(\"\\n|\");\n\t\t\t}\n\t\t}\n\t\tstringBuilder.append(\"\\n\");\n\t\tfor (int i = 0; i < 2 * size + 1; i++)\n\t\t{\n\t\t\tstringBuilder.append(\"-\");\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}", "@Override\n public String toString() {\n return \"TRANSITION\\n\\tPerformative:\\t[\" + this.getPerformative() + \"]\\n\" + \"\\tSTART:\\t\\t[\" + this.getStartState().getName() + \"]\\n\" + \"\\tEND:\\t\\t[\" + this.getEndState().getName() + \"]\\n\" + \"\\tSENDER:\\t\\t[\" + this.getSender() + \"]\\n\" + \"\\tRECIPIENT:\\t[\" + this.getReceiver() + \"]\\n\" + \"\\tBY:\\t\\t[\" + this.getContent() + \"]\\n\";\n }", "public double getTransition(){\n\t\treturn transition;\n\t}", "void nextState();", "void show() {\r\n System.out.println(\"Weight of the Cycle is = \" + weight);\r\n System.out.println(\"Name of the Cycle is = \" + name);\r\n }", "java.lang.String getState();", "public void update()\n {\n System.out.print( \" \" + Integer.toBinaryString( subj.getState() ) );\n }", "void prettyPrint(StatePrettyPrinter pp);", "public String toString() {\n\treturn state.toString() + \" \" + context.toString();\n }", "public void display() {\n\t\tSystem.out.println(state+\" and its' capital is \"+capital);\n\t}", "public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "@Override\n public String toString ()\n {\n StringBuffer buffer = new StringBuffer();\n for (State value : stateMap.values()) {\n buffer.append(value.toString());\n buffer.append(\"\\n\");\n }\n return buffer.toString();\n }", "@Override\n protected void incrementStates() {\n\n }", "@Override\r\n\tvoid showGameState() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t \r\n System.out.println(\"-------------\");\r\n\t\t\r\n for (int i = 0; i < boardsize; i++) \r\n {\r\n System.out.print(\"| \");\r\n for (int j = 0; j < boardsize; j++) \r\n {\r\n \tif(board[i][j]==-1)\r\n \t\tSystem.out.print(\"_\" + \" | \");\r\n \telse if\t(board[i][j]==0)\r\n \t\tSystem.out.print( \"W | \");\r\n \telse\r\n \t\tSystem.out.print( \"B | \");\r\n }\r\n System.out.println();\r\n System.out.println(\"-------------\");\r\n }\r\n }", "@Output\n public String getState() {\n return state;\n }", "@Test\n public void genStateTransferMetric() {\n TreeMap<String, Integer> stat = new TreeMap<>();\n int currState = 8;\n for (int i = 1; i < numSteps; i++) {\n int nextStates = getNextState(currState);\n stat.compute(currState + \"-\" + nextStates, (k, v) -> v == null ? 1 : v + 1);\n currState = nextStates;\n }\n stat.forEach((k, v) -> System.out.printf(\"%s:%f\\n\", k.replace('-', ':'), (double) v / numSteps));\n }", "public String getState( )\r\n {\r\n if (isEating)\r\n return \"Eating\"; // Exit method w/ current state\r\n\r\n if (isSleeping)\r\n return \"Sleeping\";\r\n\r\n return \"Error in State\";\r\n }", "public String getNextState() {\n return nextState;\n }", "public String toString() {\r\n\t\treturn gameState;\r\n\t}", "public String dumpState() {\n StringBuilder out = new StringBuilder();\n out.append(currentPlayer);\n for (int i = 0; i < board.length; ++i)\n out.append(\" \" + board[i]);\n\n return out.toString();\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "public void printCurrentState() {\n\t\t//getX() and getY() are methods from the Point class\n\t\tSystem.out.println(\"Avatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n\t\tSystem.out.println(\"Points: \" + avatar.getScore());\n\t}", "public void printState(int option, char player) {\n\t\tif(option == 1){\r\n\r\n\t\t\t//Get successors for the players\r\n\t\t\tState[] successors = this.getSuccessors(player);\r\n\r\n\t\t\t//If the state has no successors but is not a terminal\r\n\t\t\t//node, print the board itself.\r\n\t\t\tif(successors.length == 0 && !this.isTerminal()){\r\n\t\t\t\tSystem.out.println(this.getBoard());\r\n\t\t\t}\r\n\r\n\t\t\t//If there are no valid moves available and the node is \r\n\t\t\t//a terminal node\r\n\t\t\tif(successors.length == 0 && this.isTerminal())\r\n\t\t\t\treturn;\r\n\r\n\t\t\t//Print the successors in natural reading order\r\n\t\t\tif(successors.length != 0){\r\n\r\n\t\t\t\t//Print the states\r\n\t\t\t\tfor(State state : successors){\r\n\t\t\t\t\tSystem.out.println(state.getBoard());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//If option is 2, check whether the board is a terminal node or not\r\n\t\tif(option == 2){\r\n\r\n\t\t\t//Print the game theoretic value of the state, 1 if dark wins, -1 if light wins, 0\r\n\t\t\t//if it is a tie.\r\n\t\t\tif(this.isTerminal()){\r\n\t\t\t\tSystem.out.println(this.getScore());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//Print non terminal if the state is not a terminal node\r\n\t\t\t\tSystem.out.println(\"non-terminal\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\t\t//If option is 3, run the minimax algorithm on our board\r\n\t\tif(option == 3){\r\n\r\n\t\t\t//First print the game theoretic value for the given\r\n\t\t\t//player-board pair\r\n\t\t\tint gameTheoreticValue = Minimax.run(this, player);\r\n\t\t\tSystem.out.println(gameTheoreticValue);\r\n\t\t\t//Print the number of states explored\r\n\t\t\tSystem.out.println(Minimax.counterMinimax);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t//If option is four\r\n\t\tif(option == 4 || option == 6){\r\n\r\n\t\t\t//If board is terminal, produce no output\r\n\t\t\tif(this.isTerminal())\r\n\t\t\t\treturn;\r\n\r\n\t\t\t//If no move possible, but not terminal, print the board\r\n\t\t\tif(this.getSuccessors(player).length == 0 && !this.isTerminal())\r\n\t\t\t\tSystem.out.println(this.getBoard());\r\n\r\n\t\t\t//Else print the first successor\r\n\t\t\tif(this.getSuccessors(player).length != 0){\r\n\t\t\t\tState[] successors = this.getSuccessors(player);\r\n\t\t\t\t//Print the first move of the player\r\n\t\t\t\tSystem.out.println(successors[0].getBoard());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\t\t//If flag is equal to 5, run the alpha - beta pruning\r\n\t\t//algorithm\r\n\t\tif(option == 5){\r\n\r\n\t\t\t//First print the game theoretic value for the given\r\n\t\t\t//player-board pair\r\n\t\t\tint gameTheoreticValue = Minimax.run_with_pruning(this, player);\r\n\t\t\tSystem.out.println(gameTheoreticValue);\r\n\t\t\t//Print the number of states explored\r\n\t\t\tSystem.out.println(Minimax.counterPruning);\r\n\r\n\t\t}\r\n\r\n\t}", "public String toString(){\n \tif(state){\n\t\treturn (\"1\");\n\t }\n\t else{\n\t\t return(\"0\");\n\t }\n }", "public String toString() {\r\n\t\treturn (\"State: \" + this.key + \", Value: \" + this.val);\r\n\t}", "public void printInitialState() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tSystem.out.print(this.initialState[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public boolean isTransition() {\n/* 4839 */ return this.isTransition;\n/* */ }", "public String toString() {\n\tStringBuffer buffer = new StringBuffer();\n\t//\tbuffer.append(\" 6 5 4 3 2 1 \\n\");\n\tbuffer.append(\"+---------------------------------------+\\n\");\n\t\n\tbuffer.append(\"| |\");\n\tfor (int i = 12; i >= 7; --i) {\n\t buffer.append(toString(state[i]));\n\t}\n\tbuffer.append(\" |\\n\");\n\t\n\tbuffer.append(\"|\");\n\tbuffer.append(toString(state[13]));\n\tbuffer.append(\"-----------------------------|\");\n\tbuffer.append(toString(state[6]));\n\tbuffer.append(\"\\n\");\n\t\n\tbuffer.append(\"| |\");\n\tfor (int i = 0; i <= 5; ++i) {\n\t buffer.append(toString(state[i]));\n\t}\n\tbuffer.append(\" |\\n\");\n\t\n\tbuffer.append(\"+---------------------------------------+\\n\");\n\tbuffer.append(\" 0 1 2 3 4 5 \\n\");\n\t\n\treturn buffer.toString();\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"com.jcdeck.adversary.State Turn: \"+this.getTurn()+\" Depth: \"+this.depth;\n\t}", "String getState();", "String getState();", "String getState();", "void showchange() {\n\t\tif (printstatus != change)\n\t\t\tprintln(\">>>> \" + printoldline + \" CHANGED FROM <br/>\");\n\t\tprintstatus = change;\n\t\toutput+=oldinfo.symbol[printoldline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintoldline++;\n\t}", "public void printSteps() {\n\t\tfor (int y = 0; y < idNode.length; y++) {\r\n\t\t\tint x=y;\r\n\t\t\tString steps = \"\" + x;\r\n\t\t\twhile (idNode[x] != x) {\r\n\t\t\t\tx = idNode[x];\r\n\t\t\t\tsteps += \"->\" + x;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(steps);\r\n\t\t}\r\n\t}", "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 }", "private String transitionTable() {\r\n\r\n\t\tString transitionTable = \"\t\";\r\n\t\tchar[][] matrix = new char[numStates.size() + 1][alphabet.size() + 1];\r\n\t\tStringBuilder bldmatrix = new StringBuilder();\r\n\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix[i].length; j++) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\tmatrix[i][j] = ' ';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tArrayList<Character> trans = new ArrayList<>(alphabet);\r\n\t\t\t\t\t\tmatrix[i][j] = trans.get(j - 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\tmatrix[i][j] = numStates.get(i - 1).getName().charAt(0);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tArrayList<Character> trans2 = new ArrayList<>(alphabet);\r\n\t\t\t\t\t\tmatrix[i][j] = ((NFAState) getToState(numStates.get(i - 1), trans2.get(j - 1))).getName()\r\n\t\t\t\t\t\t\t\t.charAt(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < matrix.length; x++) {\r\n\t\t\tfor (int y = 0; y < matrix[x].length; y++) {\r\n\t\t\t\tbldmatrix.append(\"\\t\" + matrix[x][y]);\r\n\r\n\t\t\t}\r\n\t\t\tbldmatrix.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\ttransitionTable = bldmatrix.toString();\r\n\r\n\t\treturn transitionTable;\r\n\r\n\t}", "public S getState() {\n return currentState;\n }", "@Override\r\n\tpublic void Print() {\r\n\t\tSystem.out.print(this.tav+\" \");\r\n\t\t\r\n\t}", "private static void printGrid(Vector<State> states) {\n\t\tSystem.out.println(\"State\\tUP\\tDOWN\\tLEFT\\tRIGHT\");\n\t\tSystem.out\n\t\t\t\t.println(\"---------------------------------------------------\");\n\t\tfor (State s : states) {\n\t\t\tSystem.out.print(s.getName());\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqUval()));\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqDval()));\n\t\t\tSystem.out.print(\" \\t\" + String.format(\"%.1f\", s.getqLval()));\n\t\t\tSystem.out.print(\"\\t\" + String.format(\"%.1f\", s.getqRval()));\n\t\t\tSystem.out.println();\n\n\t\t}\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"New Game State\";\n\t}", "private static void mystate() {\n\t\tSystem.out.println(\"My livind state is Mairiland\");\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"State: \" + state + \" Action: \" + action + \" Path Cost: \" + pathCost + \"Parent:\\n\" + parent;\r\n\t}", "String convertTransition(Transition instanceValue);", "void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}", "public void notifyStateChange(String str) {\n out.println(str); \n }", "@Override\n public String toString() {\n // | <M,C,B> |\n // | Depth = d |\n // -----------\n return \"\\n ----------- \\n\" + \"| <\" + this.state[0] + \",\" + this.state[1] + \",\" + this.state[2] + \"> |\\n\"\n + \"| Depth = \" + this.depth + \" |\\n\" + \" ----------- \\n\";\n }", "public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}", "public int getStateOfMovement(){ return stateOfMovement; }", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "public void printState(int option, int depth) {\n State thisState = new State(capjug1,capjug2,currjug1,currjug2,goal,this.depth);\r\n State[] sa= getSuccessors(thisState);\r\n \r\n switch (option) {\r\n case 1:\r\n for(State s: sa)\r\n printHelp(s,option);\r\n break;\r\n \r\n case 2:\r\n for(State s: sa)\r\n printHelp(s,option);\r\n break;\r\n \r\n case 3:\r\n case 4:\r\n case 5:\r\n UninformedSearch.run(thisState,option,depth);\r\n break;\r\n \r\n default:\r\n }\r\n\r\n }", "public String getState() {\n\t\treturn state.toString();\n\t}", "private static void PrintResult(State o) {\n\t\tif (o.cha!=null) {\n\t\t\tPrintResult(o.cha);// co duoc 2 buoc tren minh ms in ra dc buoc PrintResult\n\t\t\t//PrintResult goi de quy trong PrintResult\n\t\t\tswitch (o.me.i) {\n\t\t\tcase 0: System.out.println(\"Up\");break;\n\t\t\tcase 1: System.out.println(\"Down\");break;\n\t\t\tcase 2: System.out.println(\"Left\");break;\n\t\t\tcase 3: System.out.println(\"Right\");break;\n\t\t\t}\n\t\t}\n\t\to.Print();\n\t}", "private void print(float coutTransfert) {\n\t}", "void show() {\n System.out.print(\"show\");\n }", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public boolean transition() {\n current = new State(ts++, hopper); \n if (terminus.isTerminus(current)) {\n return false;\n } else {\n hopper.sendBall(oneMinute);\n return true;\n }\n }", "@Override\n public String toString(){\n return \"{@\" + vecOne.getSteps() + \"; @\" + vecTwo.getSteps() + \"}\";\n }", "@Override\n public String getState() {\n StringBuilder builder = new StringBuilder();\n StringBuilder listPitches = listAllPitches(this.getFinalBeat());\n int length = this.getFinalBeat();\n\n builder.append(listPitches);\n\n for (int i = 0; i < length; i++) {\n builder.append(\"\\n\" + padded(i, length) + notesToString(getNotesPlayingAtBeat(i), i));\n }\n return builder.toString();\n }", "@Override\r\n public String toString() {\r\n return String.valueOf(this.m_current);\r\n }", "void dump_stacks(int count)\n{\nint i;\n System.out.println(\"=index==state====value= s:\"+stateptr+\" v:\"+valptr);\n for (i=0;i<count;i++)\n System.out.println(\" \"+i+\" \"+statestk[i]+\" \"+valstk[i]);\n System.out.println(\"======================\");\n}", "void dump_stacks(int count)\n{\nint i;\n System.out.println(\"=index==state====value= s:\"+stateptr+\" v:\"+valptr);\n for (i=0;i<count;i++)\n System.out.println(\" \"+i+\" \"+statestk[i]+\" \"+valstk[i]);\n System.out.println(\"======================\");\n}", "void dump_stacks(int count)\n{\nint i;\n System.out.println(\"=index==state====value= s:\"+stateptr+\" v:\"+valptr);\n for (i=0;i<count;i++)\n System.out.println(\" \"+i+\" \"+statestk[i]+\" \"+valstk[i]);\n System.out.println(\"======================\");\n}", "public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }", "public String toString() {\r\n\treturn \"batch image builder for:\\n\\tnew state: \"/*nonNLS*/ + getNewState();\r\n}", "@Override\n\tpublic void handleEvent(StateEventT stateNow) {\n\t\tSystem.out.println(stateNow.getState());\n\t}", "void dump_stacks(int count)\r\n{\r\nint i;\r\n System.out.println(\"=index==state====value= s:\"+stateptr+\" v:\"+valptr);\r\n for (i=0;i<count;i++)\r\n System.out.println(\" \"+i+\" \"+statestk[i]+\" \"+valstk[i]);\r\n System.out.println(\"======================\");\r\n}", "public abstract Etat transition();", "public String getState()\n {\n \treturn state;\n }", "@Override\n public void move() {\n System.out.println(\"diagonally\");\n }", "public String getState() { return state; }", "public void display() {\n System.out.println(toString());\n }", "@Override\r\n\tpublic void move() {\n\t\tSystem.out.println(name+\"fly in the sky\");\r\n\t}" ]
[ "0.7138703", "0.69558305", "0.6875359", "0.68277687", "0.6621466", "0.66094357", "0.65757376", "0.65554696", "0.64773715", "0.64275223", "0.6422559", "0.6374108", "0.63117206", "0.6283393", "0.626694", "0.62603456", "0.62369204", "0.6214107", "0.6211307", "0.620608", "0.6205697", "0.6194431", "0.617346", "0.6125571", "0.61111975", "0.61104625", "0.6101705", "0.6081966", "0.6076554", "0.60688823", "0.6059403", "0.6028107", "0.60231763", "0.5983776", "0.59724236", "0.59561086", "0.5944384", "0.59390914", "0.59294355", "0.59292084", "0.59205353", "0.59189767", "0.5912363", "0.59106016", "0.5903923", "0.5893537", "0.58877915", "0.5881176", "0.5871247", "0.58648616", "0.5864817", "0.5862935", "0.58492464", "0.58356434", "0.58203155", "0.57989925", "0.57989925", "0.57989925", "0.57682776", "0.5757019", "0.57511044", "0.574215", "0.57201684", "0.571804", "0.57141393", "0.57070696", "0.57055765", "0.57022786", "0.57007134", "0.56893015", "0.5680909", "0.56795335", "0.56783605", "0.5674154", "0.5673129", "0.5665019", "0.5662407", "0.5651753", "0.5647819", "0.56206125", "0.5617598", "0.56131274", "0.56131274", "0.56129384", "0.5604119", "0.5600241", "0.5591018", "0.5588754", "0.5588754", "0.5588754", "0.558854", "0.5584081", "0.5567504", "0.5564632", "0.5558884", "0.5558234", "0.5548028", "0.5547793", "0.55436826", "0.5543108" ]
0.61898583
22
/Get unsync Installation list from db
private void getDBInstallationList() { DataHolder mDataHolder; mArrayListInstallations = new ArrayList<>(); try { String url = "select * from " + mActivity.mDbHelper.mTableInstall + " where " + mActivity.mDbHelper.mFieldInstallIsSync + "= 0" + " AND " + mActivity.mDbHelper.mFieldInstallUserId + "= '" + PreferenceHelper.getPreferenceInstance(MyApplication.getAppContext()).getUserId() + "'" + " order by " + mActivity.mDbHelper.mFieldInstallLocalId + " DESC"; System.out.println("Local url " + url); mDataHolder = mActivity.mDbHelper.read(url); if (mDataHolder != null) { System.out.println("Local Device List " + url + " : " + mDataHolder.get_Listholder().size()); for (int i = 0; i < mDataHolder.get_Listholder().size(); i++) { VoInstallation mVoInstallation = new VoInstallation(); mVoInstallation.setInst_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalId)); mVoInstallation.setInst_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerId)); mVoInstallation.setInst_user_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUserId)); mVoInstallation.setInst_device_imei_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceIMEINo)); mVoInstallation.setInst_device_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceServerId)); mVoInstallation.setInst_device_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceLocalId)); mVoInstallation.setInst_device_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDevicName)); mVoInstallation.setInst_device_warranty_status(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceWarranty_status)); mVoInstallation.setInst_device_type_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceTypeName)); mVoInstallation.setInst_help_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallHelpNo)); mVoInstallation.setInst_date_time(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTime)); mVoInstallation.setInst_latitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLatitude)); mVoInstallation.setInst_longitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLongitude)); mVoInstallation.setInst_country_code(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryCode)); mVoInstallation.setInst_country_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryName)); mVoInstallation.setInst_vessel_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselLocalId)); mVoInstallation.setInst_vessel_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselServerId)); mVoInstallation.setInst_vessel_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselName)); mVoInstallation.setInst_vessel_regi_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselRegNo)); mVoInstallation.setInst_power(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPower)); mVoInstallation.setInst_location(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocation)); mVoInstallation.setInst_owner_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerName)); mVoInstallation.setInst_owner_address(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerAddress)); mVoInstallation.setInst_owner_city(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerCity)); mVoInstallation.setInst_owner_state(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerState)); mVoInstallation.setInst_owner_zipcode(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerZipcode)); mVoInstallation.setInst_owner_email(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerEmail)); mVoInstallation.setInst_owner_mobile_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerMobileNo)); mVoInstallation.setInst_local_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalSignUrl)); mVoInstallation.setInst_server_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerSignUrl)); mVoInstallation.setInst_local_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalInstallerSignUrl)); mVoInstallation.setInst_server_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerInstallerSignUrl)); mVoInstallation.setInst_pdf_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPdfUrl)); mVoInstallation.setInst_created_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCreatedDate)); mVoInstallation.setInst_updated_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUpdatedDate)); mVoInstallation.setInst_is_sync(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallIsSync)); mVoInstallation.setIs_install(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallStatus)); mVoInstallation.setInst_date_timestamp(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTimeStamp)); mArrayListInstallations.add(mVoInstallation); } } // Collections.sort(mArrayListTreatmentLists, new Comparator<TreatmentList>() { // @Override // public int compare(TreatmentList s1, TreatmentList s2) { // return s1.getTreatment_title().compareToIgnoreCase(s1.getTreatment_title()); // } // }); } catch (Exception e) { e.printStackTrace(); } LinearLayoutManager mLayoutManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); mInstallationAdapter = new InstallationAdapter(); mRecyclerViewInstallation.setLayoutManager(mLayoutManager); mRecyclerViewInstallation.setAdapter(mInstallationAdapter); mInstallationAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() { @Override public void onChanged() { super.onChanged(); checkAdapterIsEmpty(); } }); checkAdapterIsEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<NetBarDeployEntity> getUnDeployInfos() {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.is_deploy= :isDeploy \");\n\t\tparameters.put(\"isDeploy\", \"1\");\n\t\t\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}", "public List<Installation> getDownLoadCheckedData(Installation install,List<Integer> idList, User user) throws Exception {\r\n List<Installation> installationList = new ArrayList<Installation>();\r\n\r\n try {\r\n init();\r\n\r\n // Start UOC\r\n \r\n InstallationDao installationDao = new InstallationDao(conn);\r\n \r\n StringBuffer strBuf = new StringBuffer(\"\");\r\n int installIdSize = idList.size();\r\n if(installIdSize == 1){\r\n Integer installId = idList.get(0);\r\n strBuf.append(\" AND A.ID =\"+installId+\"\");\r\n }else{\r\n for(int k=0 ;k<installIdSize;k++){\r\n if(k == 0){\r\n strBuf.append(\" AND A.ID IN (\"+idList.get(k));\r\n }else if(k == installIdSize-1){\r\n strBuf.append(\",\"+idList.get(k)+\")\");\r\n }else{\r\n strBuf.append(\",\"+idList.get(k));\r\n } \r\n }\r\n }\r\n \r\n installationList = installationDao.serchUseStatusChecked(install,strBuf.toString(), user);\r\n int count = installationList.size();\r\n if (count == 0) {\r\n errors.add(\"BSE01707\");\r\n } \r\n \r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n\r\n return installationList;\r\n }", "public List<PlatformInstall> getInstallers () {\n return filter(getAllInstallers(),PlatformInstall.class);\n }", "java.util.List<com.clarifai.grpc.api.InstalledModuleVersion> \n getInstalledModuleVersionsList();", "public void dontWantToInstall() {\n\t\tpackageList.removeAll(packageList);\n\t}", "@Override\n public NSISInstallation[] getInstallations() {\n return Jenkins.getInstance().getDescriptorByType(NSIS.DescriptorImpl.class).getInstallations();\n }", "public List<Installation> getDownLoadData(Installation install, User user, int countSize) throws Exception {\r\n List<Installation> installationList = new ArrayList<Installation>();\r\n\r\n try {\r\n init();\r\n\r\n // Start UOC\r\n int count = 0;\r\n InstallationDao installationDao = new InstallationDao(conn);\r\n count = installationDao.getInstallationCount(install, user);\r\n if (count == 0) {\r\n errors.add(\"BSE01707\");\r\n } else {\r\n if (count < countSize) {\r\n countSize = count;\r\n }\r\n installationList = installationDao.serchUseStatus(install, user, 0, countSize);\r\n }\r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n\r\n return installationList;\r\n }", "@Override\n public Collection selectInstallationTO() {\n \n Connection conn = null;\n PreparedStatement stmt;\n ResultSet rs;\n Collection insList = null;\n InstallationTO p;\n \n try{ \n conn = SQLServerDAOFactory.createConnection();\n stmt = conn.prepareStatement(\"SELECT * FROM Instalaciones\");\n rs = stmt.executeQuery();\n \n insList = new ArrayList();\n \n while(rs.next()){\n p = new InstallationTO(rs.getString(\"nombre\"), rs.getInt(\"capacidad\"), rs.getString(\"direccion\"));\n insList.add(p);\n }\n } \n catch(SQLException e){\n System.out.println(\"Message: \" + e.getMessage() + \"\\n\" + \"Code: \" + e.getErrorCode());\n }\n finally{\n if(conn != null){\n try{\n conn.close();\n }\n catch(SQLException e){\n System.out.println(\"Message: \" + e.getMessage() + \"\\n\" + \"Code: \" + e.getErrorCode());\n }\n }\n }\n \n return insList;\n }", "public List<Installment> getReturnInstallments() {\n return returnInstallments;\n }", "public List updaters() {\n return updaters; }", "public java.util.List<java.lang.String> getDisallowUninstallApps() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: cm.android.mdm.manager.PackageManager2.getDisallowUninstallApps():java.util.List<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.getDisallowUninstallApps():java.util.List<java.lang.String>\");\n }", "public List<UserdemandsBean> getNewUnsolveDemands() {\n\t\treturn dao.getNewUnsolveDemands();\n\t}", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "private ArrayList<String> getNuclideLibraryListFromLscMdb() {\n\t\tArrayList<String> alNuclideLibraryList = new ArrayList<String>();\n\t\ttry {\n\t\t\tString query = \"select Nuclide\"\n\t\t\t\t\t+ \" from NuclideLibraryNuclides where LibraryFile = ?;\";\n\t\t\tPreparedStatement ps = lscConnection.getInstance().getConnection()\n\t\t\t\t\t.prepareStatement(query);\n\t\t\tps.setString(1, nuclidesLibrary);\n\t\t\tps.execute();\n\t\t\tResultSet rs = ps.getResultSet();\n\t\t\tString nuclide;\n\t\t\twhile (rs.next()) {\n\t\t\t\tnuclide = rs.getString(\"Nuclide\");\n\t\t\t\talNuclideLibraryList.add(nuclide);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.out.println(\"getNuclideLibraryList error\");\n\t\t}\n\t\treturn alNuclideLibraryList;\n\t}", "public List<Installment> getLoanInstallments() {\n return loanInstallments;\n }", "public Collection<String> getNamesOfPackagesInstalled() {\n\teval(\"cellfun(@(x) x.name, pkg('list'), 'UniformOutput', false);\");\n\treturn getStringCellFromAns();\n }", "Collection<String> getVersions();", "@Override\n\tpublic List getSysListBySQL() {\n\t\treturn jsysListKeyDao.getSysListBySQL();\n\t}", "List<String> getPendingSql();", "public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }", "java.util.List<com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.Package> \n getFHPackagesList();", "@Override\n\t\tprotected void onPostExecute(List<AppEntry> result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (result == null || result.size() == 0) {\n\t\t\t\ticonTitleSort.setVisibility(View.GONE);\n\t\t\t\tmoreUninstallBtn.setEnabled(false);\n\t\t\t\tmoreUninstallBtn.setText(getString(R.string.unstallmush));\n\t\t\t\tshowNoResultView();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ticonTitleSort.setVisibility(View.GONE);\n\t\t\tloading.setVisibility(View.GONE);\n\t\t\tmApps.clear();\n\t\t\tCollections.sort(result, ALPHA_COMPARATOR);\n\t\t\tmApps.addAll(result);\n\t\t\tfor (int i = 0; i < mApps.size(); i++) {\n\t\t\ttry {\n\t\t\t\tqueryPacakgeSize(mApps.get(i).mInfo.packageName);\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t\t}catch(Exception e)\n\t\t\t{}\n\t\t\t\n\t\t\tmAdapter.notifyDataSetChanged();\n\n\t\t}", "public String[] listarInstitutos();", "public java.lang.String getAppNoListResult() {\r\n return localAppNoListResult;\r\n }", "public String listSync() throws IOException {\n\t\treturn listSync(null, null, null, null);\n\t}", "int getVendorListVersion();", "public Installments getInstallments() {\n return installments;\n }", "com.clarifai.grpc.api.InstalledModuleVersion getInstalledModuleVersions(int index);", "public List<String> getVersionList() {\r\n return versionList;\r\n }", "List<ProductInfo> findUpAll();", "public ArrayList<Unconfirmed> getUnconfirmedList() {\r\n\t\tunconfirmedList=new ArrayList<Unconfirmed>();\r\n\t\t\r\n\t\tConnection conn = null;\r\n\t\tCallableStatement coll = null;\r\n\t\ttry {\r\n\t\t\t//query database for the information\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\t//calling the stored procedure which returns a cursor to the data\t\t\t\r\n\t\t\t//PROCEDURE GET_UNCONFIRMED(v_cursor_unconfirmed OUT CURSOR_IF);\r\n\t\t\tcoll = conn.prepareCall(\"{call PCBVI.PKG_TESTRECORDS.GET_UNCONFIRMED(?,?)}\");\r\n\t\t\t//prepare input and output arguments \t\r\n\t\t\tcoll.setString(1, formData.getWorkstationNr());\r\n\t\t\tcoll.registerOutParameter(2, OracleTypes.CURSOR);\r\n\t\t\t\r\n\t\t\tcoll.execute();\r\n\t\t\t//get cursor\r\n\t\t\tResultSet rs = (ResultSet) coll.getObject(2);\r\n\t\t\t//and process data\t\t\t\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t/*System.out.println(\t rs.getString(1)+'\\t'\r\n\t\t\t\t\t\t\t\t\t+rs.getString(2)+'\\t'\r\n\t\t\t\t\t\t\t\t\t+rs.getString(3)); \r\n\t\t\t\t*/\r\n\t\t\t\t\r\n\t\t\t\t// add the values\r\n\t\t\t\tUnconfirmed unconfirmed=new Unconfirmed();\r\n\t\t\t\t\r\n\t\t\t\tunconfirmed.setPoNo(rs.getString(1));\r\n\t\t\t\tunconfirmed.setWorkstationNr(rs.getString(2));\r\n\t\t\t\tunconfirmed.setWorkstationDescription(rs.getString(3));\t\t\t\t\r\n\t\t\t\tunconfirmed.setSide(rs.getString(4));\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tunconfirmedList.add(unconfirmed);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (coll != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcoll.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\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\treturn unconfirmedList;\r\n\t}", "java.util.List<WorldUps.UDeliveryLocation> \n getPackagesList();", "java.util.List<WorldUps.UQuery> \n getQueriesList();", "java.util.List<WorldUps.UInitTruck> \n getTrucksList();", "private List<ConnectionSetup> createDetachedSnapshotOfCollection() {\n return Collections.unmodifiableList(new ArrayList<ConnectionSetup>(setups));\n }", "public void onUninstalled() {\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "void unsetNumberOfInstallments();", "@Override\n\tpublic ArrayList<PowerUp> getRunningModePowerUps(String username) {\n\t\treturn null;\n\t}", "public static void askDownloadExistingApps(final Activity activity, final ArrayList<ObjectDetail> missing) {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity);\n\n alertDialogBuilder.setTitle(activity.getString(R.string.restore_apps_title));\n\n String msg = String.format(activity.getString(R.string.restore_apps_msg), missing.size());\n alertDialogBuilder\n .setMessage(msg)\n .setCancelable(false)\n .setNeutralButton(activity.getResources().getString(R.string.restore_disable_syncs), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //disable syncs\n Utils.setSyncDisabled(activity, true);\n //TODO - note this leaves apps in a weird state. Will show apps as local to device but no option\n //to install, etc...\n }\n })\n .setNegativeButton(activity.getResources().getString(R.string.restore_no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n GCESync.startActionUpdateLocal(activity, null, null);\n }\n })\n .setPositiveButton(activity.getResources().getString(R.string.restore_yes), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //build the install list...\n ArrayList<String> apklist = new ArrayList<String>();\n for (int i=0; i < missing.size(); i++) {\n apklist.add(missing.get(i).pkg);\n }\n //let the updates go through\n GCESync.startActionUpdateLocal(activity, null, null);\n //and kick off the batch install\n confirmBatchOperation(activity, apklist, true);\n }\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "public List<Installation> serchInstPlaceType() {\r\n List<Installation> list = new ArrayList<Installation>();\r\n try {\r\n init();\r\n\r\n // Start UOC\r\n InstPlaceTypeDao dao = new InstPlaceTypeDao(conn);\r\n list = dao.getTypeList();\r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n return list;\r\n }", "public List<User_apps> getUserAppsList() {\n\t\treturn Arrays.asList(conf.getUser_apps());\n\t}", "public List<HL7InArchive> getHL7InArchivesToMigrate();", "public void initial_list_sync(){\n \tFile file = new File(sync_directory_conf);\n \tif(file.exists()){\n \t\tArrayList<String> sync_directory_list = new ArrayList<String>();\n sync_directory_list = read_from_file.readFromFile(sync_directory_conf);\n text_sync_directory_path.setText(sync_directory_list.get(0));\n \t}else{\n \t\treturn;\n \t}\n \t\t\n }", "public static ListBoxModel doFillHubVersionDistItems() {\n final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();\n final boolean changed = false;\n final ListBoxModel items = new ListBoxModel();\n try {\n // should get this list from the Hub server, ticket HUB-1610\n for (final DistributionEnum distribution : DistributionEnum.values()) {\n if (distribution != DistributionEnum.UNKNOWNDISTRIBUTION) {\n items.add(distribution.getDisplayValue(), distribution.name());\n }\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n } finally {\n if (changed) {\n Thread.currentThread().setContextClassLoader(originalClassLoader);\n }\n }\n return items;\n }", "public ArrayList<String> fetchUIDs(){\n\t\tArrayList<String> UIDs = new ArrayList<String>();\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM users\");\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tUIDs.add(rs.getString(1));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(e.getMessage());\n\t\t}\n\t\treturn UIDs;\n\t}", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "public Observable<List<AppDetail>> getAllInstalledApps() {\n return ObservableUtils.from(() -> {\n Intent i = new Intent(Intent.ACTION_MAIN, null);\n i.addCategory(Intent.CATEGORY_LAUNCHER);\n Context context = AppPreferences.getApplicationContext();\n PackageManager manager = context.getPackageManager();\n List<ResolveInfo> availableActivities = manager.queryIntentActivities(i, 0);\n List<AppDetail> apps = new ArrayList<>();\n IconFinder finder = new IconFinder(context);\n for (ResolveInfo ri : availableActivities) {\n AppDetail app = getAppDetail(ri, manager, finder);\n apps.add(app);\n }\n Collections.sort(apps, APP_DETAIL_COMPARATOR);\n return apps;\n });\n }", "private ArrayList<PInfo> getInstalledApps(boolean getSysPackages) {\n\t\tArrayList<PInfo> res = new ArrayList<PInfo>(); \n\t\tList<PackageInfo> packs = getPackageManager().getInstalledPackages(0);\n\t\tfor(int i=0;i<packs.size();i++) {\n\t\t\tPackageInfo p = packs.get(i);\n\t\t\tif ((!getSysPackages) && isSystemPackage(p)) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tPInfo newInfo = new PInfo();\n\t\t\tnewInfo.appname = p.applicationInfo.loadLabel(getPackageManager()).toString();\n\t\t\tnewInfo.pname = p.packageName;\n\t\t\tnewInfo.versionName = p.versionName;\n\t\t\tnewInfo.versionCode = p.versionCode;\n\t\t\tnewInfo.icon = p.applicationInfo.loadIcon(getPackageManager());\n\t\t\tnewInfo.toOpen = getPackageManager().getLaunchIntentForPackage(p.packageName);\n\t\t\tres.add(newInfo);\n\t\t\t\n\t\t}\n\t\treturn res; \n\t}", "public java.util.List<String> getVersions() {\n if (versions == null) {\n versions = new java.util.ArrayList<String>();\n }\n return versions;\n }", "public abstract String [] listDatabases();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "public List<UserdemandsBean> getNewGraduateUnsolveDemands() {\n\t\treturn dao.getNewGraduateUnsolveDemands();\n\t}", "private List<AppDetails> getAppDetailsFromDatabase() {\r\n SQLiteAccessLayer sqLiteAccessLayer = new SQLiteAccessLayer(this);\r\n List<AppDetails> appDetailsList = new ArrayList<>();\r\n PackageManager packageManager = getPackageManager();\r\n\r\n if (sqLiteAccessLayer.isDatabaseEmpty()) { // database empty\r\n List<PackageInfo> installedApps = RawAppInfo.getAllInstalledApps(this);\r\n List<ResolveInfo> systemApps = RawAppInfo.getSystemApps(this);\r\n\r\n for (PackageInfo packageInfo : installedApps) {\r\n AppDetails appDetails = new AppDetails(\r\n packageInfo.applicationInfo.uid,\r\n packageInfo.applicationInfo.packageName,\r\n String.valueOf(packageInfo.applicationInfo.loadLabel(packageManager)),\r\n RawAppInfo.INSTALLED_APP\r\n );\r\n\r\n SQLiteAccessLayer sqLiteAccessLayerForInsert = new SQLiteAccessLayer(this, appDetails);\r\n sqLiteAccessLayerForInsert.insertIntoAppDetails();\r\n appDetailsList.add(appDetails);\r\n }\r\n for (ResolveInfo resolveInfo : systemApps) {\r\n ApplicationInfo applicationInfo = resolveInfo.activityInfo.applicationInfo;\r\n AppDetails appDetails = new AppDetails(\r\n applicationInfo.uid, //uid\r\n applicationInfo.packageName, //packagename\r\n String.valueOf(applicationInfo.loadLabel(packageManager)), // applicationName\r\n RawAppInfo.SYSTEM_APP //applicationType\r\n );\r\n SQLiteAccessLayer sqLiteAccessLayerForInsert = new SQLiteAccessLayer(this, appDetails);\r\n sqLiteAccessLayerForInsert.insertIntoAppDetails();\r\n appDetailsList.add(appDetails);\r\n }\r\n } else {\r\n appDetailsList = new ArrayList<>(new SQLiteAccessLayer(this).queryAppDetails());\r\n }\r\n sqLiteAccessLayer.closeDatabaseConnection();\r\n return appDetailsList;\r\n }", "public List<Installation> serchUseStatus(Installation install, User user, int currPage, int pageSize)\r\n throws Exception {\r\n List<Installation> installationList = new ArrayList<Installation>();\r\n\r\n try {\r\n init();\r\n\r\n // Start UOC\r\n InstallationDao installationDao = new InstallationDao(conn);\r\n int intBegin;\r\n int intEnd;\r\n\r\n if (currPage <= 1) {\r\n intBegin = 0;\r\n intEnd = pageSize;\r\n } else {\r\n intBegin = (currPage - 1) * pageSize;\r\n intEnd = intBegin + pageSize;\r\n }\r\n installationList = installationDao.serchUseStatus(install, user, intBegin, intEnd);\r\n\r\n // End UOC\r\n\r\n } catch (Exception e) {\r\n handleException(e);\r\n } finally {\r\n finish();\r\n }\r\n\r\n return installationList;\r\n }", "public int getInstalledBundles();", "public List<Database> getImplementedDatabases() {\r\n return implementedDatabases;\r\n }", "public List<Module> unloadedButAvailableModules() {\n \t\tArrayList<Module> returned = new ArrayList<Module>();\n \t\treturned.addAll(_availableModules);\n \t\tfor (Enumeration<FlexoModule> e = loadedModules(); e.hasMoreElements();) {\n \t\t\treturned.remove(e.nextElement().getModule());\n \t\t}\n \t\treturn returned;\n \t}", "@Override\n\tpublic String[] soupList() throws RemoteException {\n\t\tString[] list=dao.getSoups();\n\t\treturn list;\n\n\t}", "public List<String> getDatabaseList() throws SQLException {\n List<String> databaseList = new ArrayList<>();\n ResultSet databases = databaseStatement.executeQuery(\"SELECT datname FROM pg_database;\");\n while (databases.next()) {\n databaseList.add(databases.getString(\"datname\"));\n }\n return databaseList;\n }", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public <O> List<O> inactiveVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allInactive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().collect(Collectors.toList());\n }", "protected void getApps(){\n DBPermissions db =new DBPermissions();\n this.apps=db.getApps();\n db.close();\n }", "public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }", "@Override\n\tpublic List<Historic_siteVO> josunlist(Criteria cri) throws Exception {\n\t\treturn dao.josunlist(cri);\n\t}", "public List<Installment> getFactoringInstallments() {\n return factoringInstallments;\n }", "public Collection<String> getNotifyList() {\n Set<String> result;\n String list = getDbProperties().getProperty(Constants.NOTIFY_LIST);\n if (list != null) {\n result = Arrays.stream(list.split(\"[, ]+\"))\n .map(String::trim)\n .collect(Collectors.toSet());\n } else {\n result = new HashSet<>();\n }\n return result;\n }", "public List getDriverAbsentList() throws Exception ;", "java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> \n getBackupsList();", "private ArrayList<PInfo> getPackages() {\n\t\tArrayList<PInfo> apps = getInstalledApps(false); /* false = no system packages */\n\t\tfinal int max = apps.size();\n\t\tfor (int i=0; i<max; i++) {\n\t\t\tapps.get(i).getIcon();\n\t\t}\n\t\treturn apps;\n\t}", "int getInstalledModuleVersionsCount();", "List<String> getSystemPackages();", "public Gateway getListGateway(String mac) {\n\t\tString jpql = \"select p from Gateway p inner join fetch p.bundlerInstalled\";\n\t\tTypedQuery<Gateway> query = entityManager.createQuery(jpql, Gateway.class);\n\t\tquery.setParameter(\"mac\", mac);\n\t\tGateway gtw = query.getSingleResult();\n\t\ttry {\n\t\t\treturn gtw;\n\t\t} catch (NoResultException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public List<DatastreamVersion> listChangedDatastreams();", "List<String> generateDeleteAllScript();", "private List<String> listPolicyExemptAppsUnchecked() {\n String[] core = mContext.getResources().getStringArray(R.array.policy_exempt_apps);\n String[] vendor = mContext.getResources().getStringArray(R.array.vendor_policy_exempt_apps);\n\n int size = core.length + vendor.length;\n Set<String> apps = new ArraySet<>(size);\n for (String app : core) {\n apps.add(app);\n }\n for (String app : vendor) {\n apps.add(app);\n }\n\n return new ArrayList<>(apps);\n }", "public List<Option> _obtainAllNonAvailableOptions() {\n\t\tCursor cursor = activity.getContentResolver().query(\n\t\t\t\tOptionDAO.QUERY_NON_AVAILABLE_OPTIONS_URI, null, null, null,null);\n\t\tArrayList<Option> lstResult = OptionDAO.createObjects(cursor);\n\t\tcursor.close();\n\t\treturn lstResult;\n\t}", "java.util.List<com.google.cloud.functions.v2.SecretVolume.SecretVersion> getVersionsList();", "public List<String> getAllProcessNamesFromDatabase() \r\n throws ServiceFailureException;", "void updateList(List<PackageInfo> apps);", "java.util.List<yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.Database> \n getDatabasesList();", "public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}", "public void populateUserListFromDatabase() {\n\t\tList<com.expensetracker.model.User> modelUserList = null;\n\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : Populating user list cache..\");\n\t\ttry {\n\t\t\tmodelUserList = Service.getService().getUserList();\n\t\t\tList<User> list = ConvertUtil.modelToPojo(modelUserList);\n\t\t\tif (list != null) {\n\t\t\t\tuserList.addAll(list);\n\t\t\t\tpopulateUserMap(list);\n\t\t\t} else {\n\t\t\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : No data received from database for populating userlist cache\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : Error in getting list of users from database for populating userlist cache \"\n\t\t\t\t\t+ e);\n\t\t}\n\t}", "public static void clearAppList() {\n }", "public String[] getDatabaseCleanScripts() throws AdaFrameworkException {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> scriptsList = new ArrayList<String>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString[] existingTables = getTables();\r\n\t\t\tif (existingTables != null && existingTables.length > 0) {\r\n\t\t\t\tif (processedTables != null && processedTables.size() > 0) {\r\n\t\t\t\t\tfor(String databaseTable : existingTables) {\r\n\t\t\t\t\t\tboolean tableFound = false;\r\n\t\t\t\t\t\tfor (String modelTable : processedTables) {\r\n\t\t\t\t\t\t\tif (databaseTable.trim().toLowerCase().equals(modelTable.trim().toLowerCase())) {\r\n\t\t\t\t\t\t\t\ttableFound = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!tableFound) {\r\n\t\t\t\t\t\t\tif (!databaseTable.contains(DataUtils.DATABASE_LINKED_TABLE_NAME_PREFIX)) {\r\n\t\t\t\t\t\t\t\tscriptsList.add(String.format(DataUtils.DATABASE_DROP_TABLE_PATTERN, databaseTable));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (scriptsList.size() > 0) {\r\n\t\t\t\treturnedValue = scriptsList.toArray(new String[scriptsList.size()]);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tExceptionsHelper.manageException(e);\r\n\t\t} finally {\r\n\t\t\tscriptsList.clear();\r\n\t\t\tscriptsList = null;\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "java.util.List<? extends com.clarifai.grpc.api.InstalledModuleVersionOrBuilder> \n getInstalledModuleVersionsOrBuilderList();", "public List<MigrationType> getPrimaryMigrationTypes();", "@Override\r\n\tpublic List<HomePack> queryNotOilList(Date start, Date end,\r\n\t\t\tList<String> station) {\n\t\tList<HomePack> list = homePageDao.queryNotOilList(start, end, station);\r\n\t\treturn list;\r\n\t}", "public static ArrayList<ArrayList<String>> getFullWaitlist() {\r\n con = DBConnection.getConnection();\r\n waitlist.clear();\r\n try {\r\n PreparedStatement getAll = con.prepareStatement(\"Select * from Waitlist order by DATE, TIMESTAMP\");\r\n ResultSet res = getAll.executeQuery();\r\n\r\n WaitlistQueries.getArrayListResult(res);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return waitlist;\r\n }", "public List<String> getUserTables() {\n\t\ttry (Connection con = getReadOnlyConnection()) {\n\t\t\treturn dbFacade.getUserTables(con);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public StrColumn getSoftwareList() {\n return delegate.getColumn(\"software_list\", DelegatingStrColumn::new);\n }", "public ArrayList<String> getUnlockedHouses() {\n\t\treturn unlocked_houses;\n\t}", "@Transactional\n @Query(\"SELECT e FROM #{#entityName} e WHERE e.deleteFlag=true\")\n public List<AdHoc> recycleBin();", "private List<String> needRefresh(){\n\t\treturn null;\n\t}", "List<String> apiVersions();", "Collection<ComponentState> getVersions();", "List<JModuleInfo> queryAll();", "public List<Bundler> getListBundler() {\n\t\treturn BundlerInfo.listBundler;\n\t}" ]
[ "0.63496554", "0.60443133", "0.56733525", "0.5520845", "0.55037606", "0.5500534", "0.5482811", "0.5387915", "0.534477", "0.53225696", "0.5284606", "0.52517605", "0.5188074", "0.5174684", "0.51680475", "0.51233196", "0.5122404", "0.5102768", "0.5095201", "0.5060205", "0.50593525", "0.50479275", "0.5029992", "0.50165045", "0.50130063", "0.4983855", "0.49829346", "0.49818292", "0.49536788", "0.49480495", "0.49414608", "0.49360856", "0.49337256", "0.4929948", "0.49233192", "0.48878014", "0.4887381", "0.48857015", "0.48695716", "0.48676372", "0.4861765", "0.4850239", "0.48425427", "0.48347616", "0.48334774", "0.4824965", "0.48233342", "0.48224983", "0.48217955", "0.48217005", "0.48135978", "0.48015285", "0.4793164", "0.47925887", "0.47916993", "0.47890788", "0.4785094", "0.47762042", "0.47666505", "0.47662959", "0.476555", "0.47625238", "0.47610143", "0.4754957", "0.47540557", "0.47489488", "0.4736706", "0.47317463", "0.47281244", "0.47227675", "0.47146553", "0.47042665", "0.47014108", "0.4688014", "0.46868825", "0.46868134", "0.46801418", "0.46784446", "0.4665448", "0.46645802", "0.46618414", "0.46523243", "0.4649246", "0.46481213", "0.46453017", "0.4639797", "0.463837", "0.4635921", "0.4620784", "0.46175957", "0.46139386", "0.46129477", "0.4612618", "0.4609773", "0.4604065", "0.46020094", "0.45988104", "0.458614", "0.45858997", "0.45829302" ]
0.69836074
0
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Enter 5 numbers in ascenorder order for example 1 2 3"); Scanner san = new Scanner(System.in); int num= san.nextInt(); int arr[]= new int[num]; System.out.println("now enters the "+num+" numbers"); System.out.println(arr.length); for(int i=0; i<arr.length; i++) arr[i]=san.nextInt(); for(int i=0; i<arr.length; i++) { if(i+1<arr.length && arr[i]>arr[i+1]) { System.out.println(arr[i]+ " is bigger than the "+arr[i+1]+" numbers must be in ascending order"); return; } } for(int a:arr) System.out.print(a+" "); }
{ "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
array where the elements of type T will be stored Constructor of ListDA that initializes the newly created object it assigns the initial properties of object
public ListDA() { elements = new Object[CAPACITY]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TDrawingConstructor (ArrayList interpretation){\r\n fInterpretation=interpretation;\r\n}", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public Hylle(int size) {\n a = (T[]) new Object[size];\n this.size = size;\n }", "public GenericDynamicArray() {this(11);}", "@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "ArrayADT() {\n this.size = 10;\n this.base = createArrayInstance(this.size);\n this.length = 0;\n }", "public MyArray() {\n this.length = 10;\n this.array = (T[]) Array.newInstance(MyArray.class, length);\n this.size = 0;\n }", "GenericExample_04(T[] nos) {\r\n\t\tthis.nos = nos;\r\n\t}", "protected MyAbstractList(E[] objects) {\n for (int i = 0; i < objects.length; i++)\n add(objects[i]);\n }", "public GTUIterator(GTUContainer <T> object,Class<T[]> classtype){\r\n position=0;\r\n sizeArr=object.size();\r\n itrArr=classtype.cast(Array.newInstance(classtype.getComponentType(),sizeArr));\r\n for(int i=0;i<object.size();i++) {\r\n itrArr[i]= (T)object.getArrayElement(i);\r\n }\r\n }", "public ArrayList(Object[] e){\n this();\n for(Object i : e){\n this.add((T)i);\n }\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public TempList(T... all) {\n list = new ArrayList<T>(all.length);\n for (int i = 0; i < all.length; i++)\n list.add(all[i]);\n }", "protected MyAbstractClass(E[] objects) //contructor\n{\nfor(int i = 0; i < objects.length; i++)\nadd(objects[i]);\n}", "public abstract void init(ArrayList<String> ary);", "public Tuple(Object... objects){\n pattern =objects;\n size=objects.length;\n }", "GenericExample_004(T[] nos) {\r\n\t\tthis.nos = nos;\r\n\t}", "public List()\n {\n list = new Object [10];\n }", "public TiraList() {\n this.list = new Object[8];\n this.nextindex = 0;\n this.startIndex = 0;\n }", "public static NewArrayExpression newArrayInit(Class type, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public Tuple(TupleDesc td) {\n\t\t\tfields = new ArrayList<Field>();\n\t\t\ttupleDesc = td;\n\t\t\n\t\t// some code goes here\n\t\t// 2- assign td and initialize the array of fields\n\n\t}", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "public TLongArray() {\n\t}", "public DynArrayList() {\n data =(E[]) new Object[CAPACITY];\n }", "public ListsElements( T[] expected)\n {\n this( expected, null);\n }", "public void inicialisation(){\r\n\t\t\r\n\t\tgoods = new AutoParts[0];\r\n\t\tclient = new Client[0];\r\n\t\t\r\n\t\tshop = new Shopping[0];\r\n\t\tsale = new Sale[0];\r\n\t\ttransaction = new Document[0];\r\n\t\t\r\n\t\tbalancesAutoParts = new BalancesAutoParts[0];\r\n\t\t\r\n\t\tprices = new Prices[0];\r\n\t\t\r\n\t\tagriment = new Agreement[0];\r\n\t\t\r\n\t}", "public MyArrayList() {\n data = new Object[10];\n }", "public MyArrayList(int length) {\n data = new Object[length];\n }", "public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }", "@SafeVarargs\n public Array(T... items)\n {\n this.array = items;\n this.next = items.length;\n }", "public TempList() {\n list = new ArrayList<T>();\n }", "public static NewArrayExpression newArrayInit(Class type, Expression[] expressions) { throw Extensions.todo(); }", "public MyArrayList() {\n mMyArray = new Comparable[10];\n size = 10;\n head = tail = size / 3;\n }", "@Override\n public Object[] createRow() {\n ObjectDescriptor.TypeObject newTypeObjectInstance = ObjectDescriptor.newInstance();\n List<PropertyDescriptor> descriptors = typeObjectDescriptor.getObjectProperties();\n InitValuesFiller.fill(newTypeObjectInstance, descriptors);\n\n return new Object[]{ StringUtils.EMPTY, newTypeObjectInstance };\n }", "void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }", "private RubyArray(Ruby runtime, RubyClass klass, int length) {\n super(runtime, klass);\n values = new IRubyObject[length];\n }", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "public Tuple(List<Term> elts) {\n\t\tTerm[] tmp = new Term[elts.size()];\n\t\tthis.elts = elts.toArray(tmp);\n\t}", "public TriangleObject (double[][][] t) {\n\tfor (double[][] i: t) {\n Triangle in = new Triangle(i);\n\t\ttriangles.add(in); //You need to instantiate a new triangle to satsify this ^^\n\t}\n }", "protected TypeTreeIterator (T [] types){\n cursor = 0;\n typearray = types;\n }", "public Tuple() {\n this(new ArrayList<Object>());\n }", "public GenericDynamicArray(int initialCapacity) {\n if (initialCapacity < 0) throw new IllegalArgumentException(\"Illegal array size: \" + initialCapacity);\n this.capacity = initialCapacity;\n genericArrayList = (T[]) new Object[initialCapacity];\n }", "public ArrayTaskList() {\n\t\tcount = 0;\n\t\tmassTask = new Task[10];\n\t}", "private static String [] init(String className, TypeTree tree) {\n // Use a Linked to avoid resizing.\n Collection<String> types = new LinkedList<String>();\n String [] typearray;\n\t if (className.equals(EntryRep.matchAnyClassName())) {\n\t\t// handle \"match any\" specially\" -- search from ROOT\n\t\t// Simplification suggested by \n\t\t// Lutz Birkhahn <[email protected]>\n\t\tclassName = ROOT;\n\t } else {\n\t\t// add this class\n\t\ttypes.add(className);\n\t }\n\n\t // add all subclasses\n\t walkTree(tree.classSet(className), types, tree);\n\n\t // Convert it to an array and then randomize\n\t typearray = types.toArray(new String[types.size()]);\n\t int randnum = 0;\n\t String tmpobj = null;\n int length = typearray.length;\n\t for (int i = 0; i < length; i++) {\n\t\trandnum = numgen.nextInt(length - i);\n\t\ttmpobj = typearray[i];\n\t\ttypearray[i] = typearray[randnum];\n\t\ttypearray[randnum] = tmpobj;\n\t }\n return typearray;\n\t}", "public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayIndexList() {\n\t\tself.A = ( E[] ) new Object[ self.capacity ];\t\t\t\t\t// compiler may warn but this is okay\n\t}", "public FancyArray(Object[] arr) {\r\n\t\t/*\r\n\t\t * Statt eines Konstruktors der Oberklasse kann ich auch\r\n\t\t * einen anderen Konstruktor der Klasse selbst aufrufen!\r\n\t\t * \r\n\t\t * Auch dazu benutzen wir das Schlüsselwort this,\r\n\t\t * so rufen wir den parameterlosen Konstruktor auf -\r\n\t\t * so kann ich auch Konstruktoren der gleichen Klasse verketten\r\n\t\t */\r\n\t\tthis();\r\n\t\t//nach dem Aufruf wird dieser Konstruktor weiter ausgeführt:\r\n\t\taddAll(arr);\r\n\t}", "public static void initializeClassAttributes() {\n\t\tAboraSupport.findAboraClass(IntegerVarArray.class).setAttributes( new Set().add(\"CONCRETE\").add(\"PSEUDOCOPY\"));\n\t}", "public <T> void createArray(T sample){\n ArrayList<T> list = new ArrayList<T>();\n list.add(sample);\n }", "public CirArrayList() {\n // todo: default constructor\n head = tail = curSize = 0;\n data = (E[])new Object[10];\n }", "OrderedIntList ()\r\n\t{\r\n\t\tarray = new int[10];\r\n\t}", "LLVMValueRef createTableArray(CodeGenEnv env){\n var type = tableType();\n var tb = LLVMAddGlobal(env.module, type, \"VT_\" + class_.name.str);\n var pointers = new PointerPointer<LLVMValueRef>( members.size() );\n int j = 0;\n for (var i:members){\n var v = i.funRef;\n // convert to char *\n var v2 = LLVMConstBitCast(v, env.char_star);\n pointers.put(j, v2);\n j += 1;\n }\n var const_arr = LLVMConstArray(CodeGenEnv.char_star, pointers , members.size());\n LLVMSetInitializer(tb, const_arr);\n return tb;\n }", "public MyArrayList()\n\t{\n\t\tmyArray = new Object[StartSize];\n\t}", "private void initList() {\n\n }", "PropertyArray() {\n this.myArrayList = new ArrayList<>();\n }", "public ArrayADT() \r\n\t{\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}", "public LISTry(int[] arr, int teta) {\n this.arr = arr;\n this.teta = teta;\n this.n = arr.length;\n this.help = new int[n];\n this.mat = new int[n][];\n this.numOfAll = -1;\n this.length = -1;\n }", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "public Object[] getConstructorArgs ();", "public GenericContainer(T t){\n obj = t;\n }", "private Labels(ArrayMixedObject array) {\n\t\tthis.array = array != null ? array : new ArrayMixedObject();\n\t}", "static void initRuntimeConstructors(ITermFactory tf) {\n CFGNode.initializeConstructor(tf);\n ICFGNode.Kind.initializeConstructor(tf);\n Set.initializeConstructor(tf);\n Map.initializeConstructor(tf);\n EmptyMapOrSet.initializeConstructor(tf);\n Name.initializeConstructor(tf);\n FullSetLattice.ISetImplementation.initializeConstructor(tf);\n TermIndex.initializeConstructor(tf);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[INIT_SIZE];\n\t}", "public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }", "public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }", "public void setUp() {\n rec = new Record[5];\n rec[3] = new Record((short) 9, (short) 9);\n test1 = new LList();\n }", "public ListState(DartObjectImpl[] elements) {\n this.elements = elements;\n }", "public T(Object o){\r\n\t\tl = o;\r\n\t}", "private static AbstractList construct(LinkedList arg) {\n if (arg.isEmpty())\n return new EmptyList();\n else {\n Object fst = arg.pollFirst();\n //FIXME: The stupid bug in Gson.\n if (fst instanceof Double) fst = ((Double) fst).intValue();\n return new Cons(fst, construct(arg));\n }\n }", "private void init() {\n Method m = getAsListMethod();\r\n Class< ? > c = Object[].class;\r\n branchMethods.put( c, m );\r\n // Treat Map as an Entry set\r\n c = Map.class;\r\n m = getEntrySetMethod();\r\n branchMethods.put( c, m );\r\n // Make an Entry a List\r\n c = Entry.class;\r\n m = getEntryToListMethod();\r\n branchMethods.put( c, m );\r\n // Make a Pair a List\r\n c = Pair.class;\r\n m = getPairToListMethod();\r\n branchMethods.put( c, m );\r\n// c = Iterable.class;\r\n// m = null;\r\n// branchMethods.put( c, m );\r\n }", "private RubyArray(Ruby runtime, long length) {\n super(runtime, runtime.getArray());\n checkLength(length);\n values = new IRubyObject[(int)length];\n }", "public OrderedSuperArray(){\n\tsuper();\n }", "public static void main(String args[]){\n featureBase Engine = new featureEngine(\"Engine!\",\n \"This is an engine test!\", 356.99,1.0, 24.5,1000.0);\n\n featureBase Wheels = new featureWheels(\"Wheels\",\n \"This is a wheels test!\", 359.9,1.0,\"Somber\", 21.0);\n\n featureBase Color = new featureColor(\"Test part!\",\n \"This is a test part cool huh?\",364.99,1.0,\"Stylish\");\n\n //Constructing a new nodeArray\n nodeArray test = new nodeArray();\n\n //inserting the objects into the array (Duplicate to test the LLL as well)\n test.insert(Wheels);\n test.insert(Engine);\n test.insert(Color);\n\n System.out.print(test.display());\n }", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public MutableArray(Object[] paramArrayOfObject, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 180 */ this.sqlType = paramInt;\n/* 181 */ this.old_factory = paramCustomDatumFactory;\n/* 182 */ this.isNChar = false;\n/* */ \n/* 184 */ setObjectArray(paramArrayOfObject);\n/* */ }", "public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }", "public abstract DataType<T> newInstance();", "public S()\n {\n // inizializzazione dell'array\n v = new Object[CAPACITY];\n\n // inizializzazione dei buckets\n for (int i = 0; i < v.length; i++)\n v[i] = new ListNode();\n \n // inizializzazione del numero di elementi\n size = 0;\n }", "public Molt(){\n molt=new ArrayList<>();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}", "public static void arrayCreation() {\n int[] arr = new int[3];\n // as we are using new operator and that is how we create objects hence arrays\n // are called objects\n // every array in java is an object\n System.out.println(arr.getClass()\n .getSimpleName()); // int[]\n System.out.println(arr.getClass()\n .getName()); // [I\n\n int[] a1 = new int[3];\n int[][] a2 = new int[3][3];\n double[] a3 = new double[3];\n short[] a4 = new short[3];\n byte[] a5 = new byte[3];\n boolean[] a6 = new boolean[3];\n long[] a7 = new long[3];\n float[] a8 = new float[3];\n Integer[] a9 = new Integer[3];\n\n System.out.println(a1.getClass()\n .getName()); // [I\n System.out.println(a2.getClass()\n .getName()); // [[I\n System.out.println(a3.getClass()\n .getName()); // [D\n System.out.println(a4.getClass()\n .getName()); // [S\n System.out.println(a5.getClass()\n .getName()); // [B\n System.out.println(a6.getClass()\n .getName()); // [Z\n System.out.println(a7.getClass()\n .getName()); // [J\n System.out.println(a8.getClass()\n .getName()); // [F\n System.out.println(a9.getClass()\n .getName()); // [Ljava.lang.Integer;\n\n // at the time of the array initialization we should compulsory specify the size\n // new int[3] we should specify the size else it will lead to compilation error\n\n // It is legal to have size zero in java\n int[] a = new int[0];\n System.out.println(a);\n\n }", "private FplList() {\n\t\tshape = new FplValue[0][];\n\t}", "ListType createListType();", "@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }", "public JdbTree(Object [] value) {\r\n super(value);\r\n commonInit();\r\n }", "public ToDoList2AL()\n {\n\tcompleted = new ArrayList<Task>();\n\ttoDo = new ArrayList<Task>();\n }", "MotifLearner(){\n notes = new ArrayList<>();\n times = new ArrayList<>();\n }", "DataList createDataList();", "List constructors();", "public static void main(String[] args) {\n for(int i=0; i<10; i++){\n Constructor c=new Constructor (i);\n c.Constructor(\"Who\");\n \n } \n }", "public MutableArray(ARRAY paramARRAY, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 155 */ this.length = -1;\n/* 156 */ this.elements = null;\n/* 157 */ this.datums = null;\n/* 158 */ this.pickled = paramARRAY;\n/* 159 */ this.pickledCorrect = true;\n/* 160 */ this.sqlType = paramInt;\n/* 161 */ this.old_factory = paramCustomDatumFactory;\n/* 162 */ this.isNChar = false;\n/* */ }", "public Tuple(Object... values) {\n data = Arrays.copyOf(values, values.length);\n }", "private void __sep__Constructors__() {}", "Array createArray();", "public ArrayList() {\n _size = 0;\n _store = (E[]) new Object[32];\n }" ]
[ "0.6581004", "0.64886093", "0.63938284", "0.6203847", "0.61232513", "0.6113902", "0.606928", "0.6039715", "0.6036068", "0.6007881", "0.600683", "0.59968406", "0.598651", "0.5958311", "0.5958311", "0.59501976", "0.59306514", "0.58945197", "0.58779037", "0.58669096", "0.58380276", "0.5796041", "0.5794797", "0.57703626", "0.57571596", "0.5749743", "0.57392013", "0.5727692", "0.5720447", "0.57035655", "0.56966966", "0.5689134", "0.5677273", "0.56617254", "0.5654762", "0.56515014", "0.5643335", "0.56333673", "0.5615912", "0.5611734", "0.56109977", "0.5589211", "0.5587862", "0.5587781", "0.5575738", "0.5572692", "0.5566922", "0.5556978", "0.55520505", "0.5532497", "0.55286455", "0.55260634", "0.5522248", "0.55154234", "0.54942775", "0.5483334", "0.54811037", "0.54800856", "0.5476145", "0.54732215", "0.5452514", "0.54480004", "0.5439025", "0.54389954", "0.54348356", "0.54228604", "0.5422611", "0.5408998", "0.540263", "0.54016346", "0.5391824", "0.53916407", "0.53832847", "0.53799695", "0.5379548", "0.53725296", "0.53649014", "0.5355534", "0.5345731", "0.53435504", "0.53403777", "0.53340894", "0.53272593", "0.5325556", "0.53229076", "0.532066", "0.5320169", "0.5319265", "0.53186893", "0.5312107", "0.5309559", "0.53056055", "0.53049713", "0.5281817", "0.5281747", "0.5271664", "0.52711576", "0.52695876", "0.52602315", "0.525545" ]
0.59343076
16
method isEmpty() checks if the list is empty and returns true if size is equal 0 false in other cases Time Complexity is O(1) constant
public boolean isEmpty() { return size() == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "public /*@ pure @*/ boolean isEmpty() {\n return the_list == null;\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean isEmpty()\n\t{\n if (list.isEmpty())\n {\n return true;\n } \n else\n {\n return false;\n }\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty(){ return size==0;}", "public synchronized boolean isEmpty(){\n return list.isEmpty();\n }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty()\n {\n return size == 0;\n }", "public boolean isEmpty() {\n \t return size == 0;\n }", "public boolean isEmpty() {\r\n\t\treturn al.listSize == 0;\r\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "public boolean isEmpty() {\r\n return size == 0; \r\n }", "private boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty(){\r\n if(size == 0){\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isEmpty() {\n return size == 0;\n}", "public boolean isEmpty(){\n return size == 0;\n }", "private boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\r\n if(size()==0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty()\n {\n return size == 0;\n }", "public boolean isEmpty() \n\t {\n\t\t return (size()==0);\n\t }", "public boolean isEmpty(){\n return size == 0;\n }", "public boolean isEmpty(){\n return size == 0;\n }", "public static boolean empty() {\n\n if (list.size() != 0){\n return false;\n }\n return true;\n }", "public boolean isEmpty()\n {\n return size <= 0;\n }", "public boolean isEmpty() {\r\n \r\n return size == 0;\r\n }", "public boolean isEmpty() {\n if(size==0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isEmpty(){\n return size==0;\n }", "public boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n \treturn size == 0;\n }", "public boolean isEmpty(){\n return size==0;\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\n return list.isEmpty();\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public synchronized boolean isEmpty () {\n return list.isEmpty();\n }", "public boolean isEmpty() {\n if (size == 0){\n return true;\n }else{\n return false;\n }\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n \t\treturn size == 0;\n \n \t}", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public boolean empty() {\n\t\treturn list.size() == 0;\n\t}", "public boolean isEmpty() {\n return (size == 0);\n\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean isEmpty()\n {\n return ll.getSize()==0? true: false;\n }", "public boolean isEmpty(){\r\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\n return size <= 0;\n }", "public boolean isEmpty()\n {\n //this method is used to check length\n //replacing head == null so I don't have to maintain a head\n //also error checks for null lists\n return (entryList == null || (entryList.size() == 0));\n //just doing .size() == 0 will raise a null pointer exception on occasion\n }", "public boolean isEmpty() {\r\n if (size == 0) {\r\n return true;\r\n } \r\n return false;\r\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\n\tif (size==0) {\n\t return true;\n\t}\n\treturn false;\n }", "public boolean isEmpty(){\n\t\tboolean ans = false;\n\t\tif (_size == 0) ans = true;\n\t\treturn ans;\n\t}", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }", "public boolean isEmpty() {\n\t return size == 0;\n\t }", "public static boolean isEmpty(List list){\n\n if(list == null){\n return true;\n }\n if(list.size() == 0){\n return true;\n }\n return false;\n }", "boolean isEmpty(){\n\treturn size() == 0;\n }", "public boolean isEmpty(){\n return this.size()==0;\n }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty( )\r\n\t{\r\n\t\tif (this.size == 0)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n\t\tif (size == 0) return true;\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "public boolean empty() {\n if (list.size() == 0) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean isEmpty() {\n return (head == tail) && size == 0;//size==0时为空\n }", "public boolean isEmpty() {\r\n\t\treturn size==0;\r\n\t}", "@Override\n public boolean isEmpty() {\n return _size == 0;\n }", "public boolean isEmpty()\r\n {\r\n return (size() == 0);\r\n }", "@Override\n public boolean isEmpty()\n {\n return size == 0;\n }" ]
[ "0.8484456", "0.84531647", "0.8204503", "0.8200807", "0.8200138", "0.8179292", "0.816772", "0.816763", "0.8161713", "0.8161713", "0.8161713", "0.8156727", "0.8146723", "0.8125319", "0.8112198", "0.8109327", "0.8108806", "0.8104131", "0.8094264", "0.8092901", "0.809283", "0.8076787", "0.8073955", "0.8073955", "0.8073909", "0.80731845", "0.80664134", "0.80664134", "0.8066329", "0.8059437", "0.80535865", "0.8053344", "0.8028925", "0.802092", "0.80156964", "0.80059767", "0.8000319", "0.79968864", "0.79781544", "0.7973998", "0.7973733", "0.7973502", "0.7973502", "0.7973502", "0.7973502", "0.7973502", "0.7964247", "0.7948731", "0.79436815", "0.7932617", "0.7930191", "0.7927029", "0.7922656", "0.7907874", "0.7904309", "0.78937083", "0.7887576", "0.7887576", "0.7883554", "0.78812355", "0.78769827", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.78705305", "0.7854943", "0.78534245", "0.78503716", "0.7841863", "0.7823709", "0.7819135", "0.7818824", "0.7810327", "0.7808829", "0.7807273", "0.7803257", "0.7799492", "0.779462", "0.7794476", "0.7787797", "0.7787351", "0.7784299" ]
0.0
-1
method add(int i, T t) adds provided element t at position i firstly, it checks the potential overflow and whether the variable i is valid then, it shifts all elements by one slot and assigns element with index i to t finally, it returns the previous value of the first element Time Complexity is O(n) linear
public void add(int i, T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity size++; // increment size of list if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException for (int j = size - 1; j > i; j--) { // treat elements of list with indexes in range [i+1, n] elements[j] = elements[j - 1]; // element shifts to right } elements[i] = t; // store element at index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "void add(int index, T element);", "void add(int index, T element);", "public void add(T element, int pos);", "@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n size += 1;\n }", "public abstract void add(T element, int index);", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size + 1);\n if (size == data.length) // not enough capacity\n throw new IllegalStateException(\"Array is full\");\n for (int k = size - 1; k >= i; k--) // start by shifting rightmost\n data[k + 1] = data[k];\n data[i] = e; // ready to place the new element\n size++;\n }", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "void add(int i , E e) throws IndexOutOfBoundsException;", "void add(int i, E e) throws IndexOutOfBoundsException;", "public void add(E s,int index) {\t//O(n)\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\t//index is valid\r\n\t\t\t//checks if there is any space left in the array\r\n\t\t\tif(size>=capacity)\r\n\t\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\t\tfor (int k=size-1; k>=index;k--) {\t//shifting element\r\n\t\t\t\tlist[k+1]=list[k];\r\n\t\t\t}\r\n\t\t\tlist[index]=s;\t//add element to the index\r\n\t\t\tsize++;\t//increases size\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "@Override\n public void add(T element) throws Exception\n {\n \n if (!(element instanceof Comparable))\n {\n throw new Exception(\"Bad things happened\");\n }\n \n Comparable comparableElement = (Comparable) element;\n \n //expand array if full\n \n if (tail == myArray.length)\n {\n expandArray();\n }\n \n //search for correct spot\n int insertPosition;\n for (insertPosition = 0; insertPosition < tail && comparableElement.compareTo(myArray[insertPosition]) > 0; insertPosition++)\n {\n //empty on purpose\n }\n \n //shift elements over\n \n for (int i = tail; i > insertPosition; i--)\n {\n myArray[i] = myArray[i - 1];\n }\n \n //place the element\n \n myArray[insertPosition] = element;\n tail++;\n }", "public T set(int i, T t) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n T previousValue = (T) elements[i]; // store previous value of element with index i\n elements[i] = t; // set element with index i to t\n return previousValue; // return previous value of element with index i\n }", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "@Override\n public void add(int index, T element) {\n Object[] newArray = new Object[size + 1];\n for (int i = 0; i < index; i++) {\n newArray[i] = data[i];\n }\n newArray[index] = element;\n for (int i = index + 1; i < newArray.length; i++) {\n newArray[i] = data[i - 1];\n }\n data = newArray;\n size++;\n }", "@Override\n public void add(int index, E value) {\n // todo: Students must code\n ensureCapacity();\n int pos = calculate(index); // True position in array\n\n // if there are no elements, set head to the position (index 0, position ??)\n // *protects against divide by zero in modulus*\n if(size() == 0) {\n data[pos] = value;\n head = pos;\n tail = pos;\n // tail = (pos+1)%data.length;\n }\n // if the logical position is the head, then insert right before head and reassign head-variable\n // *tail stays the same*\n else if(index == 0) {\n int i = (head-1);\n if (i < 0) i = data.length-1;\n head = i;\n data[head] = value;\n }\n else{\n // shift all array contents after pos right 1\n for(int i = (pos + size() - index); i > pos; i--)\n data[i % data.length] = data[(i-1) % data.length];\n data[pos] = value;\n tail = (tail + 1) % data.length;\n }\n curSize++;\n }", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException,\n IllegalStateException {\n if (i == size){\n addLast(e);\n }\n else {\n validIndex(i);\n checkSize();\n for (int j = size - 1; j >= i; j--) {\n data[j + 1] = data[j];\n }\n data[i] = e;\n size++;\n }\n }", "public void addFirst(T element);", "@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "@Override\n public void add(int index, T t) {\n checkIfArrayFull();\n\n if(index >= arrayList.length) {\n System.out.println(\"The index is out of bounds for this list\");\n System.exit(-1);\n }\n\n Object ob = arrayList[index];\n arrayList[index] = t;\n\n Object ob2;\n\n /*The loop cycles through the array starting at index. ob2 is given the value of arrayList at i+1 position.\n The arrayList at i+1 position is assigned the value of ob. Then the ob variable is assigned the value of ob2. */\n for(int i = index; i < arrayList.length - 1; i++) {\n ob2 = arrayList[i+1];\n arrayList[i+1] = ob;\n ob = ob2;\n }\n\n elementsInArray++;\n }", "void add(T element);", "void add(T element);", "@Override\n public void add(final int index, final T element) {\n this.checkIndexToAdd(index);\n\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n for (int i = this.size; i > index; i--) {\n this.data[i] = this.data[i - 1];\n }\n\n this.data[index] = element;\n this.size++;\n }", "public T add(T element) {\n if(maxElements <= 0)\n return element;\n else if(reservoir.size() < maxElements) {\n reservoir.add(element);\n return null;\n }\n else {\n // Get a uniformly distributed int. If the chosen slot lives within the partition, replace the entry in that slot with the newest entry.\n int slot = GenomeAnalysisEngine.getRandomGenerator().nextInt(maxElements);\n if(slot >= 0 && slot < maxElements) {\n T displaced = reservoir.get(slot);\n reservoir.set(slot,element);\n return displaced;\n }\n else\n return element;\n }\n }", "public void addFirst(T item) {\n if (size == 0) {\n array[front] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n front--;\n this.updatePointer();\n array[front] = item;\n size++;\n }", "public void add(int element);", "public void addFirst(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n size += 1;\n }", "@Override\n public void addFirst(Item i) {\n resize();\n items[nextFirst] = i;\n size += 1;\n nextFirst = moveBack(nextFirst, 1);\n }", "public V addElement(T t) {\r\n\t\tNumber frequency = baseMap.get(t);\r\n\t\tif (frequency == null)\r\n\t\t\tbaseMap.put(t, (V) (Number) 1);\r\n\t\telse {\r\n\t\t\tfrequency = new BigInteger(frequency.toString()).add(new BigInteger(\"1\"));\r\n\t\t\tbaseMap.put(t, (V) frequency);\r\n\t\t}\r\n\t\treturn baseMap.get(t);\r\n\t}", "@Override\n // worst-case complexity: O(n), since it might need to resize itself\n // amortised average-case complexity: O(1), since resizing happens too\n // too infrequent to affect the actual complexity\n public void add(T item) {\n if (size >= arr.length)\n arr = resize(arr, EXPAND_FACTOR);\n // we add the item to the end and then increment the size\n arr[size++] = item;\n }", "@Override\n public boolean add(T t) {\n if (size >= 10) {\n data = new Object[(data.length * 3) / 2 + 1];\n data = Arrays.copyOfRange(data, 0, data.length);\n }\n data[size++] = t;\n return true;\n }", "public void insert(int i) {\n\t\tif (top > -2 && top < size - 1) {\n\t\t\ttop += 1;\n\t\t\tarr[top] = i;\n\t\t} else if (top == size - 1) {\n\t\t\tsize *= 2;\n\t\t\ttop += 1;\n\t\t\tarr = Arrays.copyOf(arr, size);\n\t\t\tarr[top] = i;\n\t\t}\n\t}", "private void testAddAtIndex(){\n System.out.println(\"------ TESTING : add(int index, int element) ------\");\n try{\n // The insertion will add values to the front\n // the sequence should be iSize-1....,1,0\n for(int i = 0; i < iSize ; i++){\n if(!iTestList.add(0,i))\n throw new RuntimeException(\"FAILED -> add(index,element) not working correctly\");\n }\n // we should test the out of edge cases\n // if we try the following code and the return value is true or if the\n // program crashes then there is a problem\n if(iTestList.add(iSize+10, 999 )){\n throw new RuntimeException(\"FAILED -> index should not be > SIZE\");\n }\n if(iTestList.add(-2,999 )){\n throw new RuntimeException(\"FAILED -> index should not be < 0\");\n }\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "private int minusOne(int i) {\n return (i - 1 + capacity) % capacity;\n }", "public int addValue(int i) {\n return foldIn(i);\n }", "@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }", "public void add(int index, Type t);", "public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }", "public void addFirst(T value){\n\tif (size == 1){\n\t data = new Object[5];\n\t size = 5;\n\t head = size / 2;\n\t tail = head + 1;\n\t hC = head;\n\t tC = tail;\n\t}\n\tif (((head-1 == tail || head == tail) && (data[head] != null && data[head-1] != null)) || (head == 0 && tail == size-1)){\n\t // System.out.println(\"need to resize first\");\n\t resize(size*2);\n\t}\n\tif (head == 0){\n\t head = size-1;\n\t if (data[head] == null || head-1 != tail){\n\t\tdata[head] = value;\n\t }\n\t}else{\n\t if (begin == true){\n\t\tdata[head] = value;\n\t\tbegin = false;\n\t }else{\n\t\tif (head-1 < size || data[head-1] == null){\n\t\t data[head-1] = value;\n\t\t head--;\n\t\t}\n\t }\n\t}\n\tnumElements++;\n }", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public void insert(T t) { \n int bucket = hash(t);\n Table.get(bucket).addLast(t);\n numElements++;\n }", "public void add(int index, E element);", "public void insert(Item item, int i){\n assert (count+1<=capacity);\n\n assert (i+1>=1&&i+1<=capacity);\n\n i+=1;\n\n data[i] = item;\n count++;\n\n indexes[count] = i;\n rev[i] = count;\n\n shiftUp(count);\n }", "@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }", "public void add (T element);", "abstract public E add(E t);", "public Node<T> addFirst(T t) { \r\n Node<T> currFirst = sentinel.next;\r\n Node<T> newNode = new Node<T>(t, sentinel, currFirst);\r\n sentinel.next = newNode;\r\n currFirst.prev = newNode;\r\n size++;\r\n return newNode; \r\n }", "public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }", "@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "public void insert(int index, T element);", "public void add(T element) {\r\n if (element == null) {\r\n throw new IllegalArgumentException(); \r\n } \r\n if (size == elements.length) { \r\n resize(elements.length * 2); \r\n }\r\n elements[size()] = element; \r\n size++; \r\n }", "public void add(T element);", "public void add(T element);", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException {\n if (i < 0 || i > size) {\n throw new IndexOutOfBoundsException();\n }\n\n if (size == 0) {\n storage = e;\n } else if (size < 5) {\n if (size == 1) {\n E oldStorage = (E) storage;\n storage = new Object[5];\n ((E[]) storage)[0] = oldStorage;\n }\n\n for (int cnt = size - 1; cnt >= i; cnt--) {\n ((E[]) storage)[cnt + 1] = ((E[]) storage)[cnt];\n }\n ((E[]) storage)[i] = e;\n } else {\n if (size == 5) {\n storage = new ArrayList<E>(Arrays.asList((E[]) storage));\n }\n ((ArrayList<E>) storage).add(i, e);\n }\n\n size++;\n }", "public void addFirst(E s) {// 0(1)\r\n\t\t//checks if there is any space left in the array\r\n\t\tif (size>=capacity)\r\n\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\tlist[size]=s;\t//adds element to the array\r\n\t\tsize++;\t//increases size\r\n\t}", "public void add(T element, int index) {\n int counter = 0;\n Node<T> newNode = new Node(element);\n Node<T> current = itsFirstNode;\n\t\tif (current == null) {\n\t\t\tthrow new NoSuchElementException(\"Beyond size of list or list empty\");\n\t\t}\n\t\twhile (current.getNextNode() != null ) {\n\t\t\tif ((counter == index - 1) || (index == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t\tcurrent = current.getNextNode();\n\t\t\tcounter++;\n\t\t}\n\t\ttry {\n\t\t\tif (index == 0) {\n\t\t\t\taddAsFirst(newNode);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewNode.setNextNode(current.getNextNode());\n\t\t\t\t(newNode.getNextNode()).setPriorNode(newNode);\n\t\t\t\tcurrent.setNextNode(newNode);\n\t\t\t\tnewNode.setPriorNode(current);\n\t\t\t}\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\t// NullPointer is fine\n\t\t}\n size++;\n }", "private void insert(int pos, T elem) {\n for (int i = size; i >= pos + 1; i--) {\n arr[i] = arr[i-1];\n }\n arr[pos] = elem;\n }", "public void add(T element) {\n if (size + 1 >= capacity) {\n if (capacity == 0) capacity = 1;\n else capacity *= 2; // double the array size\n T[] tempArrayList = (T[]) new Object[capacity];\n for (int i = 0; i < size; i++) tempArrayList[i] = genericArrayList[i];\n genericArrayList = tempArrayList; // genericArray has extra null at the end\n }\n genericArrayList[size++] = element;\n }", "public int insert(int data)\n {\n boolean inserted = false;\n int position;\n int currentValue;\n int moves = 0;\n resized = false;\n currentHash = 1;\n\n if(data == 0)\n return -1; // invalid value\n\n if(contains(data))\n return -1;\n\n // Check if threshold would be reached\n if((numElements+1.0)/(2.0*n) >= threshold)\n {\n resize();\n resized = true;\n }\n\n elements.add(data);\n\n while(!inserted)\n {\n position = doHash(data);\n currentValue = getArrayValue(position);\n if(currentValue == 0)\n {\n setArrayValue(position, data);\n inserted = true;\n numElements++;\n }\n else\n {\n setArrayValue(position,data);\n data = currentValue;\n switchHashAndArray();\n moves += 1;\n }\n if(moves >= chainLength)\n {\n resize();\n resized = true;\n moves = 0;\n }\n\n }\n\n return data;\n\n }", "@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }", "void add(int index, Object element);", "final void add(int elt) {\n if (contents == null)\n return;\n if (n == contents.length) {\n int[] new_contents = new int[2*n+1];\n //@ assert n < new_contents.length;\n arraycopy(contents, 0, new_contents, 0, n);\n contents = new_contents;\n }\n if (n < 0 || n >= contents.length) \n return;\n contents[n]=elt;\n n++;\n }", "private int plusOne(int index) {\n if (index + 1 >= array.length) {\n return 0;\n } else {\n return index + 1;\n }\n }", "void add(int idx, float incr);", "public abstract void add(T element);", "public abstract void add(T element);", "public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }", "public int addValue(byte i) {\n return foldIn(i);\n }", "public void insert(int i, T obj);", "void add (int value) {\n array[fillLength] = value;\n fillLength++;\n for (int i = fillLength - 1; i > 0; i--) {\n if (array[i - 1] > array[i]) {\n int tempHolder = array[i];\n array[i] = array[i - 1];\n array[i - 1] = tempHolder;\n } else {\n break;\n }\n }\n }", "boolean add(T element);", "boolean add(T element);", "public void push(T v) {\n if (used < values.length) {\n used += 1;\n }\n head = (head + 1) % values.length;\n values[head] = v;\n }", "public void add(int x, int y, int t, int v) {\n\t\tif (v < vArray[49]) {\n\t\t\treturn;\n\t\t}\n\t\t \t\n \t// find out the position\n \tint newIndex = indexOf(v);\n \t \t\n \t// shift arrays\n \tfor (int i = 49; i > newIndex; --i) {\n \t\txArray[i] = xArray[i - 1];\n \t\tyArray[i] = yArray[i - 1];\n \t\ttArray[i] = tArray[i - 1];\n \t\tvArray[i] = vArray[i - 1];\n \t}\n\n \t// put the new item in position\n \txArray[newIndex] = x;\n \tyArray[newIndex] = y;\n \ttArray[newIndex] = t;\n \tvArray[newIndex] = v;\n\t}", "@Override\n public boolean add(int index, T object) {\n T[] newArray;\n if (array[array.length - 1] != null) {\n newArray = (T[]) new Object[array.length * 2];\n } else {\n newArray = (T[]) new Object[array.length];\n }\n for (int i = 0; i < index; i++) {\n newArray[i] = array[i];\n\n }\n newArray[index] = object;\n for (int i = index + 1; i < array.length; i++) {\n newArray[i] = array[i - 1];\n }\n this.size++;\n this.array = newArray;\n return true;\n }", "@Override\n\tpublic void add(int idx, E element) {\n\t\tif (element == null)\n\t\t\tthrow new NullPointerException();\n\t\tif (idx < 0 || idx > size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t// Element is added to the end of the list\n\t\tif (idx == size)\n\t\t\tlist[idx] = element;\n\n\t\t// Element is added at the beginning or middle\n\t\telse {\n\t\t\tfor (int i = size; i > idx; i--) {\n\t\t\t\tlist[i] = list[i - 1];\n\t\t\t}\n\t\t\tlist[idx] = element;\n\t\t}\n\n\t\tsize++;\n\t\tif (size == list.length)\n\t\t\tgrowArray();\n\n\t}", "public void insert(int index,int value)\n {\n System.out.println(\"data size\"+data.length);\n if(size==initialCapacity){\n resize();\n }\n \n \n \n for(int j=size-1;j>=index;j--){\n //j initial position is last element\n // j needs to move till\n //start from last element and change to next position\n \n data[j+1]=data[j]; \n }\n// // Copy up\n// for (int j = size; j > index; j--) {\n// data[j] = data[j-1];\n// }\n data[index]=value;\n size++;\n }", "@Test\r\n\tpublic void testAddIntE() {\r\n\t\tassertEquals(0, ll.size());\r\n\t\tassertTrue(ll.isEmpty());\r\n\r\n\t\t// valid additions\r\n\t\tll.add(0, t3);\r\n\t\tassertEquals(1, ll.size());\r\n\t\tll.add(0, t2);\r\n\t\tassertEquals(2, ll.size());\r\n\t\tll.add(2, t4);\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertFalse(ll.isEmpty());\r\n\r\n\t\t// invalid additions\r\n\t\ttry {\r\n\t\t\tll.add(-1, t1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(4, t5);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, t3);\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, null);\r\n\t\t\tfail();\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t}", "public void add(T element){\r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n // If array is full, double the size\r\n if (size == elements.length) {\r\n resize(elements.length * 2);\r\n }\r\n \r\n elements[size] = element;\r\n size++;\r\n }", "@Override\n public void addFirst(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[head] = value;\n size++;\n return;\n }\n\n head--;\n if (head == -1) {\n head = dequeue.length - 1;\n }\n dequeue[head] = value;\n size++;\n\n if (size == dequeue.length) {\n widen();\n }\n\n }", "Position<T> addFirst(T data);", "public int addIfNotExist(T x) {\n boolean insert = false;\n if (needRebuild) {\n rebuildSqrt();\n }\n for (int j = 0; j < numberOfBlocks; ++j) {\n if (size != 0 && dataInBegin[j] != null && comparator.compare((T) dataInBegin[j], x) > 0) {\n if (j == 0) {\n for (int k = endOfBlock[0]; k > 0; k--) {\n data[k] = data[k - 1];\n }\n data[0] = x;\n dataInBegin[0] = x;\n endOfBlock[0]++;\n insert = true;\n size++;\n if (endOfBlock[0] == (len << 1)) {\n needRebuild = true;\n }\n return 0;\n }\n for (int k = (len * (j - 1) << 1); k < endOfBlock[j - 1]; k++)\n if (comparator.compare((T) data[k], x) > 0) {\n for (int l = endOfBlock[j - 1]; l > k; l--) {\n data[l] = data[l - 1];\n }\n data[k] = x;\n endOfBlock[j - 1]++;\n insert = true;\n size++;\n if (endOfBlock[j - 1] == (len * j << 1)) needRebuild = true;\n return k;\n } else if (comparator.compare((T) data[k], x) == 0) {\n return -(k + 1);\n }\n if (!insert) {\n data[endOfBlock[j - 1]] = x;\n insert = true;\n endOfBlock[j - 1]++;\n size++;\n if (endOfBlock[j - 1] == (len * j << 1)) {\n needRebuild = true;\n }\n return endOfBlock[j - 1] - 1;\n }\n }\n }\n if (!insert) {\n for (int j = (len * (numberOfBlocks - 1) << 1); j < endOfBlock[numberOfBlocks - 1]; ++j)\n if (data[j] != null && comparator.compare((T)data[j], x) > 0) {\n for (int l = endOfBlock[numberOfBlocks - 1]; l > j; l--) {\n data[l] = data[l - 1];\n }\n data[j] = x;\n if (j == ((len * (numberOfBlocks - 1)) << 1)) dataInBegin[numberOfBlocks - 1] = x;\n insert = true;\n endOfBlock[numberOfBlocks - 1]++;\n size++;\n if (endOfBlock[numberOfBlocks - 1] == (len * numberOfBlocks << 1)) needRebuild = true;\n return j;\n } else if (comparator.compare((T)data[j], x) == 0) {\n return -(j + 1);\n }\n if (!insert) {\n size++;\n if (endOfBlock[numberOfBlocks - 1] == (len * (numberOfBlocks - 1) << 1))\n dataInBegin[numberOfBlocks - 1] = x;\n data[endOfBlock[numberOfBlocks - 1]] = x;\n endOfBlock[numberOfBlocks - 1]++;\n if (endOfBlock[numberOfBlocks - 1] == (len * numberOfBlocks << 1)) needRebuild = true;\n return endOfBlock[numberOfBlocks - 1] - 1;\n }\n }\n return NO_ELEMENT;\n }", "@Override\n public boolean add(T item) {\n // if the last spot in the array is unoccupied, item is simply added to the first empty spot\n if (arr[arr.length-1]!=null) {\n arr[size + 1] = item;\n size++;\n }\n // if array is full, number of spots is doubled and item is added\n if (arr[arr.length-1]== null){\n grow();\n arr[size+1] = item;\n size++;\n }\n return true;\n }", "public void push_front(T element);", "@Override\n public E peek(int i) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n return array[(front + i) % capacity()];\n }", "static int addOne(int[] a, int offset, int mlen, int carry) {\n offset = a.length-1-mlen-offset;\n long t = (a[offset] & LONG_MASK) + (carry & LONG_MASK);\n\n a[offset] = (int)t;\n if ((t >>> 32) == 0)\n return 0;\n while (--mlen >= 0) {\n if (--offset < 0) { // Carry out of number\n return 1;\n } else {\n a[offset]++;\n if (a[offset] != 0)\n return 0;\n }\n }\n return 1;\n }", "public int addValue(short i) {\n return foldIn(i);\n }", "public void add( int item ) \n {\n\t//queue is empty\n\tif ( queue.isEmpty() ) {\n\t queue.add( item );\n\t return;\n\t}\n\t\n\t//queue is not empty\n\telse {\n\t //find spot of insetion\n\t for ( int i = 0; i < queue.size(); i++ ) {\t\t\t \n\t\tif ( (int) queue.get(i) < item ) {\n\t\t queue.add( i, item );\n\t\t return;\n\t\t}\t\t\n\t }\n\t}\n }", "private static long makeQueueElement(int value, int index)\n {\n return index | (((long) value) << 32);\n }", "@Override\n public void addElement(T element) {\n // TODO. \n // Pseudocode: \n // Check if array is at capacity, if so expand it. \n // add element to the array\n // increment count\n // if this is not the first element, then call heapifyAdd to check if the newly added\n // element needs to be swapped up the heap\n if (count == heap.length) {\n expandCapacity();\n\n }\n heap[count] = element;\n count++;\n\n if (count > 1) {\n heapifyAdd();\n }\n\n }", "public void insertElement(int element) {\n // if within min and max and doesnt haveElement then add the int\n if (element < MAXSETVALUE && element > MINSETVALUE && hasElement(element) != true && get != null) {\n // replacement array\n int[] arr = new int[get.length + 1];\n // copying values up to last\n for (int j = 0; j < get.length; j++)\n arr[j] = get[j];\n // inserts element\n arr[get.length] = element;\n get = arr;\n // avoiding errors\n } else if (get == null) {\n get = new int[1];\n get[0] = element;\n }\n\n }", "@Override\n public void add(T element) {\n add(size(), element);\n }", "void pushFront(T value) throws ListException;", "@Override\n public void add(int i, Node<T> e)\n {\n if(i > size + 1) return; //to add node at the end of list use i = size + 1\n if(lastNode == null) //initialize lastNode\n {\n lastNode = e;\n updateFirstNode();\n size++;\n }\n \n //Adding node at the start\n else if(i <= 1)\n {\n if(lastNode.getNext() == null) // only 1 element in list\n e.setNext(lastNode); \n else \n e.setNext(lastNode.getNext());\n \n lastNode.setNext(e);\n updateFirstNode();\n size++; \n }\n \n //Adding node at the end or somewhere in the middle\n else\n {\n if(lastNode.getNext() == null && i == size + 1)\n {\n e.setNext(lastNode);\n lastNode.setNext(e);\n }\n \n //Iterates to i position and add node\n //if i position is last node then set node as new last node\n else\n {\n NodeIterator<T> iterator = new NodeIterator<>(firstNode, (i == size + 1)? i - 1 : i, 1);\n Node prev = iterator.getEnd();\n Node temp = prev.getNext();\n\n e.setNext(temp);\n prev.setNext(e);\n }\n \n //If adding node as last node\n if(i == size + 1) lastNode = e;\n updateFirstNode();\n size++;\n }\n }", "public void add(E val){\n if(structure.size() < capacity){\n structure.addLast(val);\n }\n else{\n structure.removeFirst();\n structure.addLast(val);\n }\n }", "void add(I i);", "public abstract void add(T input);" ]
[ "0.7226116", "0.66744506", "0.6585309", "0.6585309", "0.641812", "0.63830227", "0.6351532", "0.63183165", "0.63037795", "0.6270327", "0.624214", "0.62133384", "0.6165649", "0.6135962", "0.6133687", "0.60937", "0.6073367", "0.6036791", "0.5997537", "0.59776795", "0.59299904", "0.5929974", "0.59276307", "0.59276307", "0.5922871", "0.5869148", "0.58676237", "0.5840899", "0.58260274", "0.5821092", "0.5819194", "0.58139855", "0.57941574", "0.5780861", "0.577622", "0.5757114", "0.5751638", "0.5748707", "0.574183", "0.5717015", "0.5699954", "0.5695702", "0.5671874", "0.56706", "0.5667371", "0.56607497", "0.5659196", "0.56335294", "0.5630032", "0.5630022", "0.5620675", "0.5607959", "0.5576953", "0.5574228", "0.55671155", "0.55671155", "0.552717", "0.5526163", "0.55109954", "0.55103385", "0.55060416", "0.55032575", "0.5502416", "0.54959023", "0.54906076", "0.54834604", "0.5479545", "0.5477009", "0.5477009", "0.5474209", "0.54686743", "0.54542834", "0.54498047", "0.5443751", "0.5443751", "0.5441708", "0.5440346", "0.54329574", "0.54326445", "0.543161", "0.5422554", "0.5417301", "0.5416759", "0.5416421", "0.5411456", "0.540883", "0.53991103", "0.5396666", "0.5395032", "0.5383146", "0.53789", "0.5375719", "0.53718394", "0.53692186", "0.5356665", "0.5354249", "0.5349412", "0.53472227", "0.53415555", "0.5329532" ]
0.6856369
1
method addFirst(T t) adds element t to the start of the list firstly, it checks the potential overflow then it shifts all elements by one slot and assigns the first element of array to t finally, it returns the previous value of the first element Time Complexity is O(n) linear
public void addFirst(T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n] elements[j] = elements[j - 1]; // element shifts to right size++; // increment size elements[0] = t; // store element at index 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n size += 1;\n }", "public void addFirst(T value){\n\tif (size == 1){\n\t data = new Object[5];\n\t size = 5;\n\t head = size / 2;\n\t tail = head + 1;\n\t hC = head;\n\t tC = tail;\n\t}\n\tif (((head-1 == tail || head == tail) && (data[head] != null && data[head-1] != null)) || (head == 0 && tail == size-1)){\n\t // System.out.println(\"need to resize first\");\n\t resize(size*2);\n\t}\n\tif (head == 0){\n\t head = size-1;\n\t if (data[head] == null || head-1 != tail){\n\t\tdata[head] = value;\n\t }\n\t}else{\n\t if (begin == true){\n\t\tdata[head] = value;\n\t\tbegin = false;\n\t }else{\n\t\tif (head-1 < size || data[head-1] == null){\n\t\t data[head-1] = value;\n\t\t head--;\n\t\t}\n\t }\n\t}\n\tnumElements++;\n }", "public void addFirst(T item) {\n if (size == 0) {\n array[front] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n front--;\n this.updatePointer();\n array[front] = item;\n size++;\n }", "public void addFirst(T element);", "public Node<T> addFirst(T t) { \r\n Node<T> currFirst = sentinel.next;\r\n Node<T> newNode = new Node<T>(t, sentinel, currFirst);\r\n sentinel.next = newNode;\r\n currFirst.prev = newNode;\r\n size++;\r\n return newNode; \r\n }", "public void addFirst(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n size += 1;\n }", "public void addFirst(E s) {// 0(1)\r\n\t\t//checks if there is any space left in the array\r\n\t\tif (size>=capacity)\r\n\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\tlist[size]=s;\t//adds element to the array\r\n\t\tsize++;\t//increases size\r\n\t}", "@Override\n public void addFirst(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[head] = value;\n size++;\n return;\n }\n\n head--;\n if (head == -1) {\n head = dequeue.length - 1;\n }\n dequeue[head] = value;\n size++;\n\n if (size == dequeue.length) {\n widen();\n }\n\n }", "public void insertFirst(int val) {\r\n\t\tif(isFull()) return;\r\n\t\t// If we are inserting at front end for the first time, then make it point to front of the array, that is maxSize. i treated maxsize-1 index as front end\r\n\t\telse if(front==-1 || front ==0) front = maxSize-1;\r\n\t\t// else decrement the front pointer, maxSize is for dealing with negative values\r\n\t\telse front = (front+maxSize-1)%maxSize;\r\n\t\tarr[front] = val;\r\n\t}", "public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void addFirst(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> next = sentinel.next;\n\n node.next = next;\n next.prev = node;\n sentinel.next = node;\n node.prev = sentinel;\n\n size += 1;\n }", "Position<T> addFirst(T data);", "public void addFirst(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n newNode.next = front;\r\n front = newNode;\r\n }\r\n numElements++;\r\n }", "public void addFirst(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n \r\n if (size() == 0) {\r\n \r\n front = n;\r\n last = n;\r\n }\r\n \r\n else {\r\n n.next = front;\r\n front = n;\r\n }\r\n \r\n size++; \r\n }", "void pushFront(T value) throws ListException;", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "@Override\n public void addFirst(E e) throws IllegalStateException {\n checkSize();\n for (int j = size - 1; j >= 0; j--) {\n data[j + 1] = data[j];\n }\n data[0] = e;\n size++;\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "public void addFirst(E e) { // adds element e to the front of the list\n // TODO\n if (size == 0) {\n tail = new Node<>(e, null);\n tail.setNext(tail);\n } else {\n Node<E> newest = new Node<>(e, tail.getNext());\n tail.setNext(newest);\n }\n size++;\n }", "public void addFirst(E item);", "@Override\n public void addFirst(Item i) {\n resize();\n items[nextFirst] = i;\n size += 1;\n nextFirst = moveBack(nextFirst, 1);\n }", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public void push_front(T element);", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "@Override\n public int incrementFirstValue(int key) {\n return array.incrementEntry(key << 1, 1);\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "public void addFirst (E[] e) {\n\t\thead = new Node<>(e, head);\n\t\tif (size == 0) {\n\t\t\ttail = head;\n\t\t} else {\n\t\t\t// do nothing\n\t\t}\n\t\tsize = size + 1;\n\t}", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public void addFirst(Item item) {\n if (item != null) {\n if (size == 0) { // initiation for the first adding\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else { // normal front adding\n Node oldfirst = first;\n first = new Node();\n first.front = null;\n first.item = item;\n first.back = oldfirst;\n oldfirst.front = first;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "@Test (timeout = 44245500)\n\tpublic void testInsertFirstIsEmptySizeAndGetFirst1() {\n\t\tassertTrue(list.isEmpty());\n\t\tassertEquals(0,list.size());\n\t\tassertEquals(list,list.insertAt(0, \"Hello\"));\n\t\tassertFalse(list.isEmpty());\n\t\tassertEquals(1,list.size());\n\t\tassertEquals(\"Hello\",list.get(0));\n\t\tlist.insertAt(1, \"world\");\n\t\tassertEquals(\"world\",list.get(1));\n\t\tassertEquals(2, list.size());\n\t\tlist.insertAt(0, \"foo\");\n\t\tassertEquals(3,list.size());\n\t\tassertEquals(\"foo\", list.get(0));\n\t\tassertEquals(\"Hello\", list.get(1));\n\t\t\n\t\t\n\t}", "public void addFirst(Object value)\n {\n if(last == null && first == null)\n {\n ListNode temp = new ListNode(value, null);\n last = temp;\n first = temp;\n }\n else\n {\n first = new ListNode(value, first);\n }\n \n }", "public void addFirst(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(head.getNext());\n head.setNext(newNode);\n newNode.getNext().setPrevious(newNode);\n newNode.setPrevious(head); \n size++;\n }", "@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }", "private void linkFirst(final T element) {\r\n\t\tfinal int f = first;\r\n\t\tfinal int newNode = setFirstFree(element);\r\n\r\n\t\tsetNextPointer(newNode, f);\r\n\t\tsetPrevPointer(newNode, -1); // undefined\r\n\t\tfirst = newNode;\r\n\r\n\t\tif (f == -1) {\r\n\t\t\tlast = newNode;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(f, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "public void addFirst(T item) {\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, _front, null);\n\t _front.setNext(temp);\n\t _front = temp;\n\t}\n\t_size++;\n }", "public void addFirst(E x) {\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public void insertFirst(int data) { // insert at front of list\n\t\tNode newNode = new Node(data); // creation of new node.\n\t\tif (first == null) // means LinkedList is empty.\n\t\t\tlast = newNode; // newNode <--- last\n\t\telse\n\t\t\tfirst.previous = newNode; // newNode <-- old first\n\t\tnewNode.next = first; // newNode --> old first\n\t\tfirst = newNode; // first --> newNode\n\t}", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n if (oldFirst == null) {\n last = first;\n } else {\n oldFirst.previous = first;\n }\n size++;\n assert check();\n }", "T addAtHead(T t) {\n new Node<T>(t, this.next, this);\n return this.next.getData();\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void addToFront(T elem) {\n\t\tNode newNode = new Node();\n\t\tnewNode.value = elem;\n\t\tnewNode.next = first;\n\t\tfirst = newNode;\t\n\t}", "public void addFirst(E item){\r\n\r\n //checking the precondition\r\n\tif(item == null){\r\n\t\tthrow new IllegalArgumentException(\" item cannot equal null \");\r\n\t}\r\n\t\r\n\t//creating a new front of the list\r\n\tDoubleListNode<E> firstNode = new DoubleListNode<E>(end.getPrev(), item, null);\r\n\t\r\n\t//setting the front of the list to the head\r\n\tfirstNode.setNext(head);\r\n\t\r\n\t//setting the head to new first node\r\n\thead = firstNode;\r\n\t\r\n\t//setting the headData\r\n\theadData = head.getData();\r\n\t\r\n\r\n\r\n }", "public void addFirst(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> f = first;\n final Node<Item> newNode = new Node<>(null, item, f);\n first = newNode;\n if (f == null)\n last = newNode;\n else\n f.prev = newNode;\n size++;\n }", "T addAtHead(T t) {\n return header.addAtHead(t);\n }", "@Override\n public void add(T element) throws Exception\n {\n \n if (!(element instanceof Comparable))\n {\n throw new Exception(\"Bad things happened\");\n }\n \n Comparable comparableElement = (Comparable) element;\n \n //expand array if full\n \n if (tail == myArray.length)\n {\n expandArray();\n }\n \n //search for correct spot\n int insertPosition;\n for (insertPosition = 0; insertPosition < tail && comparableElement.compareTo(myArray[insertPosition]) > 0; insertPosition++)\n {\n //empty on purpose\n }\n \n //shift elements over\n \n for (int i = tail; i > insertPosition; i--)\n {\n myArray[i] = myArray[i - 1];\n }\n \n //place the element\n \n myArray[insertPosition] = element;\n tail++;\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public void addFirst(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldfirst = first;\n first = new Node(item);\n\n if (isEmpty()) {\n last = first;\n } else {\n oldfirst.prev = first;\n first.next = oldfirst;\n }\n size++;\n }", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "private int plusOne(int index) {\n if (index + 1 >= array.length) {\n return 0;\n } else {\n return index + 1;\n }\n }", "public PersistentLinkedList<T> addFirst(T data) {\n return add(0, data);\n }", "public T getMin()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn array[0];\n\t}", "public V addElement(T t) {\r\n\t\tNumber frequency = baseMap.get(t);\r\n\t\tif (frequency == null)\r\n\t\t\tbaseMap.put(t, (V) (Number) 1);\r\n\t\telse {\r\n\t\t\tfrequency = new BigInteger(frequency.toString()).add(new BigInteger(\"1\"));\r\n\t\t\tbaseMap.put(t, (V) frequency);\r\n\t\t}\r\n\t\treturn baseMap.get(t);\r\n\t}", "public void addFirst(E e){\n head = new Node(e, head);\n size++;\n }", "private void addAsFirst(LinkedList<T>.Node<T> elementZero) {\n\t\telementZero.setPriorNode(itsFirstNode.getPriorNode());\n\t\telementZero.setNextNode(itsFirstNode);\n\t\titsFirstNode.setPriorNode(elementZero);\n\t\titsFirstNode = elementZero;\n\t}", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public boolean insertFront(int value) {\n if (isFull()) {\n return false;\n }\n front = (front - 1 + k) % k;\n arr[front] = value;\n return true;\n\n }", "public void addFirst(Item x);", "private void insertFirst(T data){\n Node<T> node = new Node<T>(data);\n this.begin = node;\n this.end = node;\n }", "@Override\n public void add(int index, T t) {\n checkIfArrayFull();\n\n if(index >= arrayList.length) {\n System.out.println(\"The index is out of bounds for this list\");\n System.exit(-1);\n }\n\n Object ob = arrayList[index];\n arrayList[index] = t;\n\n Object ob2;\n\n /*The loop cycles through the array starting at index. ob2 is given the value of arrayList at i+1 position.\n The arrayList at i+1 position is assigned the value of ob. Then the ob variable is assigned the value of ob2. */\n for(int i = index; i < arrayList.length - 1; i++) {\n ob2 = arrayList[i+1];\n arrayList[i+1] = ob;\n ob = ob2;\n }\n\n elementsInArray++;\n }", "public void addFirst(Object element)\n {\n Node newNode = new Node();\n newNode.data = element;\n newNode.next = first;\n first = newNode; \n \n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addFirst() with a null argument\");\n }\n Node<Item> oldFirst = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFirst;\n if (isEmpty()) {\n last = first;\n }\n else {\n // first.prev = oldFirst;\n oldFirst.prev = first;\n }\n n++;\n }", "public int[] shitArrayValuesToFront(int[] arr){\n for(int i = 0; i < arr.length; i++){\n if(i == arr.length - 1){\n arr[i] = 0;\n }else{\n arr[i] = arr[i + 1];\n }\n }\n return arr;\n }", "@Override\n public boolean add(T t) {\n if (size >= 10) {\n data = new Object[(data.length * 3) / 2 + 1];\n data = Arrays.copyOfRange(data, 0, data.length);\n }\n data[size++] = t;\n return true;\n }", "public void addFirst(Item item) {\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n first = new Node<Item>();\n first.item = item;\n last = first;\n } else {\n Node<Item> oldFrist = first;\n first = new Node<Item>();\n first.item = item;\n first.next = oldFrist;\n oldFrist.prev = first;\n }\n N++;\n }\n }", "public void addFirst(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to beginning of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else {\n head.setPrev(n); //else, item is added to non-empty deque\n n.setNext(head);\n head = n;\n }\n size++; //increment deque size\n }", "@Test\n public void getFirst() {\n //getFirst and getLast are also relied on for the majority of this Junit.\n //if these are broken you can probably figure that out elsewhere\n String[] expect = new String[ArrayDeque.INITIAL_CAPACITY];\n //check first addFirst. should go to last index in arr\n expect[0] = \"a\";\n expect[1] = \"b\";\n expect[2] = \"c\";\n expect[3] = \"d\";\n expect[4] = \"e\";\n ard.addLast(\"a\");\n ard.addLast(\"b\");\n ard.addLast(\"c\");\n ard.addLast(\"d\");\n ard.addLast(\"e\");\n\n //getFirst and getLast are also relied on for the majority of this Junit.\n //if these are broken you can probably figure that out elsewhere\n assertEquals(\"a\", ard.getFirst());\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n ard.removeFirst();\n expect[0] = null;\n assertEquals(\"b\", ard.getFirst());\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n ard.addLast(\"after\");\n expect[5] = \"after\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n for (int i = 0; i < 5; i++) {\n ard.addLast(\"more after\");\n expect[6 + i] = \"more after\";\n }\n assertEquals(\"b\", ard.getFirst());\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n }", "public void addFirst(Object e) {\n if(head == null) {\n tail = head = new Node(e, null, null);\n return;\n }\n\n Node n = new Node(e, null, head);\n head.setPrevious(n);\n head = n;\n }", "public synchronized void addFirst(DoubleLinkedListNodeInt node) {\n\t\tnode.setNext(head.getNext());\n\t\tnode.setPrev(head);\n\t\tnode.getNext().setPrev(node);\n\t\thead.setNext(node);\n\t\tnode.setOwnerList(this);\n\t\tsize++;\n\t}", "private static int shiftLeftOneInPlace(int[] x, int carry)\n {\n int pos = x.length;\n while (--pos >= 0)\n {\n int val = x[pos];\n x[pos] = (val << 1) | carry;\n carry = val >>> 31;\n }\n return carry;\n }", "public void insert(long in) {\n\n int i = front;\n while (i >= 0 && arr[i] > in) {\n arr[i + 1] = arr[i];\n\n i--;\n }\n arr[++i] = in;\n\n front++;\n\n }", "public void addFirst(int value) {\n if (head == null) {\n head = new SinglyLinkedNode(value, null);\n }\n //case: one value\n else {\n SinglyLinkedNode previousHead = head;\n head = new SinglyLinkedNode(value, previousHead);\n }\n count += 1;\n }", "public void uncheckedPushFront(IClause c) {\n tab[front--] = c;\n if (front < 0)\n front = tab.length - 1;\n\n assert back + 1 != front\n && (front != 0 || back != tab.length - 1) : \"Deque is full !\";\n }", "public T add(T element) {\n if(maxElements <= 0)\n return element;\n else if(reservoir.size() < maxElements) {\n reservoir.add(element);\n return null;\n }\n else {\n // Get a uniformly distributed int. If the chosen slot lives within the partition, replace the entry in that slot with the newest entry.\n int slot = GenomeAnalysisEngine.getRandomGenerator().nextInt(maxElements);\n if(slot >= 0 && slot < maxElements) {\n T displaced = reservoir.get(slot);\n reservoir.set(slot,element);\n return displaced;\n }\n else\n return element;\n }\n }", "public void add(T element) {\n if (size + 1 >= capacity) {\n if (capacity == 0) capacity = 1;\n else capacity *= 2; // double the array size\n T[] tempArrayList = (T[]) new Object[capacity];\n for (int i = 0; i < size; i++) tempArrayList[i] = genericArrayList[i];\n genericArrayList = tempArrayList; // genericArray has extra null at the end\n }\n genericArrayList[size++] = element;\n }", "public void addLast(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n elements[size] = t; //store element at last position\n size++; // increment size\n }", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> firstEntry() {\n\t/* TCJ\n\t * Continuous operation: O(1)\n\t */\n\t\treturn safeEntry(0);\n\t}", "T first();", "@Override\n\tpublic void insertAtFirst(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tnewNode.setNext(head);\n\t\t\tthis.head = newNode;\n\t\t}\n\t\tlistSize++;\n\t}", "void add (int value) {\n array[fillLength] = value;\n fillLength++;\n for (int i = fillLength - 1; i > 0; i--) {\n if (array[i - 1] > array[i]) {\n int tempHolder = array[i];\n array[i] = array[i - 1];\n array[i - 1] = tempHolder;\n } else {\n break;\n }\n }\n }", "public void addFirst(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//Save old first node\n\t\t\tNode<Item> oldFirst = first;\n\t\t\t//assign first node to a new node\n\t\t\tfirst = new Node<Item>();\n\t\t\tfirst.item = item;\n\t\t\tfirst.prev = null;\n\t\t\tfirst.next = oldFirst;\n\t\t\t//link the old first to new first\n\t\t\t//if the first item to add\n\t\t\tif(oldFirst == null){\n\t\t\t\tlast = first;\n\t\t\t}else{\n\t\t\t\toldFirst.prev = first;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t}", "public void addFirst(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newFirst = new Node<Item>(item);\n newFirst.next = first;\n first.prev = newFirst;\n first = newFirst;\n }\n size++;\n }", "@Override\n public void add(E value) {\n if (value == null) {\n throw new NullPointerException();\n }\n if (size == capacity) {\n resize();\n }\n array[size] = value;\n siftUp(size);\n size++;\n\n\n }", "public boolean insertFront(int value) {\n if (head == tail && size == capacity)\n return false;\n else {\n head = (head + capacity - 1) % capacity;//由于head初始时为0,在最左侧,所以需要先找到双端队列\n //最右侧头端点:head的位置\n elementData[head] = value;//将当前插入的值赋值在head位置处\n size++;//元素个数++;\n return true;\n }\n\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public void addFirst(E e) {\n this.head = new Node<>(e, head);\t// create and link a new node\r\n if (this.size == 0)\r\n this.tail = this.head;\r\n this.size ++;\r\n }", "static Node addOne(Node head){\n Node currentNode = head;\n int carry = 1;\n Node previousNode = null;\n\n while(currentNode!=null){\n int newValue = currentNode.data + carry;\n currentNode.data = newValue%10;\n carry = newValue/10;\n previousNode = currentNode;\n currentNode = currentNode.next;\n }\n if(carry > 0){\n previousNode.next = new Node(carry);\n }\n return head;\n }", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }" ]
[ "0.7418026", "0.7169094", "0.69904983", "0.6944868", "0.6897272", "0.6730529", "0.6679956", "0.65874094", "0.62619203", "0.624443", "0.6221389", "0.61679506", "0.6157559", "0.6138255", "0.6128565", "0.6124398", "0.61029273", "0.60275346", "0.59924954", "0.5985898", "0.5895198", "0.5848405", "0.5828692", "0.58204246", "0.5789022", "0.577471", "0.57538766", "0.5753624", "0.57420623", "0.5737053", "0.5697083", "0.5688725", "0.5687301", "0.56864953", "0.5680106", "0.5662545", "0.5651415", "0.5644448", "0.56433153", "0.56379044", "0.5604938", "0.5599585", "0.55981195", "0.55882496", "0.5575315", "0.5560145", "0.5539785", "0.5534395", "0.55324954", "0.55162376", "0.5505552", "0.549237", "0.5476213", "0.54733896", "0.5469928", "0.54692745", "0.54582703", "0.54489356", "0.54453367", "0.54370034", "0.54326683", "0.5426971", "0.54213685", "0.5418439", "0.54170084", "0.53997475", "0.5387184", "0.536971", "0.53679883", "0.5360304", "0.53552", "0.5349684", "0.5349431", "0.5347392", "0.533642", "0.53347373", "0.5325092", "0.5324829", "0.5321298", "0.53177917", "0.5310878", "0.5308851", "0.5307464", "0.53053355", "0.5297691", "0.52971715", "0.5294181", "0.52894455", "0.5288041", "0.52872485", "0.5279678", "0.52763665", "0.5268501", "0.52680534", "0.52620476", "0.5259823", "0.52552414", "0.5246834", "0.52267927", "0.5222981" ]
0.8157629
0
method addLast(T t) adds element t to the end of the list firstly, it checks the potential overflow then it assigns the value of last element to t finally, it returns the previous value of the last element Time Complexity is O(n) linear
public void addLast(T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity elements[size] = t; //store element at last position size++; // increment size }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node<T> addLast(T t) { \r\n Node<T> currLast = sentinel.prev;\r\n Node<T> newNode = new Node<T>(t, currLast, sentinel);\r\n currLast.next = newNode;\r\n sentinel.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addLast(T element);", "@Override\n public void addLast(E value) {\n if (value == null) {\n throw new NullPointerException(\"Value can not be null\");\n }\n if (isEmpty()) {\n head = tail = 0;\n dequeue[tail] = value;\n size++;\n return;\n }\n tail = ++tail % dequeue.length;\n dequeue[tail] = value;\n size++;\n if (size == dequeue.length) {\n widen();\n }\n }", "@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void addLast(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> prev = sentinel.prev;\n\n node.prev = prev;\n prev.next = node;\n sentinel.prev = node;\n node.next = sentinel;\n\n size += 1;\n }", "public void addLast(E item);", "public void addLast(T element) {\r\n \r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n Node n = new Node(element);\r\n n.element = element;\r\n \r\n if (size == 0) {\r\n front = n;\r\n last = n;\r\n }\r\n \r\n else {\r\n last.next = n;\r\n last = n;\r\n }\r\n \r\n size++;\r\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "Position<T> addLast(T data);", "public void addLast(E item){\r\n }", "public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }", "public void addLast(Item x);", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "public void addLast(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n \r\n if (front == null)\r\n front = rear = newNode;\r\n else\r\n {\r\n rear.next = newNode;\r\n rear = newNode;\r\n }\r\n numElements++;\r\n }", "public void addLast(int data) //O(n)\n\t{\n\t\tSinglyLinkedListNode currentNode = head;\n\t\tif(head == null)\n\t\t{\n\t\t\taddFront(data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tif(currentNode.getNext() != null)\n\t\t\t\t{\n\t\t\t\t\tcurrentNode = currentNode.getNext();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSinglyLinkedListNode newNode = new SinglyLinkedListNode();\n\t\t\t\t\tcurrentNode.setNext(newNode);\n\t\t\t\t\tnewNode.setData(data);\n\t\t\t\t\tnewNode.setNext(null);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }", "public void addLast(E element){\n Node<E> newNode = new Node<E>(element);\n newNode.setNext(tail);\n tail.getPrevious().setNext(newNode);\n newNode.setPrevious(tail.getPrevious());\n tail.setPrevious(newNode);\n size++;\n }", "public void addLast(Item item){\r\n\t\tif (item == null) throw new NullPointerException();\r\n\t\tif (n == list.length){resize(2*list.length);}\r\n\t\tif(isEmpty()){prior=list.length-1;first=0;last=0;latter=0;}\r\n\t\tlist[latter++]=item;\r\n\t\t last=latter-1;\r\n\t\t if(latter==list.length){latter=0;}\r\n\t\t n++;}", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public void addLast(E e) { // adds element e to the end of the list\n // TODO\n addFirst(e);\n tail = tail.getNext();\n }", "public boolean insertLast(int value) {\n if(size == k) return false;\n DoublyLinkedList temp = new DoublyLinkedList(value);\n DoublyLinkedList curr = tail.prev;\n temp.next = tail;\n tail.prev = temp;\n curr.next = temp;\n temp.prev = curr;\n size += 1;\n return true;\n \n}", "public boolean insertLast(int value) {\n if (head == tail && size == capacity)\n return false;\n else {\n elementData[tail] = value;//由于tail初始时为0,在最左侧,即为双端队列\n //最左侧头端点:tail的位置;将value值插入进来后。\n tail = (tail + 1 + capacity) % capacity;//更新尾指针的指向指向前一个位置\n size++;\n return true;\n }\n }", "private void linkLast(final T element) {\r\n\t\tfinal int l = last;\r\n\t\tfinal int newNode = setFirstFree(element);\r\n\r\n\t\tsetNextPointer(newNode, -1); // undefined\r\n\t\tsetPrevPointer(newNode, l);\r\n\t\tlast = newNode;\r\n\r\n\t\tif (l == -1) {\r\n\t\t\tfirst = newNode;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(l, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "void pushBack(T value) throws ListException;", "T addAtTail(T t) {\n new Node<T>(t, this, this.prev);\n return this.next.getData();\n }", "public void addLast(TypeHere x) {\n if (size == items.length) {\n resize(size + 1);\n }\n items[size] = x;\n size += 1;\n }", "public synchronized void addLast(DoubleLinkedListNodeInt node) {\n\t\tnode.setNext(tail);\n\t\tnode.setPrev(tail.getPrev());\n\t\tnode.getPrev().setNext(node);\n\t\ttail.setPrev(node);\n\t\tnode.setOwnerList(this);\n\t\tsize++;\n\t}", "public PersistentLinkedList<T> addLast(T data) {\n return add(this.treeSize, data);\n }", "public void addLast(E e) {\n\r\n if(head == null){\r\n addFirst(e);\r\n } else {\r\n\r\n Node newNode = new Node(e);\r\n tail.setNext(newNode);\r\n tail = newNode;\r\n\r\n }\r\n\r\n }", "public void addLast(T listItem) {\n add(listItem);\n }", "private void naiveAddLast(Point data, boolean axis){\r\n\t\tContainer toAdd = new Container(data, null);\r\n\t\tif(axis){\r\n\t\t\tif(firstX == null){\r\n\t\t\t\tfirstX = toAdd;\r\n\t\t\t\tlastX = toAdd;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlastX.next = toAdd;\r\n\t\t\t\ttoAdd.prev = lastX;\r\n\t\t\t\tlastX = toAdd;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{ //!axis\r\n\t\t\tif(firstY == null){\r\n\t\t\t\tfirstY = toAdd;\r\n\t\t\t\tlastY = toAdd;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlastY.next = toAdd; \r\n\t\t\t\ttoAdd.prev = lastY;\r\n\t\t\t\tlastY = toAdd;\r\n\t\t\t}\r\n\t\t\tsize++;\r\n\t\t}\r\n\t}", "public void insertLast( T data )\n\t{\n\t\t//if the list is empty or the head is the last node\n\t\tif(isEmpty() || head.getNext() == null){\n\t\t\t//insert first node\n\t\t\tinsertFirst(data);\n\t\t\t//increment the size of the list\n\t\t\tlistSize++;\n\t\t}\n\t\telse\n\t\t\t//insert a new node after last node\n\t\t\tinsertAfter(getLastNode(), data);\n\t}", "public void addLast(Item item) { // initiation\n if (item != null) {\n if (size == 0) {\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else {\n Node oldlast = last;\n last = new Node();\n last.back = null;\n last.item = item;\n last.front = oldlast;\n oldlast.back = last;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "public boolean insertLast(int value) {\n if (isFull()) {\n return false;\n }\n arr[tail] = value;\n tail = (tail + 1) % k;\n return true;\n\n }", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Item must not be null.\");\n }\n\n Node<Item> oldlast = last;\n last = new Node<>();\n last.item = item;\n last.previous = oldlast;\n if (oldlast == null) {\n first = last;\n } else {\n oldlast.next = last;\n }\n size++;\n assert check();\n }", "public boolean insertLast(int value) {\n if (cnt == size)\n return false;\n Node node = new Node(value);\n if (head == null) {\n head = node;\n tail = node;\n node.pre = node;\n node.next = node;\n } else {\n node.next = tail.next;\n node.pre = tail;\n tail.next.pre = node;\n tail.next = node;//之前写成了tail.pre=node,花费了3个多小时解决,最终通过读代码发现,Read the fucking source code!!\n tail = node;\n }\n cnt++;\n return true;\n }", "private static <T> T lastItemOfList(List<T> list) {\n if (list == null || list.size() == 0) {\n return null;\n }\n return list.get(list.size() - 1);\n }", "public void addLast(Object data) {\n Node newNode = new Node(data);\n if(isEmpty()) {\n addFirst(data);\n } else {\n tail.next = newNode;\n tail = newNode;\n size ++;\n }\n }", "public boolean insertLast(int value) {\n if (isFull()) {\n return false;\n } else if (front == 0 && !isEmpty()) {\n int[] newElements = new int[capacitySize];\n System.arraycopy(elements, 0, newElements, 1, last);\n elements = newElements;\n front = 0;\n last++;\n elements[0] = value;\n } else if (front == 0 && isEmpty()) {\n elements[0] = value;\n last++;\n } else {\n elements[--front] = value;\n }\n return true;\n }", "T last();", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "@Override\n public AmortizedDeque<T> pushBack(T t) {\n return new AmortizedDeque<>(head, tail.pushFront(t));\n }", "public void addLast(E x) {\n\t\t\n\t\tNode p = mTail;\n\t\tp.data = x;\n\n\t\tmTail = new Node(null, null);\n\n\t\tp.next = mTail;\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void addLast(Object e) {\n if(head == null) {\n addFirst(e);\n return;\n }\n\n Node n = new Node(e, tail, null);\n tail.setNext(n);\n tail = n;\n }", "public static <T> T getLast(List<T> list) {\n\t\treturn list != null && !list.isEmpty() ? list.get(list.size() - 1) : null;\n\t}", "public static <T> T last(ArrayList<T> lst) {\n return lst.get(lst.size() - 1);\n }", "public void insertLast( T data ) \n {\n \tDLLNode newNode;\n\n if(isEmpty()){\n \t newNode = new DLLNode(data, null, null);\n \t head = newNode;\n \t tail = newNode;\n }\n \n else{\n \tnewNode = new DLLNode(data, tail, null);\n \ttail.next = newNode;\n \ttail = newNode;\n }\n }", "private void addNode(Node<AnyType> t) {\n \n if ( isEmpty() ) {\n \n headNode = t;\n tailNode = headNode;\n \n } else { \n \n Node<AnyType> node = getNode( size-1 );\n node.setNextNode( t );\n t.setPreviousNode( node );\n \n tailNode = t;\n \n }\n \n size++;\n \n }", "public Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "T butLast();", "public void insertLast( T data ){\n\t\t//create temporary node that will contain data\n\t\tDLLNode<T> newNode = new DLLNode<T>();\n\t\tnewNode.setData( data );\n\t\t//if tail = empty\n\t\tif( tail == null ){\n\t\t\ttail = newNode;\n\t\t} else{\n\t\t\tnewNode.setPrev( tail );\n\t\t\ttail.setNext(newNode);\n\t\t\ttail = newNode;\n\t\t}\n\t\tsize++;\n\t}", "public void addToBack(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null\"\n + \" data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<>(data);\n tail.setNext(newnode);\n newnode.setPrevious(tail);\n tail = newnode;\n size += 1;\n\n }\n }", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "public void addLast(Item item) throws NullPointerException {\n checkItemNotNull(item);\n\n Node oldlast = last;\n last = new Node(item);\n\n if (isEmpty()) {\n first = last;\n } else {\n oldlast.next = last;\n last.prev = oldlast;\n }\n size++;\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "@Override\n public void insertLast(E e) {\n if (listHead == null) {\n listHead = new Node(e);\n listTail = listHead;\n }\n\n // In the general case, we simply add a new node to the end\n // of the list via the tail pointer.\n else {\n listTail.next = new Node(e, listTail.next);\n listTail = listTail.next;\n }\n }", "public void addLastNode(int data)\n {\n if (tail == null)\n head = tail = new Node(data); //empty list\n else\n {\n tail.next = new Node(data); //link new node as last node\n tail = tail.next; //make tail pointer points to last node\n }\n }", "public T getLast();", "public T getLast();", "public void addLast(Item item){\n\t\tif(item == null){\n\t\t\tthrow new NullPointerException(\"Cannot insert a null item.\");\n\t\t}else{\n\t\t\t//save old last node\n\t\t\tNode<Item> oldLast = last;\n\t\t\t//assign last node to a new node\n\t\t\tlast = new Node<Item>();\n\t\t\tlast.item = item;\n\t\t\tlast.next = null;\n\t\t\tlast.prev = oldLast;\n\t\t\t//if the first item to add\n\t\t\tif(oldLast == null){\n\t\t\t\tfirst = last;\n\t\t\t}else{\n\t\t\t\toldLast.next = last;\n\t\t\t}\n\t\t\t//increase size by 1\n\t\t\tn++;\n\t\t}\n\t\t\t\n\t}", "@Override\n public void addLast(E e) throws IllegalStateException {\n checkSize();\n data[size] = e;\n size++;\n }", "public void addLast(Item item) {\n if (item == null)\n throw new IllegalArgumentException();\n \n final Node<Item> l = last;\n final Node<Item> newNode = new Node<>(l, item, null);\n last = newNode;\n if (l == null)\n first = newNode;\n else\n l.next = newNode;\n size++;\n }", "public void insertLast( T data )\n {\n \t//account for special case when head is the only node\n \tif (getLastNode()==this.head)\n \t\tinsertFirst(data);\n \t\n //create a new linkedListNode\n LinkedListNode<T> newNode = new LinkedListNode<T>();\n //assign that node some data\n newNode.setData(data);\n //point last node to new node\n this.getLastNode().setNext(newNode);\n }", "public void addToLast(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\tnewNode.setLink(null);\r\n\t\r\n\tif (trailer == null) {\r\n\t\ttrailer = newNode;\r\n\t\theader = newNode;\r\n\t}\r\n\telse {\r\n\t\ttrailer.setLink(newNode);\r\n\t\tnewNode.setBack(trailer);\r\n\t\ttrailer = newNode;\t\t\r\n\t}\r\n\t\r\n\tsize++;\r\n}", "public void add(T e) {\n\t\tif(!this.isEmpty()) {\n\t\t\tsuper.put(e, new Duet<T>(last, null));\n\t\t\tthis.get(last).setLast(e);\n\t\t\tlast = e;\n\t\t} else {\n\t\t\tsuper.put(e, new Duet<T>(null, null));\n\t\t\tfirst = e;\n\t\t\tlast = e;\n\t\t}\n\t}", "public boolean insertLast(int value) {\n if (isFull()) {\n return false;\n }\n queue[tail] = value;\n tail = moveRight(tail);\n return true;\n }", "public Node<T> addFirst(T t) { \r\n Node<T> currFirst = sentinel.next;\r\n Node<T> newNode = new Node<T>(t, sentinel, currFirst);\r\n sentinel.next = newNode;\r\n currFirst.prev = newNode;\r\n size++;\r\n return newNode; \r\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "public void addLast(Item item) {\n if (item == null) throw new NullPointerException(\"Item is null\");\n if (isEmpty()) {\n first = new Node<Item>(item);\n last = first;\n } else {\n Node<Item> newLast = new Node<Item>(item);\n last.next = newLast;\n newLast.prev = last;\n last = newLast;\n }\n size++;\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException(\"Can not call addLast() with a null argument\");\n }\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if (isEmpty()) {\n first = last;\n }\n else {\n oldLast.next = last;\n last.prev = oldLast;\n }\n n++;\n }", "public void insertLast(int key, int value) {\n\t\t\tcount ++;\r\n\t\t\tif (last == null) {\r\n\t\t\t\tlast = new Node(key, value, null,null);\r\n\t\t\t\tfirst = last;\r\n\t\t\t}\r\n\t\t\t// put the new value after the last; and the last become the new value\r\n\t\t\telse {\r\n\t\t\t last.next = new Node(key, value, last, null);\r\n\t\t\t last = last.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public void addlast(Item item)\r\n {\r\n Node last = post.prev;\r\n Node x = new Node();\r\n x.item = item;\r\n x.next = post;\r\n x.prev = last;\r\n post.prev = x;\r\n last.next = x;\r\n n++;\r\n }", "@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }", "public void addToTheLast(Node node) \n\t{\n\t\tif (head == null) \n\t\t{\n\t\t\thead = node;\n\t\t} else \n\t\t{\n\t\t Node temp = head;\n\t\t while (temp.next != null)\n\t\t temp = temp.next;\n\t\t temp.next = node;\n\t\t}\n }", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "@Override\n\tpublic void insertAtLast(T item) {\n\t\tNode<T> newNode = new Node<>(item);\n\t\tif (this.head == null) {\n\t\t\tthis.head = newNode;\n\t\t} else {\n\t\t\tNode<T> tmpNode = this.head;\n\t\t\twhile (tmpNode.getNext() != null) {\n\t\t\t\ttmpNode = tmpNode.getNext();\n\t\t\t}\n\t\t\ttmpNode.setNext(newNode);\n\t\t}\n\t\tlistSize++;\n\t}", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public void addLast(Item x) {\n StuffNode last = new StuffNode(x, sentinel, null);\n if (this.isEmpty()) {\n last.prev = sentinel;\n sentinel.next = last;\n } else {\n StuffNode oldlast = sentinel.prev;\n last.prev = oldlast;\n oldlast.next = last; // SO MUCH PAIN!!!\n }\n this.sentinel.prev = last;\n size += 1;\n\n }", "public T removeLast() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currLast = sentinel.prev;\r\n Node<T> toBeLast = currLast.prev;\r\n T currLastVal = currLast.getValue();\r\n toBeLast.next = sentinel;\r\n sentinel.prev = toBeLast;\r\n currLast = null;\r\n size--;\r\n return currLastVal;\r\n }", "public void insertLast( T data ) {\n\t\t//make a new node \n\t\tLinkedListNode<T> lastNode = new LinkedListNode<T>();\n\t\t//if somebody accidently called insert after with an empty list\n\n\t\t///add data to this node\n\t\tlastNode.setData(data);\t\n\t\t//invoke insertfirstnode to link up the new node\n\t\tinsertAfter (getLastNode(), data);\n\t\t\n\t}", "public final void addLast(Node n) {\n this.tail.set(n);\n this.tail = n;\n this.size++;\n }", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "public boolean add (Object o) {return addLast(o);}", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "public void addLast(Item item) {\n if (item == null) throw new IllegalArgumentException(\"argument is null\");\n if (!isEmpty()) {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = last;\n last.next = a;\n last = a;\n\n }\n else {\n Node a = new Node();\n a.item = item;\n a.next = null;\n a.prev = null;\n first = a;\n last = a;\n }\n size++;\n\n }", "public T removeLast();", "public void addLast(Item item) throws NullPointerException {\n if (item == null) {\n throw new NullPointerException(\"Cannot add null item to end of deque\");\n }\n Node n = new Node(); //n = temporary Node\n n.setItem(item);\n if (isEmpty()) { //if item is added to empty deque, set n as head and tail (deque now has 1 node)\n head = n;\n tail = n;\n } else { //else item is added to non-empty deque\n tail.setNext(n);\n n.setPrev(tail);\n tail = n;\n }\n size++; //increment deque size\n }", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node node = new Node();\n node.item = item;\n node.pre = last;\n if (last == null) {\n last = node;\n first = last;\n }\n else {\n last.next = node;\n last = node;\n }\n len++;\n }", "@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public void addToTail(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\t\r\n\t\t// checks if the list is empty then adds value to tail.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t\t\r\n\t\t// checks if the last value is null then adds value to tail.\r\n\t\tif(end == null)\r\n\t\t{\r\n\t\t\tend = add;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// if there are more values in SLL.\r\n\t\tend.next = add;\r\n\t\tend = add;\r\n\t}", "public void addLast(Item item) {\n if (item == null) {\n throw new IllegalArgumentException();\n }\n Node<Item> node = new Node<Item>(item);\n if (head == null) {\n head = node;\n tail = node;\n } else {\n tail.next = node;\n node.prev = tail;\n tail = node;\n }\n size++;\n }" ]
[ "0.7670766", "0.758008", "0.6988851", "0.6896901", "0.688641", "0.6840023", "0.68129236", "0.6781915", "0.66985095", "0.66766936", "0.666934", "0.6635568", "0.66037804", "0.6552409", "0.6529441", "0.6479073", "0.6462365", "0.64282703", "0.6408984", "0.6395179", "0.6392529", "0.63755006", "0.63555694", "0.6336428", "0.6328226", "0.63275397", "0.63151956", "0.6298764", "0.62489176", "0.6247343", "0.6236732", "0.6196829", "0.61811256", "0.61482614", "0.6137183", "0.61278445", "0.6127188", "0.6116556", "0.6116299", "0.61132026", "0.6093502", "0.6078357", "0.60777444", "0.6062698", "0.6062217", "0.60462403", "0.60323566", "0.60245365", "0.60193276", "0.6018074", "0.59931177", "0.5988608", "0.5980078", "0.5976399", "0.59727234", "0.5960909", "0.59608114", "0.5956545", "0.59405524", "0.5921169", "0.59123886", "0.5910382", "0.5900393", "0.58983004", "0.58859813", "0.5885423", "0.5885423", "0.5883938", "0.5883874", "0.5880889", "0.5869969", "0.5862315", "0.5847447", "0.58429205", "0.5840985", "0.5838423", "0.5819133", "0.5815022", "0.58147436", "0.5814511", "0.57968634", "0.5791298", "0.57899064", "0.5788743", "0.57864815", "0.57850903", "0.5771624", "0.5770235", "0.5756761", "0.5740285", "0.57335794", "0.57298464", "0.57226694", "0.5716563", "0.5713851", "0.5713581", "0.57033545", "0.5684522", "0.56743973", "0.5672439" ]
0.7938834
0
TODO method delete(T t) remove all entries of element with value t from the list it creates new array with the same length, then it copies all elements except the element with value t Time Complexity is O(n) linear
public boolean delete(T t) { boolean found = false; // is element with value t found Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" int index = 0; // stores current index for(int i = 0; i < size; i++){ // treat all elements if(!found && elements[i] == t){ // if we have not found element with value t and current element has this value found = true; // we have found such element } else{ newElements[index] = elements[i]; // // copy elements in temporary array index++; // increment index } } elements = newElements; // move temporary array to main array "elements" size --; // decrement size return found; // return Is element with value t found? }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void remove(T t) {\n for (int i = 0; i < elementsInArray; i++) {\n if(t.equals(arrayList[i])) {\n arrayList[i] = null;\n elementsInArray--;\n return;\n }\n }\n }", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//loop to execute for every element after the current element in the list\r\n\t\t\t\tfor (int j=i+1;j<size;j++) {\r\n\t\t\t\t\t//checks if there is are 2 elements in the list with the same value\r\n\t\t\t\t\tif (element==list[j]) {\r\n\t\t\t\t\t\tremove(j);\t//calls function to remove that element from array\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\telse {\t//contains 0 elements\r\n\t\t\tSystem.out.println(\"List is empty!\");\r\n\t\t}\r\n\t}", "public T delete(int i) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + 0); // cause IndexOutOfBoundException\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[i]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[i]; // save value of deleted element\n for (int j = 0; j < i; j++) // treat all values with index less than i\n newElements[j] = elements[j]; // copy elements in temporary array\n for (int j = i; j < size - 1; j++) // treat all values with index greater than i\n newElements[j] = elements[j + 1]; // copy elements in temporary array\n size--; // decrement size\n elements = newElements; // move temporary array to main array \"elements\"\n }\n return deletedValue; // return value of element that will be deleted\n }", "public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }", "public T removeAt(int index) {\n if (index >= size || index < 0) throw new IndexOutOfBoundsException();\n T tempData = genericArrayList[index];\n T[] tempArrayList = (T[]) new Object[size - 1];\n for (int i = 0, j = 0; i < size; i++, j++) {\n if (i == index) j--; // skip over removeAtIndex by fixing j temporarily\n else tempArrayList[j] = genericArrayList[i];\n }\n genericArrayList = tempArrayList;\n capacity = --size;\n return tempData;\n }", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "public void delete(T element);", "public void deleteTour(Tour t) {\r\n\t\t int i=Arrays.asList(tours).indexOf(t);\r\n\t\t\r\n\t\t tours[i]=null;\r\n\t\t }", "private static <T> Object remove(Object baseValue, T value) {\n\t\tif (baseValue == value || baseValue == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!(baseValue instanceof Object[])) {\n\t\t\t// baseValue is a single element not equal to value\n\t\t\treturn baseValue;\n\t\t}\n\n\t\tObject[] oldArray = (Object[])baseValue;\n\t\tfor (int i = 0; i < oldArray.length; i++) {\n\t\t\tif (oldArray[i] == value) {\n\t\t\t\tif (oldArray.length == 2) {\n\t\t\t\t\treturn oldArray[i == 0 ? 1 : 0];\n\t\t\t\t}\n\n\t\t\t\t// Shift remaining elements and return\n\t\t\t\tfor (int j = i + 1; j < oldArray.length; j++) {\n\t\t\t\t\toldArray[j - 1] = oldArray[j];\n\t\t\t\t}\n\n\t\t\t\treturn Arrays.copyOf(oldArray, oldArray.length - 1);\n\t\t\t}\n\t\t}\n\n\t\treturn baseValue;\n\t}", "@Override\n public boolean delete(T o) {\n if(o == null) return false;\n if(!contains(o)){\n return false;\n }else {\n int hcode = hash(o);\n hcode %= array.length;\n array[hcode].reset();\n while (!eqals(o, array[hcode].elem())) {\n array[hcode].advance();\n }\n array[hcode].delete();\n return true;\n }\n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "final void deleteAll(int elt) {\n if (contents != null && n >= 0 && n <= contents.length){\n int n_old = n;\n //@ loop_invariant (i <= n+1);\n for (int i = 0; i < n; i++) { \n if (contents[i] == elt ) {\n if (n == 1){\n n--;\n contents = new int[contents.length];\n return;\n } else {\n n--;\n contents[i] = contents[n];\n i--;\n }\n }\n }\n if (n_old != n) {\n int[] new_contents = new int[contents.length];\n arraycopy(new_contents, 0, contents, 0, n);\n contents = new_contents;\n }\n }\n }", "public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }", "private ArrayList<Task> removeNoTimeTask(ArrayList<Task> toFilter) {\n ArrayList<Integer> toDelete = new ArrayList<Integer>();\n\n //remove all without dates (ToDos and Lasts)\n for (int i = 0; i < toFilter.size(); i++) {\n if (toFilter.get(i).getClass().equals(ToDo.class)) {\n toDelete.add(i);\n }\n if (toFilter.get(i).getClass().equals(Last.class)) {\n toDelete.add(i);\n }\n }\n\n for (int i = toDelete.size() - 1; i >= 0; ) {\n toFilter.remove((int) toDelete.get(i));\n i--;\n }\n return toFilter;\n }", "private static void remove(int[]data,int size){\n int temp = data[0];\n data[0] = data[size-1];\n data[size-1] = temp;\n pushDown(data, size-1, 0);\n }", "void remove(int index) {\n\t\tfor (int i = index; i < array.length - 1; i++) {\n\t\t\tarray[i] = array[i + 1];\n\t\t}\n\t\tint[] temp = new int[array.length - 1];\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\ttemp[i] = array[i];\n\t\t}\n\t\tint lastValue = array[array.length - 1];// index starts @ 0, so its the\n\t\t\t\t\t\t\t\t\t\t\t\t// array.length - 1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t// for the 0\n\t\tarray = temp;\n\n\t}", "@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }", "public List removeDuplicate() throws ComputationException {\n log.debug(\"Removing duplicate using List......\");\n List<Integer> uniqueList = new ArrayList();\n int[] intArray = getRandomArray();\n log.debug(\"Actual size of int array:\" + intArray.length);\n log.debug(Arrays.toString(intArray));\n for (int i = 0; i < intArray.length; i++) {\n if (!isAdded(uniqueList, intArray[i])) {\n uniqueList.add(intArray[i]);\n }\n\n }\n log.debug(\"refined size of int array: \" + uniqueList.size());\n log.debug(uniqueList.toString());\n return uniqueList;\n\n }", "@Override\r\n\tpublic void delete(T element) {\n\r\n\t}", "public void remove(E key) {\t//O(n)\r\n\t\t//checks if there is an element with the same value as the key\r\n\t\tint index=compareTo(key);\t\r\n\t\tif (index!=-1) {\t//element exists in array\r\n\t\t\tfor (int k=index+1; k<=size;k++) {\t//shifting element\r\n\t\t\t\tlist[k-1]=list[k];\r\n\t\t\t}\r\n\t\t\tsize--;\t//decreasing size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t\tSystem.out.println(key+\" removed!\");\r\n\t\t} else {\t//element doesn't exist in array\r\n\t\t\tSystem.out.println(key +\" is not in the list\");\r\n\t\t}\r\n\t}", "private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }", "public T remove (T element);", "public void deleteElement(int element) {\n // duplicates array\n int[] getdouble = get;\n // clears this\n get = new int[0];\n // reinserts everything but given element\n for (int i : getdouble)\n if (i != element)\n insertElement(i);\n }", "void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }", "public T remove() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n \r\n T deleted = elements[r];\r\n elements[r] = elements[size() - 1];\r\n elements[size() - 1] = null;\r\n size--;\r\n \r\n if (size() > 0 && size() < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n \r\n return deleted;\r\n }", "public void remove(T element);", "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "public T deleteLast() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue; //\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) // treat all elements except the last one\n newElements[i] = elements[i]; // copy elements in temporary array\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return previous value of last element\n }", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "private static int[] removeTheElement(int[] arr, \n int index) \n { \n \n // If the array is empty \n // or the index is not in array range \n // return the original array \n if (arr == null\n || index < 0\n || index >= arr.length) { \n \n return arr; \n } \n \n // Create another array of size one less \n int[] anotherArray = new int[arr.length - 1]; \n \n // Copy the elements except the index \n // from original array to the other array \n for (int i = 0, k = 0; i < arr.length; i++) { \n \n // if the index is \n // the removal element index \n if (i == index) { \n continue; \n } \n \n // if the index is not \n // the removal element index \n anotherArray[k++] = arr[i]; \n } \n \n // return the resultant array \n return anotherArray; \n }", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "protected T remove(T data){\r\n\t\t//data not in it, saves time\r\n\t\tif(!contains(data))\r\n\t\t\treturn null;\r\n\r\n \tmodCount++;\r\n\t\tArrayNode<T> current = beginMarker.next;\r\n\t\twhile (current != endMarker){\r\n\t\t\t//uses node remove\r\n\t\t\tT x = current.remove(data);\r\n\t\t\t//data not in this node\r\n\t\t\tif (x== null)\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t//data removed\r\n\t\t\telse{\r\n\t\t\t\tnumAdded--;\r\n\t\t\t\t//remove empty node\r\n\t\t\t\tif (current.getArraySize()==0){\r\n\t\t\t\t\tcurrent.next.prev = current.prev;\r\n\t\t\t\t\tcurrent.prev.next = current.next;\r\n\t\t\t\t\tsize--;\r\n\t\t\t\t}\r\n\t\t\t\t//Check if compression is needed\r\n\t\t\t\tif (size() < (nodeCount()*capacityOfArrays*0.5)){\r\n\t\t\t\t\tcompress();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "T remove(int index);", "T remove(int index);", "@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n Object element = get(i);\n size--;\n\n if (size == 0) {\n storage = null;\n } else if (size < 5) {\n for (int cnt = i; cnt < size; cnt++) {\n ((E[]) storage)[cnt] = ((E[]) storage)[cnt + 1];\n }\n\n if (size == 1) {\n storage = ((E[]) storage)[0];\n }\n } else {\n ((ArrayList<E>) storage).remove(i);\n\n if (size == 5) {\n storage = ((ArrayList<E>) storage).toArray();\n }\n }\n\n return (E) element;\n }", "@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }", "static String[] removeElements(String[] input, String deleteMe)\n {\n List result = new LinkedList();\n\n for(String item : input)\n if(!deleteMe.equals(item))\n result.add(item);\n result.toArray(input);\n return input;\n }", "@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n for (int k = i; k < size - 1; k++) // shift element to fill hole\n data[k] = data[k + 1];\n data[size - 1] = null; // help garbage collection\n size--;\n return temp;\n }", "@Test\r\n\t\tpublic void testDeleteElement() {\n\t\t\ttestingSet= new IntegerSet(list1);\r\n\t\t\tInteger array[] = testingSet.toArray(); \r\n\t\t\ttestingSet.deleteElement(0);\r\n\t\t\t// check to see if the first element in the set still exists\r\n\t\t\t// should result to false \r\n\t\t\tassertEquals(testingSet.exists(array[0]), false); \r\n\t\t}", "void remove(int index)\n\t{\n\t\t//Create a temporary array\n\t\tint[] temp=new int[inputArray.length-1];\n\t\t\n\t\t//Copy all the elements before the element at position index into the temporary array\n\t\tfor(int i = 0; i < index; i++)\n\t\t{\n\t\t\ttemp[i] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Copy all the elements after the element at position index into the temporary array\n\t\tfor(int i = index+1; i < inputArray.length; i++)\n\t\t{\n\t\t\ttemp[i-1] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Make the temporary array as the new array\n\t\tinputArray = temp;\n\t}", "private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}", "public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}", "static public Object trimArray(Object[] list,int newSize) {\n Class type = list.getClass().getComponentType();\n Object temp = Array.newInstance(type, newSize);\n System.arraycopy(list, 0, temp, 0,\tnewSize); \n return temp;\n\t}", "@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }", "public void compact() {\n Entry<K,V> e;\n Entry<K,V> possibleDup;\n for (final Iterator<Entry<K,V>> itr = entries.iterator(); itr.hasNext(); ) {\n e = itr.next();\n possibleDup = getEntry(e.getKey()); // Returns the newest entry\n if (possibleDup != null && e != possibleDup) {\n itr.remove();\n }\n }\n\n size = entries.size(); // We now know the size\n\n // Compact the underlying array\n entries.trimToSize();\n }", "private static int[] removeElement(int[] a, int i) {\n\t\tint[] b = new int[a.length-1];\n\t\tint k = 0;\n\t\tfor (int j = 0; j < a.length; j++) {\n\t\t\tif (j != i) {\n\t\t\t\tb[k++] = a[j];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}", "@Override\n public void Clear() {\n for (int i = 0; i < array.size(); i++) {\n array.remove(i);\n\n }//Fin del for\n }", "@Override\n public T remove(Object object) {\n T removed = null;\n for (int i = 0; i < array.length; i++) {\n while (!array[i].equals(object)) {\n\n }\n removed = array[i];\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }", "public static void main(String[] args) {\n\n ArrayList<Integer> arrayList=new ArrayList<>();\n\n arrayList.add(1);\n arrayList.add(1);\n arrayList.add(2);\n arrayList.add(5);\n\n\n System.out.println(arrayList);\n System.out.println(arrayList.remove(1));\n System.out.println(arrayList);\n\n }", "private void removeTailElement(){\n JavaBaseTask removed = items.remove(tail.getKey());\n System.out.println(\"element with index : \" + removed.getKey() + \"has been deleted doe to cache eviction\");\n tail = tail.previous;\n var headAu = head;\n while (headAu.next != null){\n headAu = headAu.next;\n }\n headAu = headAu.previous;\n headAu.next = null;\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "public T[] getClonedTrimmed(T[] ar) {\r\n for (int i = offset; i < offset + count; i++) {\r\n @SuppressWarnings(\"unchecked\")\r\n T v = (T)objects[i];\r\n ar[i] = v;\r\n }\r\n return ar;\r\n }", "static int[] removeElement(int[] a, int b){\n int newSize = a.length - countElement(a,b);\n // create an empty array with the new size\n int[] newArray = new int[newSize];\n // we need a index to know at what position in the new array we need to\n // put first element\n // logically, the first position is 0\n int tempIndex = 0;\n // we go through all elements of old array to find\n // those which need to be put in the new array\n for(int i = 0; i < a.length; i++){\n // once we find one\n if(b != a[i]){\n // we add it to the new array at new index\n newArray[tempIndex] = a[i];\n // increment the index so that the next element we find\n // we put it at the next index, otherwise\n // we'd put everything in position 0\n tempIndex++;\n }\n }\n return newArray;\n }", "public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }", "public static void main(String[] args) {\nint arr[]= {4,3,4,5,6,77,77,2,4,9,2};\nint uniqueelem=arr.length;\n//int arrclean[]=new int[arr.length];\nfor(int i=0;i<uniqueelem;i++)\n{\n\tfor(int j=i+1;j<uniqueelem;j++)\n\t{\n\t\tif(arr[i]==arr[j])\n\t\t{\n\t\t\t\n\t\t\tarr[j]=arr[uniqueelem-1];\n\t\t\tuniqueelem--;\n\t\t\tj--;\n\t\t}\n\t}\n}\n\nint arrclean[]=Arrays.copyOf(arr, uniqueelem);\n\nSystem.out.println(Arrays.toString(arrclean));\n\t}", "@Override\n public void delete(Integer index) {\n if(index > lastIndex)\n throw new IllegalArgumentException(); // only for tests\n stack.push(arr[index]);\n stack.push(index + arr.length+1);\n for (int i=index+1; i<lastIndex + 1; i++){\n arr[i-1] = arr[i];\n }\n lastIndex = lastIndex - 1;\n }", "public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }", "public E remove(int i) {\n\t /*\n\t * Add code here.\n\t * Remember to compact the array so there are no spaces in between\n\t * if an element from the middle is removed or an element at the\n\t * beginning of the array is removed.\n\t */\n\t\t if(i<=num_elements){\n\t\t\t E removed_element= elements[i];\n\t\t for(int r=i;r<num_elements;r++){\n\t\t\t elements[r] = elements[r+1];\n\t\t }\n\t\t \tnum_elements --;\n\t\t return removed_element;\n\t\t }\n\t return null;\n\t }", "public Type remove(int index);", "@Override\n\tpublic boolean remove(Object o) throws IndexOutOfBoundsException\n\t{\n\t\tint index= 0;\n\t\twhile (myArray[index]!=null && !(myArray[index].equals(o)))\n\t\t\tindex++;\n\t\tif(myArray[index]== null)\n\t\t\treturn false;\n\t\telse\n\t\t{\n\t\t\twhile(index < size)\n\t\t\t{\n\t\t\t\tmyArray[index] = myArray[index+1];\n\t\t\t\tmyArray[index+1] = null;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n\t\t\t\n\t\t/*\n\t\tmyArray[index] = null;\n\t\tint temp = index;\n\t\twhile(index < size)\n {\n \tmyArray[index] = myArray[index+1];\n \tmyArray[index+1] = null;\n index++;\n }*/\n size--;\n \n\t\n\t\t\n\t\treturn false;\n\t}", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "public E remove(int index) {\n //first make a copy of the element we are going to remove later\n //so that it can be returned\n E copy = this.array[index];\n \n /*\n * make an if to find out if there is only one element in the array or not\n * if there is, then simply make the array empty\n */\n if (this.array.length == 1) {\n //only one element in the array, so there is nothing to slide over\n this.array = (E[]) new Object[0];\n } else {\n //make a temp array that has one less index than the current array\n Object[] temp = new Object[this.array.length - 1];\n \n //copy everything up to the desired index\n for (int i = 0; i < index; i++) {\n temp[i] = this.array[i];\n }\n \n //now copy all of the other elements after the index, but skip over the desired element to remove\n for (int i = index; i < temp.length; i++) {\n /*\n * take in the element from the next index over from this.array\n * this will automatically skip over the element that we want to remove\n */\n temp[i] = this.array[i + 1];\n }\n \n //set the array to the temp now that the element is removed\n this.array = (E[]) temp;\n }\n \n //return the copy that we created before we removed the element\n return (E) copy;\n }", "final void deleteFirst(int elt) {\n if (contents != null && n >= 0 && n <= contents.length){\n int[] new_contents;\n //@ loop_invariant (i <= n);\n for (int i = 0; i < n; i++) {\n if (contents[i] == elt) {\n n--;\n new_contents = new int[contents.length];\n arraycopy(contents, 0, new_contents, 0, i);\n arraycopy(contents, i+1, new_contents, i, n-i);\n contents = new_contents;\n return;\n }\n }\n }\n }", "@Test\r\n\tpublic void testRemoveE() {\r\n\t\tll.add(t1);\r\n\t\tll.add(t2);\r\n\t\tll.add(t3);\r\n\t\tll.add(t4);\r\n\t\tll.add(t5);\r\n\t\tassertEquals(5, ll.size());\r\n\t\t// order of list: [0: t1, 1: t2, 2: t3, 3: t4, 4: t5]\r\n\t\t\r\n\t\tassertFalse(ll.remove(null));\r\n\t\tassertFalse(ll.remove(\"not in list\"));\r\n\t\t\r\n\t\tassertTrue(ll.remove(t1));\r\n\t\tassertEquals(4, ll.size());\r\n\t\tassertEquals(t2, ll.get(0));\r\n\t\t// order of list: [0: t2, 1: t3, 2: t4, 3: t5]\r\n\t\t\r\n\t\tassertTrue(ll.remove(t3));\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertEquals(t2, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\tassertEquals(t5, ll.get(2));\r\n\t\t// order of list: [0: t2, 1: t4, 2: t5]\r\n\t\t\r\n\t\tassertTrue(ll.remove(t5));\r\n\t\tassertEquals(2, ll.size());\r\n\t\tassertEquals(t2, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\t// order of list: [0: t2, 1: t4]\r\n\t\t\r\n\t\tassertTrue(ll.remove(t2));\r\n\t\tassertFalse(ll.remove(\"not in list\"));\r\n\t\tassertTrue(ll.remove(t4));\r\n\t\tassertFalse(ll.remove(t1));\r\n\t\t\r\n\t}", "public static int[] removeElement ( int[] array , int x){\n\n if(x< 0 ||x >= array.length){\n System.err.println(\"Invalid Index\");\n System.exit(0);\n }\n\n int[] newArray = new int[array.length- 1];\n\n for (int i = 0, j= 0; i < array.length ; i++) {\n if(i== x){\n continue;\n }else{\n newArray [j++] = array[i];\n }\n }\n\n\n return newArray ;\n }", "@Override\n\tpublic void delete(int pValueToDelete) {\n\t\tint n = find(pValueToDelete);\n\t\tif (find(pValueToDelete) != -1) {\n\t\t\tpointer--;\n\t\t\tvalues[n] = values[pointer];\n\t\t\t// for Sorted Lists\n//\t\t\tfor (int n = find(pValueToDelete); n < pointer - 1; n++)\n//\t\t\t\t// shift to left\n//\t\t\t //FAILS WHEN TO TRY SHIFT LAST POSITION\n//\t\t\t\tvalues[n] = values[n + 1];\n\t\t}\n\t}", "@Override\n public void delete(int i) throws IndexOutOfBoundsException, IllegalStateException {\n validIndex(i);\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = i; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "private void arrayCompact(MyArrayList myArrayList, Results results, int value) {\r\n int old_size = myArrayList.size();\r\n myArrayList.removeValue(value);\r\n myArrayList.compact();\r\n int new_size = myArrayList.size();\r\n if(old_size > new_size) {\r\n results.storeNewResult(\"ArrayCompact test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayCompact test case: FAILED\");\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T[] removeItemFromArray(T[] array,T item) {\n\t\tint index = find(array, item);\n\t\tif (index==-1) throw new IllegalArgumentException(\"Item not in array!\");\n\t\tT[] re = (T[]) Array.newInstance(array.getClass().getComponentType(), Array.getLength(array)-1);\n\t\tSystem.arraycopy(array, 0, re, 0, index);\n\t\tSystem.arraycopy(array, index+1, re, index, re.length-index);\n\t\treturn re;\n\t}", "public void compact()\n\t{\n\t\tif (addIndex == size())\n\t\t\treturn;\n\t\t\n\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), addIndex );\n\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\tarray = narray;\n\t}", "@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void remove( T x )\r\n\t{\r\n\t\tif (x == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t{ \r\n\t\t\tLinkedArrays<T> L = (LinkedArrays<T>) table[i]; \r\n\t\t\tboolean b = L.contains(x);\r\n\t\t\tif (b)\r\n\t\t\t{\r\n\t\t\t\tL.remove(x);this.size--;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "private static void usingTempArray()\n\t{\n Integer[] origArray = new Integer[] { 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 7, 8 };\n \n // This array has duplicate elements\n System.out.println(Arrays.toString(origArray));\n \n Integer[] tempArray = removeDuplicates(origArray);\n \n // Verify the array content\n System.out.println(Arrays.toString(tempArray));\n\t}", "public void remove(int num) {\n // find the index of num\n for (int i = 0; i < count; i++) {\n if (list[i] == num) {\n // shift the elements leftward and decrement count\n for (int j = 0; j < count - 1; j++) {\n list[i+j] = list[i+j+1];\n }\n count--;\n return;\n }\n }\n }", "public void remove(T t) throws NoSuchElementException{\n int bucket = hash(t);\n int index = Table.get(bucket).linearSearch(t);\n if (index == -1) {\n \tthrow new NoSuchElementException(\"remove(): \" \n \t\t\t+ \"element is not in the table\");\n } else {\n \tTable.get(bucket).advanceToIndex(index);\n \tTable.get(bucket).removeIterator();\n \tnumElements--;\n }\n }", "@Test\n public void testRemoveAt() {\n testAdd();\n list1.removeAt(3);\n assertEquals(8, list1.size());\n assertEquals(15.25, list1.get(4), 0);\n assertEquals(14.25, list1.get(3), 0);\n assertEquals(17.25, list1.get(5), 0);\n }", "@Test\n public void testRemove_int_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "@Override\n public Object remove(int k) {\n long startTime = System.currentTimeMillis();\n Object value = super.remove(k);\n long endTime = System.currentTimeMillis();\n if (value == null) {\n elements--;\n startTime = System.currentTimeMillis();\n for (int i = 1; i < super.size() && value == null; i++) {\n int hash = (k + i) % size();\n MapElement me = hashTable[hash];\n if (me == null) {\n value = null;\n } else if (me.getKey() != k) {\n value = null;\n } else {\n hashTable[hash] = null;\n value = me.getValue();\n }\n }\n endTime = System.currentTimeMillis();\n }\n System.out.println(\"------REMOVE------\");\n System.out.println(\"TIME: \" + (endTime - startTime));\n return value;\n }", "@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}", "private void reallocate() {\r\n //elem = java.util.Arrays.copyOf(elem, elem.length * 2);\r\n E[] temp = (E[]) new Object[elem.length * 2];\r\n int i = 0;\r\n while (elem[i] != null) {\r\n temp[i] = elem[i];\r\n i++;\r\n }\r\n int j = elem.length - 1;\r\n int k = temp.length - 1;\r\n while (elem[i] != null) {\r\n temp[k] = elem[j];\r\n j--;\r\n k--;\r\n }\r\n front = k;\r\n elem = temp;\r\n }", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSortedPoints(points);\n\t\t\n\t\tArrayList<Point> pts = new ArrayList<Point>();\n\t\tfor(int a = 0; a < points.length; a++) //copy points into temp array\n\t\t{\n\t\t\tif(!pts.contains(points[a]))\n\t\t\t{\n\t\t\t\tpts.add(points[a]);\n\t\t\t}\n\t\t}\n\t\tpointsNoDuplicate = new Point[pts.size()]; //insert into pointsNoDuplicate\n\t\tfor(int i = 0; i < pts.size(); i++)\n\t\t{\n\t\t\tpointsNoDuplicate[i] = pts.get(i);\n\t\t}\n\t}", "public Array<T> compactClone()\n {\n Array<T> out = Array.fromUnsafe(new Object[next], next);\n System.arraycopy(array, 0, out.array, 0, next);\n return out;\n }", "public abstract T remove(int index);", "public static int[] removeTheElement(int[] arr, \r\n int index) \r\n { \r\n \r\n // If the array is empty \r\n // or the index is not in array range \r\n // return the original array \r\n if (arr == null\r\n || index < 0\r\n || index >= arr.length) { \r\n \r\n return arr; \r\n } \r\n \r\n // Create another array of size one less \r\n int[] anotherArray = new int[arr.length - 1]; \r\n \r\n // Copy the elements except the index \r\n // from original array to the other array \r\n for (int i = 0, k = 0; i < arr.length; i++) { \r\n \r\n // if the index is \r\n // the removal element index \r\n if (i == index) { \r\n continue; \r\n } \r\n \r\n // if the index is not \r\n // the removal element index \r\n anotherArray[k++] = arr[i]; \r\n } \r\n \r\n // return the resultant array \r\n return anotherArray; \r\n }", "@Test\r\n\tpublic void testRemoveAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 3, \"iron\"));\r\n\t\tsample.add(new Munitions(new Munitions(3, 4, \"iron\")));\r\n\t\tAssert.assertTrue(list.removeAll(sample));\r\n\t\tAssert.assertFalse(list.removeAll(sample));\r\n\t\tAssert.assertEquals(13, list.size());\r\n\t}", "public void clearListNotIndex(){\n for(int z=0; z<list.length; z++){\n list [z] = 0;\n }\n }", "@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }", "public T removeFirst();", "private int[] compact(int[] arr, int len) {\n assert arr != null;\n assert U.isNonDecreasingArray(arr, len);\n\n if (arr.length <= 1)\n return U.copyIfExceeded(arr, len);\n\n int newLen = 1;\n\n for (int i = 1; i < len; i++) {\n if (arr[i] != arr[newLen - 1])\n arr[newLen++] = arr[i];\n }\n\n return U.copyIfExceeded(arr, len);\n }", "private void RemoveLT(int size, LeapNode[][] pa, LeapNode[][] na,\n\t\t\tLeapNode[] n, LeapNode[][] oldNode, boolean[] merge,\n\t\t\tboolean[] changed) {\n\t\t\n\t}", "public U remove(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \tint i = idx;\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//Same shift algorithm as other remove method\r\n\t \twhile(i<numElems-1){\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t }", "boolean remove(T element);" ]
[ "0.70603627", "0.633042", "0.62611574", "0.6249314", "0.6232519", "0.59894335", "0.59737134", "0.5929669", "0.59001106", "0.5876825", "0.5871552", "0.5856196", "0.5854426", "0.58387274", "0.5827267", "0.5824652", "0.58117664", "0.57878864", "0.5726696", "0.5720312", "0.57176197", "0.57162744", "0.5709617", "0.57068956", "0.5700164", "0.56912506", "0.5671995", "0.56628585", "0.56592363", "0.5642143", "0.5638874", "0.5632863", "0.5631248", "0.5621627", "0.56164765", "0.56127006", "0.5593189", "0.5593189", "0.55762446", "0.55321074", "0.5525914", "0.5524671", "0.5519775", "0.5514402", "0.54863954", "0.54732466", "0.5463614", "0.54596955", "0.54587674", "0.54571545", "0.5452386", "0.5451695", "0.5441394", "0.5428634", "0.5414729", "0.54051226", "0.53917944", "0.5383541", "0.5377856", "0.5361858", "0.5347424", "0.53401506", "0.53357106", "0.5320604", "0.5318126", "0.53176033", "0.53047603", "0.530384", "0.5303074", "0.53015465", "0.52979183", "0.529784", "0.52858305", "0.52723783", "0.52589446", "0.52458966", "0.5243154", "0.52409256", "0.5236151", "0.5235352", "0.52332085", "0.52309257", "0.522697", "0.52266353", "0.52215207", "0.5215288", "0.52110636", "0.52088344", "0.52069163", "0.5199005", "0.5184959", "0.51799184", "0.5177615", "0.5176251", "0.51756483", "0.5172361", "0.5171305", "0.51692414", "0.5166779", "0.51662785" ]
0.63594073
1
method delete(int i) remove the last element from the list it checks whether the variable i is valid then, creates new array with the same length, then it copies all elements except the element with index i after that it copies the remaining elements with one position left shifting finally, it returns the value of deleted element Time Complexity is O(n) linear
public T delete(int i) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue = null; // save value of element that will be deleted if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + 0); // cause IndexOutOfBoundException } else if (size == 1) { // if size is 1 deletedValue = (T) elements[i]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[i]; // save value of deleted element for (int j = 0; j < i; j++) // treat all values with index less than i newElements[j] = elements[j]; // copy elements in temporary array for (int j = i; j < size - 1; j++) // treat all values with index greater than i newElements[j] = elements[j + 1]; // copy elements in temporary array size--; // decrement size elements = newElements; // move temporary array to main array "elements" } return deletedValue; // return value of element that will be deleted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n for (int k = i; k < size - 1; k++) // shift element to fill hole\n data[k] = data[k + 1];\n data[size - 1] = null; // help garbage collection\n size--;\n return temp;\n }", "public E remove(int i) {\n\t /*\n\t * Add code here.\n\t * Remember to compact the array so there are no spaces in between\n\t * if an element from the middle is removed or an element at the\n\t * beginning of the array is removed.\n\t */\n\t\t if(i<=num_elements){\n\t\t\t E removed_element= elements[i];\n\t\t for(int r=i;r<num_elements;r++){\n\t\t\t elements[r] = elements[r+1];\n\t\t }\n\t\t \tnum_elements --;\n\t\t return removed_element;\n\t\t }\n\t return null;\n\t }", "public T deleteLast() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue; //\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) // treat all elements except the last one\n newElements[i] = elements[i]; // copy elements in temporary array\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return previous value of last element\n }", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "public int delete(int i) //O(log(n))\n {\n\t if(this.lst == null)\n\t\t return -1;\n\t if(i < 0 || i >= this.length)\n\t\t return -1;\n\t this.length--; //one element removed\n\t this.lst.correctFrom(this.lst.deletenode(this.lst.Select(i+1))); //see details in class AVLTree\n\t return 0;\n }", "@Override\n public void delete(int i) throws IndexOutOfBoundsException, IllegalStateException {\n validIndex(i);\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = i; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "@Override // com.google.android.gms.internal.firebase_ml.zzsq, java.util.List, java.util.AbstractList\n public final /* synthetic */ Long remove(int i) {\n zzpu();\n zzci(i);\n long[] jArr = this.zzbqi;\n long j = jArr[i];\n int i2 = this.size;\n if (i < i2 - 1) {\n System.arraycopy(jArr, i + 1, jArr, i, (i2 - i) - 1);\n }\n this.size--;\n ((AbstractList) this).modCount++;\n return Long.valueOf(j);\n }", "@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n Object element = get(i);\n size--;\n\n if (size == 0) {\n storage = null;\n } else if (size < 5) {\n for (int cnt = i; cnt < size; cnt++) {\n ((E[]) storage)[cnt] = ((E[]) storage)[cnt + 1];\n }\n\n if (size == 1) {\n storage = ((E[]) storage)[0];\n }\n } else {\n ((ArrayList<E>) storage).remove(i);\n\n if (size == 5) {\n storage = ((ArrayList<E>) storage).toArray();\n }\n }\n\n return (E) element;\n }", "@Override\n public void delete(Integer index) {\n if(index > lastIndex)\n throw new IllegalArgumentException(); // only for tests\n stack.push(arr[index]);\n stack.push(index + arr.length+1);\n for (int i=index+1; i<lastIndex + 1; i++){\n arr[i-1] = arr[i];\n }\n lastIndex = lastIndex - 1;\n }", "void remove(int index) {\n\t\tfor (int i = index; i < array.length - 1; i++) {\n\t\t\tarray[i] = array[i + 1];\n\t\t}\n\t\tint[] temp = new int[array.length - 1];\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\ttemp[i] = array[i];\n\t\t}\n\t\tint lastValue = array[array.length - 1];// index starts @ 0, so its the\n\t\t\t\t\t\t\t\t\t\t\t\t// array.length - 1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t// for the 0\n\t\tarray = temp;\n\n\t}", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "@Override\n public final Integer remove(final int index) {\n // Verify that the specified index is valid\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n // Shift all elements after the removed elements down\n for (int i = index; i < (size - 1); i++) {\n arrayList[i] = arrayList[i + 1];\n arrayList[i + 1] = 0;\n }\n size--;\n return temp;\n\n }\n }", "@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }", "@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }", "public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}", "public int deletion() {\r\n\t\tif(isEmpty()) return -1;\r\n\t\treturn arr[cur_index--];\r\n\t}", "@Override\r\n public Copiable deleteAt(int index) throws IndexRangeException {\r\n if (count == 0) {\r\n throw new IndexRangeException(-1, -1, index);\r\n }\r\n if (index >= 0 && index <= count - 1) {\r\n Copiable temp = list[index];\r\n int shift = 0;\r\n for (int i = index; i < list.length - 1; i++) {\r\n list[i] = list[i + 1];\r\n shift++;\r\n }\r\n list[index + shift] = null;\r\n count--;\r\n return temp;\r\n } else {\r\n throw new IndexRangeException(0, count - 1, index);\r\n }\r\n }", "public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "private static int[] removeElement(int[] a, int i) {\n\t\tint[] b = new int[a.length-1];\n\t\tint k = 0;\n\t\tfor (int j = 0; j < a.length; j++) {\n\t\t\tif (j != i) {\n\t\t\t\tb[k++] = a[j];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }", "E remove(int i ) throws IndexOutOfBoundsException;", "E remove(int i) throws IndexOutOfBoundsException;", "public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }", "private static void remove(int[]data,int size){\n int temp = data[0];\n data[0] = data[size-1];\n data[size-1] = temp;\n pushDown(data, size-1, 0);\n }", "public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rear + 1, array.length)];\n }", "void remove(int index)\n\t{\n\t\t//Create a temporary array\n\t\tint[] temp=new int[inputArray.length-1];\n\t\t\n\t\t//Copy all the elements before the element at position index into the temporary array\n\t\tfor(int i = 0; i < index; i++)\n\t\t{\n\t\t\ttemp[i] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Copy all the elements after the element at position index into the temporary array\n\t\tfor(int i = index+1; i < inputArray.length; i++)\n\t\t{\n\t\t\ttemp[i-1] = inputArray[i];\n\t\t}\n\t\t\n\t\t//Make the temporary array as the new array\n\t\tinputArray = temp;\n\t}", "public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "public E remove(int index){\n if (index > maxIndex || index < 0){\n return null;\n }\n\n E res = (E) array[index];\n\n //deleting element\n array[index] = null;\n\n //shifting other elements\n for (int i = index; i < maxIndex ; i++) {\n array[i] = array[i+1];\n }\n\n --maxIndex;\n\n return res;\n }", "private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }", "@Override\r\n\tpublic Score remove(int i) throws IndexOutOfBoundsException {\r\n\t\t//when i is less than zero or greater than size()-1\r\n\t\tif (i < 0 || i > size() - 1)\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\tScore a = scoreList[i];\r\n\t\tfor (int j = i; j < numItems - 1; j++) {\r\n\t\t\tscoreList[j] = scoreList[j + 1];\r\n\t\t}\r\n\t\tnumItems--;\r\n\t\treturn a;\r\n\t}", "@Override\n\tpublic void delete(int pValueToDelete) {\n\t\tint n = find(pValueToDelete);\n\t\tif (find(pValueToDelete) != -1) {\n\t\t\tpointer--;\n\t\t\tvalues[n] = values[pointer];\n\t\t\t// for Sorted Lists\n//\t\t\tfor (int n = find(pValueToDelete); n < pointer - 1; n++)\n//\t\t\t\t// shift to left\n//\t\t\t //FAILS WHEN TO TRY SHIFT LAST POSITION\n//\t\t\t\tvalues[n] = values[n + 1];\n\t\t}\n\t}", "public U remove(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \tint i = idx;\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//Same shift algorithm as other remove method\r\n\t \twhile(i<numElems-1){\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t }", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}", "private static int[] removeTheElement(int[] arr, \n int index) \n { \n \n // If the array is empty \n // or the index is not in array range \n // return the original array \n if (arr == null\n || index < 0\n || index >= arr.length) { \n \n return arr; \n } \n \n // Create another array of size one less \n int[] anotherArray = new int[arr.length - 1]; \n \n // Copy the elements except the index \n // from original array to the other array \n for (int i = 0, k = 0; i < arr.length; i++) { \n \n // if the index is \n // the removal element index \n if (i == index) { \n continue; \n } \n \n // if the index is not \n // the removal element index \n anotherArray[k++] = arr[i]; \n } \n \n // return the resultant array \n return anotherArray; \n }", "public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }", "public Object delete() throws Exception {\n\t\tObject temp = data[front];\n\t\tdata[front]=null;\n\t\tfront =(front+1)%maxSize;\n\t\tcount--;\n\t\treturn temp;\n\t\t\n\t}", "@Test\n public void deleteByIndex(){\n List <Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n assertEquals(1,(int)list.get(0));\n\n list.remove(0);\n assertEquals(2,(int)list.get(0));\n }", "void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }", "@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}", "public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }", "@Override\n\tpublic int delete(Integer i) {\n\t\treturn 0;\n\t}", "public T remove() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n \r\n T deleted = elements[r];\r\n elements[r] = elements[size() - 1];\r\n elements[size() - 1] = null;\r\n size--;\r\n \r\n if (size() > 0 && size() < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n \r\n return deleted;\r\n }", "@Override\n\tpublic void remove(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\tfor (int i=index; i<size; i++) {\n\t\t\t\tvalues[i] = values[i+1]; //move every value one step left until index (which is overwritten)\n\t\t\t}\n\t\t\tsize--; //decrement size\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}", "@Override\n\tpublic boolean remove(Object o) throws IndexOutOfBoundsException\n\t{\n\t\tint index= 0;\n\t\twhile (myArray[index]!=null && !(myArray[index].equals(o)))\n\t\t\tindex++;\n\t\tif(myArray[index]== null)\n\t\t\treturn false;\n\t\telse\n\t\t{\n\t\t\twhile(index < size)\n\t\t\t{\n\t\t\t\tmyArray[index] = myArray[index+1];\n\t\t\t\tmyArray[index+1] = null;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n\t\t\t\n\t\t/*\n\t\tmyArray[index] = null;\n\t\tint temp = index;\n\t\twhile(index < size)\n {\n \tmyArray[index] = myArray[index+1];\n \tmyArray[index+1] = null;\n index++;\n }*/\n size--;\n \n\t\n\t\t\n\t\treturn false;\n\t}", "public T deleteMax()\n\t{\n\t\tint maxIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif(size == 1)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\t\t}\n\t\tif(size == 2)\n\t\t{\n\n\t\t\tT wemp = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn wemp;\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT femp ;\n\t\t\tif(object.compare(array[1], array[2]) >0)\n\t\t\t{\n\t\t\t\tfemp = array[1];\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfemp = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\n\t\t}\n\t\tint index = 0;\n\t\tif(object.compare(array[1], array[2]) >= 0)\n\t\t{\n\t\t\tindex = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tindex = 2;\n\t\t}\n\n\t\tT temp = array[index];\n\t\tarray[index] = array[size -1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\n\t\tint max = max(index).get(0);\n\t\twhile(max != 0)\n\t\t{\n\t\t\tif(object.compare(array[index], array[max]) >= 0)\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif( max(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[max];\n\t\t\tarray[max] = lemp;\n\n\n\t\t\tindex = max;\n\t\t\tmax = max(max).get(0);\n\t\t}\n\n\t\tif(flag == true)\n\t\t{\n\n\t\t}\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\t\t\tif(getLevel(index+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMax(2*index+1, 2*index+2)]) < 0 && grandChildMax(2*index+1, 2*index+2) != 0)\n\t\t{\n\t\t\tmaxIndex = grandChildMax(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[maxIndex];\n\t\t\tarray[maxIndex] = wemp;\n\t\t\tint y = maxIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[(index-1)/2]) < 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t\treturn temp;\n\t}", "@Override\n\tpublic T remove(int index) {\n\t\t// TODO check if index is withing the correct range\n\t\t// If not, return null\n\t\t// otherwise , do the same as above\n\t\tif (index >= 0 && index < size) {\n\t\t\tT item = data[index];\n\t \t\tfor(int i=index;i<size-1;i++)\n\t \t\t\tdata[i] = data[i+1];\n\t \t\tsize--;\n\t \t\treturn item;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}", "public int Delete()\n\t{\n\t\tif(isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Queue Underflow\");\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\t\n//\t\tremoves element from front end\n\t\tint x=queueArray[front];\n\t\t\n//\t\tif queue has only one element\n\t\tif(front==rear)\n\t\t{\n\t\t\tfront = -1;\n\t\t\trear = -1;\n\t\t}\n\t\t\n//\t\tif front is equal to last index of array\n\t\telse if (front==queueArray.length-1)\n\t\t\tfront=0;\n\t\telse\n//\t\t\tincremements front\n\t\t\tfront=front+1;\n\t\treturn x;\n\t}", "public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }", "public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }", "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "@Override\n public Node<T> remove(int i)\n {\n Node[] removeNodes = super.removeAlt(i);\n if(i == 0) lastNode.setNext(removeNodes[REMOVE_NEW_INDEX]);\n else if(i == size) lastNode = removeNodes[REMOVE_NEW_INDEX];\n return removeNodes[REMOVE_NODE_INDEX];\n }", "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//loop to execute for every element after the current element in the list\r\n\t\t\t\tfor (int j=i+1;j<size;j++) {\r\n\t\t\t\t\t//checks if there is are 2 elements in the list with the same value\r\n\t\t\t\t\tif (element==list[j]) {\r\n\t\t\t\t\t\tremove(j);\t//calls function to remove that element from array\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\telse {\t//contains 0 elements\r\n\t\t\tSystem.out.println(\"List is empty!\");\r\n\t\t}\r\n\t}", "public long removeLeft() {\n long temporary = Array[start++];\n if ( start == max ) {\n start = 0;\n }\n nItems--;\n return temporary;\n }", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "public E remove(int index) {\n //first make a copy of the element we are going to remove later\n //so that it can be returned\n E copy = this.array[index];\n \n /*\n * make an if to find out if there is only one element in the array or not\n * if there is, then simply make the array empty\n */\n if (this.array.length == 1) {\n //only one element in the array, so there is nothing to slide over\n this.array = (E[]) new Object[0];\n } else {\n //make a temp array that has one less index than the current array\n Object[] temp = new Object[this.array.length - 1];\n \n //copy everything up to the desired index\n for (int i = 0; i < index; i++) {\n temp[i] = this.array[i];\n }\n \n //now copy all of the other elements after the index, but skip over the desired element to remove\n for (int i = index; i < temp.length; i++) {\n /*\n * take in the element from the next index over from this.array\n * this will automatically skip over the element that we want to remove\n */\n temp[i] = this.array[i + 1];\n }\n \n //set the array to the temp now that the element is removed\n this.array = (E[]) temp;\n }\n \n //return the copy that we created before we removed the element\n return (E) copy;\n }", "@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }", "public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }", "public void deleteIndex(int index) {\n if (index < arraySize) {\n for (int i = index; i < arraySize - 1; i++) {\n theArray[i] = theArray[i + 1];\n }\n arraySize--;\n }\n }", "public void delete_ith_element (int pos) {\n \t \n \t //check if the pos is less than maximum possible value\n \t if (pos > len) {\n \t\t \n \t\t //throw exception for index of bounds\n \t\t throw new IndexOutOfBoundsException(\"your index has reached bounds\");\n \t }\n \t \n \t //now must run loop\n \t else {\n \t\t \n \t //if pos is 0 then just change head\n \t if (pos == 0) {\n \t\t \n \t\t //just change pointer of head next element\n \t\t head = head.show_next();\n \t\t \n \t\t \n \t\t //change prev to null\n \t\t head.change_prev(null);\n \t\t }\n \t \n \t //if pos = len - 1 then just change tail\n \t //if we want to delete last \n \t else if (pos == len -1) {\n\t\t\t \n\t\t\t //just change the last node \n\t\t\t tail = tail.show_prev();\n\t\t\t \n\t\t\t //change next of tail to null\n\t\t\t tail.change_next(null);\n\t\t }\n \n \t //else run for loop to reach node\n \t else {\n \t\t \n \t\t //define the current node as head\n \t\t node<Type> current_node = new node<>();\n \t\t \n \t\t //place current node to head\n \t\t current_node = head;\n \t\t \n \t\t //now run the for loop\n \t\t for(int i = 1 ; i <= pos; i++ ) {\n \t\t\t \n \t\t\t //just update current node\n \t\t\t current_node = current_node.show_next();\n \t\t }\n \t\t //now just delete the node\n //now just set current_node's next element to next next element of current\n \t\t System.out.println(\"we are here\");\n \t\t\n \t\t current_node.show_next().change_prev(current_node.show_prev());\n \t\t \n \t\t //now also change next node of before node\n \t\t current_node.show_prev().change_next(current_node.show_next());\n \t\t \n \t \t}\n \t //decrese length by one\n\t\t len--;\n \t }\n }", "@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }", "public void delete(int i) {\n\t\tfor (int j = i; j < keyCount - 1; j++) {\n\t\t\tkeys[j] = keys[j + 1];\n\t\t\tpointers[j] = pointers[j + 1];\n\t\t}\n\t\tkeys[keyCount - 1] = null;\n\t\tpointers[keyCount - 1] = null;\n\t\tkeyCount--;\n\t}", "public T removeAt(int index) {\n if (index >= size || index < 0) throw new IndexOutOfBoundsException();\n T tempData = genericArrayList[index];\n T[] tempArrayList = (T[]) new Object[size - 1];\n for (int i = 0, j = 0; i < size; i++, j++) {\n if (i == index) j--; // skip over removeAtIndex by fixing j temporarily\n else tempArrayList[j] = genericArrayList[i];\n }\n genericArrayList = tempArrayList;\n capacity = --size;\n return tempData;\n }", "public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }", "int remove(int idx);", "public U remove(U x){\r\n\t \tif (x==null)\r\n\t \t\tthrow new IllegalArgumentException(\"x cannot be null\");\r\n\t \t//find index\r\n\t \tint i = Arrays.binarySearch(array,0, getArraySize(), x);\r\n\t \t//x not found in array\r\n\t \tif (i<0)\r\n\t \t\treturn null;\r\n\t \t//store current element\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//enter loop\r\n\t \twhile(i<numElems-1){\r\n\t \t\t//move element left\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t \t\r\n\t }", "public Object remove (int i)\r\n {\r\n }", "public boolean ListDelete(int i) {\n int j, k;\n if (i<0 || i>ListLength() - 1)\n return false;\n k = MAXSIZE - 1;\n // Find the element,who is in front of the ith element\n for(j=0;j<i;j++)\n k = StaticLinkList[k].cur;\n // q = p->next\n j = StaticLinkList[k].cur;\n // p->next = q->next\n StaticLinkList[k].cur = StaticLinkList[j].cur;\n Free_SSL(j);\n return true;\n }", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}", "@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }", "private void testRemove() {\n System.out.println(\"------ TESTING: remove(int index) -----\");\n try{\n for(int i = 0; i < iSize; i++){\n if(iTestList.remove(0) != i)\n throw new RuntimeException(\"FAILED -> remove not working correctly\");\n }\n\n iTestList.remove(-9);\n iTestList.remove(iSize+10);\n }catch(RuntimeException e){\n System.out.println(e.getMessage());\n }\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "private int remove(int index){\n\t\tremovedItem=heap[index];\n\t\theap[index]=INFINITE;\n\t\tshiftUp(index);\n\t\treturn extractMax();\n\t}", "@Test\n public void testRemoveAtIndexNoResize() {\n //No Resize\n for (int i = 0; i < 9; i++) {\n String input = String.format(\"b0%d\", i);\n list.addToBack(input);\n }\n list.removeAtIndex(4);\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n Assert.assertEquals(\"The list resized when removing an element from a list while at capacity\",\n ArrayList.INITIAL_CAPACITY, actualCapacity);\n\n //With Resize\n list.addToBack(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.removeAtIndex(0);\n list.removeAtIndex(3);\n list.removeAtIndex(8);\n int newActualCapacity = ((Object[]) (list.getBackingArray())).length;\n Assert.assertEquals(\"The list resized when moving from above to below initial capacity.\",\n ArrayList.INITIAL_CAPACITY * 2, newActualCapacity);\n }", "private T unlinkLast(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int prev = getPrevPointer(idx);\r\n\t\tlast = prev;\r\n\t\tif (prev == -1) {\r\n\t\t\tfirst = -1;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(prev, -1);\r\n\t\t}\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "public E remove(int index) {\n if(index > size) return null;\n E element = null;\n for(int i = index+1; i < size; i++) {\n list[i-1] = list[i];\n }\n list[size-1] = null;\n size--;\n return element;\n }", "void delete(int index) throws ListException;", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public static int[] removeTheElement(int[] arr, \r\n int index) \r\n { \r\n \r\n // If the array is empty \r\n // or the index is not in array range \r\n // return the original array \r\n if (arr == null\r\n || index < 0\r\n || index >= arr.length) { \r\n \r\n return arr; \r\n } \r\n \r\n // Create another array of size one less \r\n int[] anotherArray = new int[arr.length - 1]; \r\n \r\n // Copy the elements except the index \r\n // from original array to the other array \r\n for (int i = 0, k = 0; i < arr.length; i++) { \r\n \r\n // if the index is \r\n // the removal element index \r\n if (i == index) { \r\n continue; \r\n } \r\n \r\n // if the index is not \r\n // the removal element index \r\n anotherArray[k++] = arr[i]; \r\n } \r\n \r\n // return the resultant array \r\n return anotherArray; \r\n }", "public T remove(int index) throws IndexOutOfBoundsException {\n checkException(index);\n System.arraycopy(arr, index + 1, arr, index, size - index - 1);\n T elem = arr[--size];\n arr[size] = null;\n return elem;\n }", "public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }", "private Node remove(int i) {\n Node result = null;\n int len = this.getlength();\n if (i >= len) {\n System.out.println(\"out of range exception\");\n return this;\n } else {\n if (i == 0) {\n result = this.nextNode;\n return result;\n } else {\n result = this;\n Node cur = this;\n for (int j = 0; j < i - 1; j++) {\n cur = cur.nextNode;\n }\n cur.nextNode = cur.nextNode.nextNode;\n }\n return result;\n }\n }", "public Message remove() \n { \n Message r = elements[head]; \n head = (head + 1) % elements.length; \n count--; \n return r; \n }", "public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }", "@Override\n\tpublic Object remove(int index) throws IndexOutOfBoundsException\n\t{\n\t\t\n\t\tif(index < size)\n\t\t{\n Object o = myArray[index];\n if(index < size)\n System.arraycopy(myArray, index + 1, myArray, index, size - index - 1);\n myArray[size - 1] = null;\n size--;\n //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n return o;\n } \n\t\telse \n throw new ArrayIndexOutOfBoundsException();\n\t}", "public Item deleteAtEnd() {\n \tItem returnItem = tail.item; \t\n \ttail = tail.previous;\n \thead.previous = tail;\n \tsize--;\n \treturn returnItem;\n }", "@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }", "protected void removeByIndex(int index) {\n int h = head;\n int t = tail;\n size = size - 1;\n int present = dequeue.length - 1;\n int offset = (index - h) & present;\n int finish = (tail - index) & present;\n\n if (offset < finish) {\n if (h <= index) {\n System.arraycopy(dequeue, h, dequeue, h + 1, offset);\n } else {\n System.arraycopy(dequeue, 0, dequeue, 1, index);\n dequeue[0] = dequeue[present];\n System.arraycopy(dequeue, h, dequeue, h + 1, present - h);\n }\n dequeue[h] = null;\n head = (h + 1) & present;\n } else {\n if (index < t) {\n System.arraycopy(dequeue, index + 1, dequeue, index, finish);\n tail = t - 1;\n } else {\n System.arraycopy(dequeue, index + 1, dequeue, index, present - index);\n dequeue[present] = dequeue[0];\n System.arraycopy(dequeue, 1, dequeue, 0, t);\n tail = (t - 1) & present;\n }\n }\n }", "public boolean delete(int i) {\r\n\t\tif (i >= theHeap.size() || i < 0)\r\n\t\t\treturn false;\r\n\t\tInteger minimo = (Integer) getValue(i) - (Integer) getMin() + 1;\r\n\t\tdecreaseKey(i, minimo);\r\n\t\tremoveMin();\r\n\t\treturn true;\r\n\t}", "public long removeRight() {\n long temporary = Array[end--];\n if ( end == -1 ) {\n end = max-1;\n }\n nItems--;\n return temporary;\n }", "@Override\n\tpublic E remove(int idx) {\n\t\tif (idx < 0 || idx >= size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tE element = null;\n\t\telement = list[idx];\n\t\tif (idx == size - 1) {\n\t\t\tlist[idx] = null;\n\t\t} else {\n\t\t\tfor (int i = idx; i < size - 1; i++) {\n\t\t\t\tlist[i] = list[i + 1];\n\t\t\t}\n\t\t\tlist[size - 1] = null;\n\t\t}\n\t\tsize--;\n\t\treturn element;\n\t}", "public E remove (int index)\n { E item;\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n if (index == 0)\n item = removeFirst( );\n else {\n Node<E> node = getNode(index - 1);\n item = removeAfter(node);\n }\n return item; // return the deleted value\n }" ]
[ "0.7141458", "0.7060815", "0.69998246", "0.6953466", "0.6941567", "0.6910266", "0.6890521", "0.6876222", "0.68196744", "0.67903054", "0.6752407", "0.6749188", "0.67486656", "0.6744572", "0.6706654", "0.66449016", "0.6524177", "0.6502221", "0.64995706", "0.6489438", "0.6461676", "0.6457979", "0.6439399", "0.6437932", "0.63772994", "0.63653207", "0.6360739", "0.63602716", "0.6333946", "0.63063526", "0.63041604", "0.62905174", "0.62884367", "0.62717813", "0.6256973", "0.6243743", "0.62214684", "0.6215432", "0.6209125", "0.6181432", "0.6170885", "0.6154686", "0.6152257", "0.61483514", "0.61324155", "0.6131393", "0.6130224", "0.6129819", "0.6122011", "0.60964376", "0.60912097", "0.6089159", "0.60839057", "0.6083662", "0.60720074", "0.6039458", "0.60310924", "0.60216355", "0.60206294", "0.6010329", "0.5999237", "0.599883", "0.59804064", "0.59563893", "0.59481966", "0.59454024", "0.5939383", "0.5938103", "0.5935042", "0.5931622", "0.5930742", "0.5929343", "0.5911434", "0.5910941", "0.5906001", "0.59042835", "0.58995855", "0.5897401", "0.58932686", "0.588698", "0.58865684", "0.5878687", "0.587776", "0.5871281", "0.5864945", "0.5863336", "0.58521587", "0.5850233", "0.5846779", "0.5846354", "0.5829435", "0.58269197", "0.58223355", "0.5808433", "0.5783938", "0.5783079", "0.57722944", "0.57707393", "0.5760099", "0.5758455" ]
0.7802273
0
method deleteFirst() remove the first element from the list it creates new array with the same length, then it copies all elements except the first and return the value of deleted element Time Complexity is O(n) linear
public T deleteFirst() { Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue = null; // save value of element that will be deleted if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + 0 + " | Size of the Dynamic Array " + 0); } else if (size == 1) { // if size is 1 deletedValue = (T) elements[0]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[0]; // save value of deleted element for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1 newElements[i] = elements[i + 1]; // copy elements in temporary array } elements = newElements; // move temporary array to main array "elements" } size--; // decrement size return deletedValue; // return value of element that will be deleted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public void deleteFirst() {\r\n\t\t// Can't delete from an empty list\r\n\t\tif (isEmpty()) {\r\n\t\t\tSystem.out.println(\"Error in List.deleteFirst() \"\r\n\t\t\t\t\t+ \"Attempted delete from Empty List \");\r\n\t\t}\r\n\r\n\t\t// Special case: list has only one element\r\n\t\telse if (length == 1) {\r\n\t\t\tfirstNode = null;\r\n\t\t\tlastNode = null;\r\n\t\t\tlength = 0;\r\n\t\t}\r\n\t\t// All other lists: Only first pointer changes. Last doesn't\r\n\t\telse {\r\n\t\t\tfirstNode = firstNode.getNextNode();\r\n\t\t\tlength--;\r\n\t\t}\r\n\t}", "@Override\n public E deleteMin()\n {\n return list.removeFirst();\n }", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "Object removeFirst();", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Item removeFirst() {\n //check if the DList is empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeFirst() bacause the DList instance is empty!\");\n Node oldFirst = first.next;\n Item item = oldFirst.data; \n\n // pointer re-wiring:\n Node newFirst = oldFirst.next; \n first.next = newFirst;\n newFirst.prev = first;\n oldFirst.next = null;\n oldFirst.prev = null;\n\n // check if last pointer has to be updated or not (paying the peiper):\n if(isEmpty()) {\n last.prev = first; // update the last sentinel node to point to the first sentinel node\n }\n\n // update the size: \n size--;\n\n return item;\n }", "public T removeFirst();", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//loop to execute for every element after the current element in the list\r\n\t\t\t\tfor (int j=i+1;j<size;j++) {\r\n\t\t\t\t\t//checks if there is are 2 elements in the list with the same value\r\n\t\t\t\t\tif (element==list[j]) {\r\n\t\t\t\t\t\tremove(j);\t//calls function to remove that element from array\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\telse {\t//contains 0 elements\r\n\t\t\tSystem.out.println(\"List is empty!\");\r\n\t\t}\r\n\t}", "public void deleteFirst() {\r\n\t\tif(isEmpty()) return;\r\n\t\t// if there is only element in the Deque, then deleting it will make front and rear point to invalid positions again\r\n\t\telse if( rear==front) front = rear = -1;\r\n\t\t// else increment the front pointer\r\n\t\telse front = (front+1)%maxSize;\r\n\t}", "public E removeFirst();", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "final void deleteFirst(int elt) {\n if (contents != null && n >= 0 && n <= contents.length){\n int[] new_contents;\n //@ loop_invariant (i <= n);\n for (int i = 0; i < n; i++) {\n if (contents[i] == elt) {\n n--;\n new_contents = new int[contents.length];\n arraycopy(contents, 0, new_contents, 0, i);\n arraycopy(contents, i+1, new_contents, i, n-i);\n contents = new_contents;\n return;\n }\n }\n }\n }", "private static Node deleteFirst(Node head) {\n if (head == null) {\n return null;\n }\n Node current = head;\n\n // only one element\n if (current.next == head) {\n head.next = null; // or head = null is fine for GC\n return null;\n }\n\n while(current.next != head) {\n current = current.next;\n }\n // removing head from list\n current.next = head.next;\n // prevent memory leak\n head.next = null;\n head = current.next;\n return head;\n }", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public Object removeFirst(){\n if (first == null)\n throw new NoSuchElementException();\n Object element = first.data;\n first = first.next;\n return element ;\n }", "public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}", "public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }", "private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public Item removeFirst(){\n return this.doublyLinkedList.removeFirst();\n }", "public void deleteFirst() {\r\n\t\tif(isEmpty()) return;\r\n\t\thead = head.next;\r\n\t}", "public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }", "public E removeFirst() throws NoSuchElementException{\n if(size == 0)\n throw new NoSuchElementException();\n else{\n E removedElement = head.getNext().getElement();\n head.setNext(head.getNext().getNext());\n head.getNext().setPrevious(head);\n size--;\n return removedElement;\n }\n }", "public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }", "public static native long RemoveFirst(long lpjFbxArrayVector2);", "public Item removeFirst() {\n Item val = deck[fFront];\n deck[fFront++] = null;\n return val;\n }", "public synchronized DoubleLinkedListNodeInt removeFirst() {\n\t\tDoubleLinkedListNodeInt node = getFirst();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public Item deleteAtStart() { \t\n \tItem returnItem = head.item;\n \thead = head.next;\n \ttail.next = head;\n \tsize--;\n \treturn returnItem;\n }", "public PersistentLinkedList<T> removeFirst() {\n return remove(0);\n }", "public Item removeFirst() {\n\t\tif (first == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = first.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tfirst = first.next;\n\t\t\tfirst.previous = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public Item removeFirst() {\n if (!isEmpty()) {\n Item item = first.item;\n first = first.back;\n size--;\n if (size != 0)\n first.front = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n }", "public Item removeFirst() {\n if (first == null)\n throw new NoSuchElementException();\n \n final Item element = first.item;\n final Node<Item> next = first.next;\n first.item = null;\n first.next = null; // help GC\n first = next;\n if (next == null)\n last = null;\n else\n next.prev = null;\n size--;\n \n return element;\n }", "public Node<E> remove_first_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = new Node<E>(theData.get(0).getData());\r\n item.data = theData.get(0).getData();\r\n item.count = theData.get(0).getCount();\r\n\r\n if (theData.get(0).count == 1 ){\r\n\r\n if(0 != theData.size()-1){\r\n theData.set(0, theData.remove(theData.size() - 1));\r\n fixHeap(0);\r\n }else {\r\n theData.remove(theData.size() - 1);\r\n }\r\n\r\n\r\n }else{\r\n theData.get(0).count-=1;\r\n remove_first_node();\r\n }\r\n\r\n return item;\r\n }", "public T remove() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n \r\n T deleted = elements[r];\r\n elements[r] = elements[size() - 1];\r\n elements[size() - 1] = null;\r\n size--;\r\n \r\n if (size() > 0 && size() < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n \r\n return deleted;\r\n }", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "public T deleteMin()\n {\n // to handle empty excpetion\n if(size == 0)\n {\n throw new MyException(\"Heap is empty.\");\n }\n\n // create int hole, set to 0\n int hole = 0;\n // create return value as the item at index hole\n T returnValue = arr[hole];\n // create item to be last item of heap\n T item = arr[size-1];\n // decrement size\n size--;\n // call newHole() method to get newhole\n int newhole = newHole(hole, item);\n while(newhole != -1)\n {\n // set value of arr[newhole] to be arr[hole]\n arr[hole] = arr[newhole];\n // hole is now whatever newhole was\n hole = newhole;\n // update newhole by calling newHole()\n newhole = newHole(hole, item);\n }\n // put item where the hole is in the heap\n arr[hole] = item;\n return returnValue;\n }", "public Double remove() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\tDouble temp = arr[0];\n\t\t\tarr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\t\treturn temp;\n\t\t}\n\t\tthrow new NoSuchElementException();\n\t}", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public T removeFirst() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currFirst = sentinel.next;\r\n Node<T> toBeFirst = currFirst.next;\r\n T currFirstVal = currFirst.getValue();\r\n toBeFirst.prev = sentinel;\r\n sentinel.next = toBeFirst;\r\n currFirst = null;\r\n size--;\r\n return currFirstVal;\r\n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public static Triangle[] delSmallest(Triangle[] sa){\r\n\t\tdouble smallest = sa[0].calcPeri();//set first shape to smallest\r\n\t\tint currentIndex=0; //tracks current traversing index \r\n\t\tint smallestIndex=0;//holds index of last known smallest shape\r\n\t\tfor(Shape sh : sa) {\r\n\t\t\tif(sh==null){break;}//null array index exception workaround\r\n\t\t\tif (sh.calcPeri() < smallest){\r\n\t\t\t\tSystem.out.println(sh + \" Is smaller than \" + smallest);\r\n\t\t\t\tsmallest = sh.calcPeri();//if another shape is smaller, replace it as smallest\r\n\t\t\t\tsmallestIndex=currentIndex;//confirm the new current smallest index\r\n\t\t\t\tcurrentIndex++;//increment index counter for future catches\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tcurrentIndex++;//if this shape is not larger, increment index counter\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(sa[smallestIndex] + \" Is the smallest element in the array\");\r\n\t\tTriangle newArrayValues[] = new Triangle[99]; //new array to store everything but smallest shape\r\n\t\tint steadyIndex =0; //used to move over data without skipping an element position\r\n\r\n\t\tfor(int i=0; i < sa.length; i++){\r\n\t\t\t\r\n\t\tif(i == smallestIndex) { \r\n\t\t\tSystem.out.println(\"Skipping smallest shape: \" + sa[smallestIndex]); \r\n\t\t\tcontinue;\r\n\t\t}//skip this element\r\n\t\t\r\n\t\tif(sa[i] == null ) {break; } //end of shapes in array , stop copying\r\n\t\t\r\n\t\tnewArrayValues[steadyIndex] = sa[i]; //copy valid index into new array , compensating for index counter as one element is removed\r\n\t\tsteadyIndex++; //increment the index for the new array\r\n\t\t}\r\n\t\treturn newArrayValues;\r\n\t}", "public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }", "public T removeFirst() throws EmptyCollectionException\n //PRE: list is not empty\n //POS: first node is removed / list has one less node\n //TAS: remove first element and return it\n \n //if (count == 1)\n //{\n // T result = head.getElement();\n // head = null;\n // tail = null;\n // return result;\n //}\n //else {\n // T result = head.getElement();\n // head = head.getNext();\n // count--;\n // return result;\n // }\n \n }\n {\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n result = front.getElement();\n front = front.getNext();\n count--;\n\n if(isEmpty()){\n // reset rear after removing the last node\n rear = null;\n }\n\n return result;\n }", "public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }", "public T deleteLast() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue; //\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[elements.length - 1]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) // treat all elements except the last one\n newElements[i] = elements[i]; // copy elements in temporary array\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return previous value of last element\n }", "public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }", "void remove(int index) {\n\t\tfor (int i = index; i < array.length - 1; i++) {\n\t\t\tarray[i] = array[i + 1];\n\t\t}\n\t\tint[] temp = new int[array.length - 1];\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\ttemp[i] = array[i];\n\t\t}\n\t\tint lastValue = array[array.length - 1];// index starts @ 0, so its the\n\t\t\t\t\t\t\t\t\t\t\t\t// array.length - 1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t// for the 0\n\t\tarray = temp;\n\n\t}", "public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n ArrayList<Integer> arrayList=new ArrayList<>();\n\n arrayList.add(1);\n arrayList.add(1);\n arrayList.add(2);\n arrayList.add(5);\n\n\n System.out.println(arrayList);\n System.out.println(arrayList.remove(1));\n System.out.println(arrayList);\n\n }", "public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }", "public void deleteFirst(){\n\t\tDLLNode<T> newNode = head;\n\t\t//if the list is empty\n\t\tif ( size == 0 ){\n\t\t\t//set both the head and tail to null\n\t\t\thead = null;\n\t\t\ttail = null;\n\t\t\t//size decreases by 1\n\t\t\tsize--;\n\t\t}\n\t\telse{\n\t\t\t//assign head to the following node\n\t\t\thead = head.getNext();\n\t\t\t//set the previous node (ex-head) to null\n\t\t\thead.setPrev( null );\n\t\t\t//size decreases by 1\n\t\t\tsize--;\n\t\t}\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else {\n first.pre = null;\n }\n len--;\n return item;\n }", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }", "public Node deleteFirst() {\n\n\t\tif (first == null) { // means LinkedList in empty, throw exception.\n\t\t\tthrow new LinkedListEmptyException(\n\t\t\t\t\t\"LinkedList doesn't contain any Nodes.\");\n\t\t}\n\n\t\tNode tempNode = first;\n\t\tif (first.next == null) // if only one item\n\t\t\tlast = null; // null <-- last\n\t\telse\n\t\t\tfirst.next.previous = null; // null <-- old next\n\t\tfirst = first.next; // first --> old next\n\t\treturn tempNode;\n\t}", "protected int removeFirst() throws Exception {\n if (size > 0) {\n int temp = heap[1];\n heap[1] = heap[size];\n heap[size] = 0;\n size--;\n return temp;\n } else {\n throw new Exception(\"No Item in the heap\");\n }\n }", "public E removeFirst() {\n\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(mHead.next);\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public Item removeFirst() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = first.item;\n first = first.next;\n if (first != null)\n first.prev = null;\n else\n last = first;\n size--;\n return item;\n }", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }", "public void removefirst()\r\n {\r\n Item item = pre.item;\r\n pre = pre.next;\r\n n--;\r\n }", "private T unlinkFirst(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int next = getNextPointer(idx);\r\n\t\tfirst = next;\r\n\t\tif (next == -1) {\r\n\t\t\tlast = -1;\r\n\t\t} else {\r\n\t\t\tsetPrevPointer(next, -1);\r\n\t\t}\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public void deleteFirst() {\n\t\t\n\t\tif (head !=null) {\n\t\t\t// we have 1 or more node in LL\n\t\t\t\n\t\t\t// check if we have only 1 node\n\t\t\tif(this.head.next == null) {\n\t\t\t\t// yes we have onlu 1 node in LL\n\t\t\t\t//delete that node and make head = null\n\t\t\t\tNode temp = this.head;\n\t\t\t\tthis.head = null;\n\t\t\t\t\n\t\t\t\t// java dont have delete.... so just make object ref as null\n\t\t\t\t// GC will delete this object ASAP\n\t\t\t\ttemp.next = null;\n\t\t\t\ttemp = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// we have more than 1 node\n\t\t\t\tNode temp = this.head;\n\t\t\t\tthis.head =temp.next;\n\t\t\t\t\n\t\t\t\ttemp.next= null;\n\t\t\t\ttemp=null;\n\t\t\t}\n\t\t}\n\t}", "public Object removeFirst(){\n //Check if there is data to be removed, if not return null\n if(size == 0){\t//size 0 indicates no data in the linkedlist\n return null;\n }\n MovieNode removed = head.next;\n head.next = head.next.next;\n size--;\n return removed.data;\n }", "public AnyType deleteMin() throws NoSuchElementException {\n\t\t\n\t\t// if the heap is empty, throw a NoSuchElementException\n\t\tif(this.size() == 0){\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\n\t\t// store the minimum item so that it may be returned at the end\n\t\tAnyType minValue = this.findMin();\n\n\t\t// replace the item at minIndex with the last item in the tree\n\t\tAnyType lastValue = this.array[this.size()-1];\n\t\tthis.array[0] = lastValue;\n\t\tthis.array[this.size() - 1] = null;\n\t\t\n\t\t// update size\n\t\tthis.currentSize--;\n\n\t\t// percolate the item at minIndex down the tree until heap order is restored\n\t\t// It is STRONGLY recommended that you write a percolateDown helper method!\n\t\tthis.percolateDown(0);\n\t\t\n\t\t// return the minimum item that was stored\n\t\treturn minValue;\n\t}", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public E removeFirst(){\r\n return null;\r\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldFirst = this.first;\n this.first = oldFirst.next;\n this.size--;\n\n if (this.size != 0) {\n this.first.prev = null;\n } else {\n this.last = null;\n }\n\n return oldFirst.item;\n }", "private static int[] removeTheElement(int[] arr, \n int index) \n { \n \n // If the array is empty \n // or the index is not in array range \n // return the original array \n if (arr == null\n || index < 0\n || index >= arr.length) { \n \n return arr; \n } \n \n // Create another array of size one less \n int[] anotherArray = new int[arr.length - 1]; \n \n // Copy the elements except the index \n // from original array to the other array \n for (int i = 0, k = 0; i < arr.length; i++) { \n \n // if the index is \n // the removal element index \n if (i == index) { \n continue; \n } \n \n // if the index is not \n // the removal element index \n anotherArray[k++] = arr[i]; \n } \n \n // return the resultant array \n return anotherArray; \n }", "public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }", "void deleteFromFirst(){\r\n\t\tif (start==null){\r\n\t\t\tSystem.out.print(\"LL is empty\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tnode temp=start;\r\n\t\t\tstart=start.next;\r\n\t\t\tSystem.out.print(temp.data+\" is going to be deleted\");\r\n\t\t\ttemp=null;\r\n\t\t}\r\n\t}", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = first.item; // save item to return\n first = first.next; // delete first node\n if (first == null) {\n last = null;\n } else {\n first.previous = null;\n }\n size--;\n if (isEmpty()) {\n last = null;\n }\n assert check();\n return item; // return the saved item\n }", "public Item removeFirst() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = first.item;\n\t\tNode nextNode = first.next;\n\t\tfirst = null;\n\t\tif (count > 0) {\n\t\t\tfirst = nextNode;\n\t\t} \n\t\treturn target;\n\t}", "@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }", "public T deleteMin()\n\t{\t\n\t\t//declating variables\n\t\tint minIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\t//if size == 0; returns null\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//if checks size and deletes accordingly.\n\t\tif(size == 1)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn tempo;\n\n\t\t}\n\n\t\tif(size == 2)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tint small = grandChildMin(1, 2);\n\t\t\tarray[0] = array[small];\n\t\t\tif(small == 2)\n\t\t\t{\n\t\t\t\tarray[small] = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t}\n\n\t\t\tsize--;\n\t\t\treturn tempo;\n\t\t}\n\n\t\t//if size > 3 does sophisticated deleting\n\t\tT temp = array[0];\n\t\tarray[0] = array[size-1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\t\tint index = 0;\n\n\t\t//gets the smallest of the children & grandchildren\n\t\tint smallest = min(index).get(0);\n\t\t//while it has grandchildren, keeps going\n\t\twhile(smallest != 0)\n\t\t{\n\t\t\t//doesn't switch if im less than the smallest grandchild\n\t\t\t//& breaks\n\t\t\tif(object.compare(array[index], array[smallest]) <= 0 )\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//special case when i could switch with child or grandchild\n\t\t\tif( min(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t}\n\n\t\t\t//switches the locations and updates index\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[smallest];\n\t\t\tarray[smallest] = lemp;\n\t\t\tindex = smallest;\n\t\t\tsmallest = min(smallest).get(0);\n\n\t\t}\n\t\t//if i dont switch, i check if i have to switch then percolate back up\n\t\tif(flag == true)\n\t\t{\n\t\t\tif(object.compare(array[index], array[grandChildMin(2*index+1, 2*index+2)]) > 0)\n\t\t\t{\n\t\t\t\tint mIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\t\tT k = array[mIndex];\n\t\t\t\tarray[mIndex] = array[index];\n\t\t\t\tarray[index] = k;\n\n\t\t\t\tint y = mIndex;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT f = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = f;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[(index-1)/2]) > 0)\n\t\t\t{\n\t\t\t\tT m = array[(index-1)/2];\n\t\t\t\tarray[(index-1)/2] = array[index];\n\t\t\t\tarray[index] = m;\n\t\t\t\tint y = (index-1)/2;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\n\t\t\tif(getLevel(y+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMin(2*index +1, 2*index+2)]) > 0 && grandChildMin(2*index +1, 2*index+2) != 0)\n\t\t{\n\t\t\tminIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[minIndex];\n\t\t\tarray[minIndex] = wemp;\n\n\t\t\tint y = minIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if (object.compare(array[index], array[(index-1)/2]) > 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn temp;\n\t}", "void deleteMin() {\n delete(keys[0]);\n }", "@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }", "public List Delete(Element e){\n\tList my_head ;\n\tboolean ret_val ;\n\tboolean aux05;\n\tList aux01 ;\n\tList prev ;\n\tboolean var_end ;\n\tElement var_elem ;\n\tint aux04 ;\n\tint nt ;\n\n\n\tmy_head = this ;\n\tret_val = false ;\n\taux04 = 0 - 1 ;\n\taux01 = this ;\n\tprev = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile ((!var_end) && (!ret_val)){\n\t if (e.Equal(var_elem)){\n\t\tret_val = true ;\n\t\tif (aux04 < 0) { \n\t\t // delete first element\n\t\t my_head = aux01.GetNext() ;\n\t\t} \n\t\telse{ // delete a non first element\n\t\t System.out.println(0-555);\n\t\t aux05 = prev.SetNext(aux01.GetNext());\n\t\t System.out.println(0-555);\n\t\t \n\t\t}\n\t } else nt = 0 ;\n\t if (!ret_val){\n\t\tprev = aux01 ;\n\t\taux01 = aux01.GetNext() ;\n\t\tvar_end = aux01.GetEnd();\n\t\tvar_elem = aux01.GetElem();\n\t\taux04 = 1 ; \n\t } else nt = 0 ;\n\t}\n\treturn my_head ;\n }" ]
[ "0.762808", "0.75744194", "0.74974054", "0.7362861", "0.72758067", "0.72700375", "0.7225714", "0.71543056", "0.7116029", "0.70964634", "0.70806473", "0.70797306", "0.70456654", "0.68774724", "0.6856541", "0.68331033", "0.67669076", "0.67483455", "0.67129433", "0.66963696", "0.668826", "0.6683793", "0.66604286", "0.6640758", "0.6623587", "0.6570053", "0.65670395", "0.6543032", "0.65288347", "0.6494891", "0.6477699", "0.64621174", "0.6430084", "0.6419569", "0.64104617", "0.63784015", "0.6375194", "0.6365705", "0.63630927", "0.636244", "0.6356624", "0.6350429", "0.6348977", "0.6346695", "0.6337965", "0.633783", "0.63345", "0.6325848", "0.6321501", "0.6312113", "0.6305604", "0.6296649", "0.629213", "0.6290623", "0.6280889", "0.62687", "0.6262497", "0.62603885", "0.6250853", "0.6250423", "0.62376875", "0.6235322", "0.62012094", "0.6196154", "0.6186268", "0.6182951", "0.61704713", "0.61697376", "0.6162658", "0.6162511", "0.6159242", "0.61526924", "0.6151342", "0.6149894", "0.6148419", "0.61464983", "0.6137857", "0.61346805", "0.6131637", "0.61227727", "0.61166966", "0.611048", "0.6109145", "0.6104238", "0.6103351", "0.60963887", "0.60820675", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947", "0.60814947" ]
0.8263776
0
method deleteLast() remove the last element from the list it creates new array with the same length, then it copies all elements except the last and return the value of deleted element Time Complexity is O(n) linear
public T deleteLast() { Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue; // if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + 0 + " | Size of the Dynamic Array " + 0); } else if (size == 1) { // if size is 1 deletedValue = (T) elements[elements.length - 1]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[elements.length - 1]; // save value of deleted element for (int i = 0; i < size - 1; i++) // treat all elements except the last one newElements[i] = elements[i]; // copy elements in temporary array elements = newElements; // move temporary array to main array "elements" } size--; // decrement size return deletedValue; // return previous value of last element }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rear + 1, array.length)];\n }", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "public T deleteFirst() {\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + 0 + \" | Size of the Dynamic Array \" + 0);\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[0]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[0]; // save value of deleted element\n for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1\n newElements[i] = elements[i + 1]; // copy elements in temporary array\n }\n elements = newElements; // move temporary array to main array \"elements\"\n }\n size--; // decrement size\n return deletedValue; // return value of element that will be deleted\n }", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }", "public E removeLast();", "public Item removeLast() {\n Item last = items[size];\n items[size] = null;\n size -= 1;\n return last;\n }", "public Item removeLast() {\n // check if the DList is already empty or not:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perform removeLast() because the DList instance is empty!\");\n if(size==1) return removeFirst(); // if there is only one element in the DList instance, call removeFirst\n\n // O.W.\n Node oldLast = last.prev;\n Item item = oldLast.data;\n \n // pointer re-wrining:\n Node newLast = oldLast.prev;\n last.prev = newLast;\n newLast.next = last;\n oldLast.next = null;\n oldLast.prev = null; \n\n // update size feild:\n size--;\n return item;\n }", "public T removeLast();", "abstract public void removeLast();", "public T removeLast() {\n if (size() == 0) {\n return null;\n }\n nextLast = minusOne(nextLast);\n size -= 1;\n T toRemove = items[nextLast];\n items[nextLast] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "@Override\n public void deleteLast() {\n if (this.isEmpty()) {\n throw new IllegalStateException(\"List is Empty\");\n }\n data[size - 1] = null;\n size--;\n }", "public T removeLast()\r\n {\r\n T removedData; // holds data from removed node\r\n Node<T> walker; // for traversing the list\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = rear.data;\r\n if (numElements == 1)\r\n front = rear = null;\r\n else\r\n {\r\n walker = front; \r\n while (walker.next != rear)\r\n {\r\n walker = walker.next;\r\n }\r\n walker.next = null;\r\n rear = walker;\r\n }\r\n \r\n numElements--;\r\n return removedData;\r\n }", "public Item removeLast();", "public T removeLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> node = endMarker.prev;\r\n\t\ttry{\r\n\t \tmodCount++;\r\n\t \tnumAdded--;\r\n\t \t//calls nested method\r\n\t\t\treturn node.removeLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\t//empty node\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "public T removeLast() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n else if (size == 1) {\r\n \r\n T deleted = front.element;\r\n front = null;\r\n last = null;\r\n size--;\r\n return deleted;\r\n }\r\n \r\n else {\r\n Node n = front;\r\n \r\n while (n.next.next != null) {\r\n n = n.next;\r\n }\r\n \r\n \r\n T deleted = n.next.element;\r\n n.next = null;\r\n last = n;\r\n size--;\r\n return deleted;\r\n }\r\n \r\n }", "public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}", "@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public static native long RemoveLast(long lpjFbxArrayVector2);", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = last.item;\n if (size() == 1) {\n first = null;\n last = null;\n }\n else {\n last = last.prev;\n last.next = null;\n\n }\n size--;\n return a;\n\n\n }", "public T removeLast() {\n if (_size == 0)\n throw new NoSuchElementException();//If nothing to remove, you cant remove\n T ret = _end.getCargo();\n _end = _end.getBefore();//set end to the thing before end\n _size--;\n return ret;\n }", "public Item removeLast(){\n return this.doublyLinkedList.removeLast();\n }", "public Item deleteAtEnd() {\n \tItem returnItem = tail.item; \t\n \ttail = tail.previous;\n \thead.previous = tail;\n \tsize--;\n \treturn returnItem;\n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public Item removeLast() {\n\t\tif (last == null) {\n\t\t\tthrow new java.util.NoSuchElementException();\n\t\t}\n\t\tItem temp = last.item;\n\t\tif (first == last) {\n\t\t\tlast = null;\n\t\t\tfirst = null;\n\t\t} else {\n\t\t\tlast = last.previous;\n\t\t\tlast.next = null;\n\t\t}\n\t\tsize--;\n\t\treturn temp;\n\t}", "public synchronized DoubleLinkedListNodeInt removeLast() {\n\t\tDoubleLinkedListNodeInt node = getLast();\n\t\tif(node != null){\n\t\t\tnode.remove();\n\t\t}\n\t\treturn node;\n\t}", "public Item removeLast() {\n Item val = deck[bFront];\n deck[bFront--] = null;\n return val;\n }", "public T removeLast()throws EmptyCollectionException;", "public boolean deleteLast() {\n if (isEmpty()) {\n return false;\n } else {\n elements[front++] = -1;\n return true;\n }\n }", "public T removeLast() \r\n {\r\n if (isEmpty()) throw new NoSuchElementException();\r\n Node<T> currLast = sentinel.prev;\r\n Node<T> toBeLast = currLast.prev;\r\n T currLastVal = currLast.getValue();\r\n toBeLast.next = sentinel;\r\n sentinel.prev = toBeLast;\r\n currLast = null;\r\n size--;\r\n return currLastVal;\r\n }", "public T deleteMax()\n\t{\n\t\tint maxIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif(size == 1)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\t\t}\n\t\tif(size == 2)\n\t\t{\n\n\t\t\tT wemp = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn wemp;\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT femp ;\n\t\t\tif(object.compare(array[1], array[2]) >0)\n\t\t\t{\n\t\t\t\tfemp = array[1];\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfemp = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t\tsize--;\n\t\t\t\treturn femp;\n\t\t\t}\n\n\t\t}\n\t\tint index = 0;\n\t\tif(object.compare(array[1], array[2]) >= 0)\n\t\t{\n\t\t\tindex = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tindex = 2;\n\t\t}\n\n\t\tT temp = array[index];\n\t\tarray[index] = array[size -1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\n\t\tint max = max(index).get(0);\n\t\twhile(max != 0)\n\t\t{\n\t\t\tif(object.compare(array[index], array[max]) >= 0)\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif( max(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[max];\n\t\t\tarray[max] = lemp;\n\n\n\t\t\tindex = max;\n\t\t\tmax = max(max).get(0);\n\t\t}\n\n\t\tif(flag == true)\n\t\t{\n\n\t\t}\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\t\t\tif(getLevel(index+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMax(2*index+1, 2*index+2)]) < 0 && grandChildMax(2*index+1, 2*index+2) != 0)\n\t\t{\n\t\t\tmaxIndex = grandChildMax(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[maxIndex];\n\t\t\tarray[maxIndex] = wemp;\n\t\t\tint y = maxIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if(object.compare(array[index], array[(index-1)/2]) < 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t\treturn temp;\n\t}", "public E removeLast() {\n\r\n E last = null;\r\n\r\n if(head == null){\r\n last = null;\r\n } else if(head.getNext() == null){\r\n last = head.getItem();\r\n } else {\r\n Node<E> curr = head;\r\n\r\n while(curr.getNext().getNext() != null) {\r\n curr = curr.getNext();\r\n }\r\n\r\n last = curr.getNext().getItem();\r\n curr.setNext(null);\r\n this.tail = curr;\r\n }\r\n\r\n return last;\r\n\r\n }", "public E removeLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\tNode<E> temp = tail;\r\n\t\t\tif (head == tail) {\r\n\t\t\t\thead = null;\r\n\t\t\t\ttail = null;\r\n\t\t\t} else {\r\n\t\t\t\ttail = tail.prev;\r\n\t\t\t\ttail.next = null;\r\n\t\t\t}\r\n\t\t\tindices.remove(size - 1);\r\n\t\t\tsize--;\r\n\t\t\treturn temp.data;\r\n\t\t}\r\n\t}", "public E removeLast() throws NoSuchElementException{\n if(size==0)\n throw new NoSuchElementException();\n else{\n E removedElement = tail.getPrevious().getElement();\n tail.setPrevious(tail.getPrevious().getPrevious());\n tail.getPrevious().setNext(tail);\n size--;\n return removedElement;\n }\n }", "public E removeLast(){\r\n return null;\r\n }", "public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }", "public void removeLast( ) {\r\n\t\tremove(size);\r\n\t}", "public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }", "public Item removeLast() {\n if (last == null)\n throw new NoSuchElementException();\n \n final Item element = last.item;\n final Node<Item> prev = last.prev;\n last.item = null;\n last.prev = null; // help GC\n last = prev;\n if (prev == null)\n first = null;\n else\n prev.next = null;\n size--;\n \n return element;\n }", "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = last.item;\n last = last.pre;\n if (last == null) {\n first = null;\n }\n else {\n last.next = null;\n }\n len--;\n return item;\n }", "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//loop to execute for every element after the current element in the list\r\n\t\t\t\tfor (int j=i+1;j<size;j++) {\r\n\t\t\t\t\t//checks if there is are 2 elements in the list with the same value\r\n\t\t\t\t\tif (element==list[j]) {\r\n\t\t\t\t\t\tremove(j);\t//calls function to remove that element from array\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\telse {\t//contains 0 elements\r\n\t\t\tSystem.out.println(\"List is empty!\");\r\n\t\t}\r\n\t}", "public T removeLast() {\n return remove(sentinel.prev);\n }", "public T removeLast() throws EmptyCollectionException{\n T result = null;\n\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n if(count == 1){\n return removeFirst();\n }else{\n // find second to last node\n LinearNode<T> trav = front;\n while(trav.getNext() != rear){\n trav = trav.getNext();\n }\n result = rear.getElement();\n rear = trav;\n trav.setNext(null);\n count--;\n }\n return result;\n }", "private T unlinkLast(final int idx) {\r\n\t\tfinal T element = serializer.getRandomAccess(idx);\r\n\t\tfinal int prev = getPrevPointer(idx);\r\n\t\tlast = prev;\r\n\t\tif (prev == -1) {\r\n\t\t\tfirst = -1;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(prev, -1);\r\n\t\t}\r\n\t\tdeleteElement(idx);\r\n\t\tsize--;\r\n\t\tmodCount++;\r\n\t\treturn element;\r\n\t}", "public Item removeLast(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = last.item;\n\t\t\t//delete last node\n\t\t\tlast = last.prev;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tfirst = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tlast.next = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public Item removeLast() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.prev;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.prev;\n i.prev.next = sentinel;\n sentinel.prev = i.prev;\n size -= 1;\n return i.item;\n }\n }", "public Object removeLast() {\n if(tail == null) return null;\n if(tail == head) return removeFirst();\n\n Object temp = tail.getElement();\n Node n = tail.getPrevious();\n n.setNext(null);\n tail = n;\n\n return temp;\n }", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public L removeFromBack(){\n\t\tif (isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty.\");\n\n\t\tL removedItem = (L)lastNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif( firstNode == lastNode )\n\t\tfirstNode = lastNode = null;\n\t\telse{ //locate new last node\n\t\t\tListNode current = firstNode;\n\n\t\t\t//loop while current node does not refer to lastNode\n\t\t\twhile ( current.nextNode != lastNode )\n\t\t\tcurrent = current.nextNode;\n\n\t\t\tlastNode = current; //current is new lastNode\n\t\t\tcurrent.nextNode = null;\n\t\t}//end else\n\n\t\treturn removedItem; //return removed node data\n\t}", "protected int removeLast() {\n if (size > 0) {\n return heap[size--];\n }\n return null;\n }", "public T remove() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n \r\n T deleted = elements[r];\r\n elements[r] = elements[size() - 1];\r\n elements[size() - 1] = null;\r\n size--;\r\n \r\n if (size() > 0 && size() < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n \r\n return deleted;\r\n }", "public Node<E> remove_last_node(){\r\n if (theData.size() <= 0) return null;\r\n\r\n Node<E> item = theData.get(theData.size()-1);\r\n\r\n theData.remove(theData.size() - 1);\r\n\r\n return item;\r\n }", "public Item removeLast() {\n if (isEmpty())\n throw new NoSuchElementException();\n Item item = last.item;\n last = last.prev;\n if (last != null)\n last.next = null;\n else\n first = last;\n size--;\n return item;\n }", "@Test\r\n public void testRemovedLast() {\r\n ObservableList<String> items = createObservableList(true);\r\n ListChangeReport report = new ListChangeReport(items);\r\n int oldSize = items.size();\r\n int lastIndex = oldSize - 1;\r\n items.remove(lastIndex);\r\n assertEquals(oldSize - 1, items.size());\r\n Change c = report.getLastChange();\r\n c.next();\r\n assertEquals(lastIndex, c.getFrom());\r\n// report.prettyPrint();\r\n }", "public void removelast()\r\n {\r\n Item item = post.item;\r\n post = post.prev;\r\n n--;\r\n }", "void deleteBack()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteBack() on empty List\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1;\n\t\t}\n \n\t\tback = back.prev; //the back element becomes the previous element in the list\n\t\tlength--;\n\n\t}", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }", "public T removeFromBack() throws EmptyListException {\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = lastNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse // locate new last node\n\t\t{\n\t\t\tNode<T> current = firstNode;\n\n\t\t\t// loop while current node does not refer to lastNode\n\t\t\twhile (current.nextNode != lastNode)\n\t\t\t\tcurrent = current.nextNode;\n\n\t\t\tlastNode = current; // current is new lastNode\n\t\t\tcurrent.nextNode = null;\n\t\t} // end else\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "public long removeRight() {\n long temporary = Array[end--];\n if ( end == -1 ) {\n end = max-1;\n }\n nItems--;\n return temporary;\n }", "public Item removeLast() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = last.item;\n last = last.prev;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; last already points to null\n first = null;\n } else {\n last.next = null;\n }\n return item;\n }", "public T delete(int i) {\n if (i < 0 || i >= size) // if there is no index i in list\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + size()); // cause IndexOutOfBoundException\n Object[] newElements = new Object[elements.length]; // creating new array with size of \"elements\"\n T deletedValue = null; // save value of element that will be deleted\n if (size == 0) { // if list is empty\n throw new IndexOutOfBoundsException(\"Treated index: \" + i + \" | Size of the Dynamic Array \" + 0); // cause IndexOutOfBoundException\n } else if (size == 1) { // if size is 1\n deletedValue = (T) elements[i]; // save value of deleted element\n elements = newElements; // move temporary array to main array \"elements\"\n } else {\n deletedValue = (T) elements[i]; // save value of deleted element\n for (int j = 0; j < i; j++) // treat all values with index less than i\n newElements[j] = elements[j]; // copy elements in temporary array\n for (int j = i; j < size - 1; j++) // treat all values with index greater than i\n newElements[j] = elements[j + 1]; // copy elements in temporary array\n size--; // decrement size\n elements = newElements; // move temporary array to main array \"elements\"\n }\n return deletedValue; // return value of element that will be deleted\n }", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "public PersistentLinkedList<T> removeLast() {\n return remove(this.treeSize - 1);\n }", "public int removeLastElement() {\r\n\t\tNode lastElement = sentinel.previous;\r\n\t\tsentinel.previous = lastElement.previous;\r\n\t\tlastElement.previous.next = sentinel;\r\n\t\tlength--;\r\n\t\treturn lastElement.value;\r\n\t}", "public void removeLast() {\r\n\t\tmyCombination.removeLast();\r\n\t}", "public Item removeLast() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove last item from empty deque\");\n }\n if (size == 1) { //remove 1 item in deque of size 1\n Item item = tail.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = tail; //n = temporary Node\n tail = tail.getPrev(); //assign 2nd-to-last node as new tail, \"removing\" previous tail from deque\n size--;\n return n.getItem();\n }", "private E unlinkLast(Node<E> l){\r\n \tfinal E element = l.item;\r\n \tfinal Node<E> next = l.next;\r\n \tl.item = null;\r\n \tl.next = null; // help GC\r\n \tlast = next;\r\n \tif(last == null)\r\n \t\tfirst = null;\r\n \telse\r\n \t\tnext.prev = null;\r\n \tsize--;\r\n \tmodCount++;\r\n \treturn element;\r\n }", "public boolean deleteLast() {\n if (head == tail && size == 0)\n return false;\n else {\n tail = (tail - 1 + capacity) % capacity;//删除了最左侧的头元素,则需要将尾指针向左\n //移动一个;\n size--;\n return true;\n }\n // return true;\n }", "@Override\r\n\tpublic E removeLast() {\n\t\treturn pollLast();\r\n\t}", "public Item removeLast() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpLast = last;\n Item lastItem = tmpLast.item;\n last = tmpLast.prev;\n size--;\n if (isEmpty()) first = null;\n else last.next = null;\n return lastItem;\n }", "public Node removeLast() {\r\n\t\treturn removeNode(this.size());\r\n\t}", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Trying to remove an item from an empty deque.\");\n }\n\n Item item = last.item; // save item to return\n last = last.previous; // delete last node\n if (last == null) {\n first = null;\n } else {\n last.next = null;\n }\n size--;\n if (isEmpty()) {\n first = null;\n }\n assert check();\n return item; // return the saved item\n }", "@Test\n public void removeLastItem() {\n ard.addLast(\"a\");\n //front should be 0\n ard.addLast(\"b\");\n //front should be 0\n ard.addLast(\"c\");\n //front = 0\n ard.removeFirst();\n //front = 1\n assertEquals(2, ard.size());\n ard.removeFirst();\n //front = 2\n assertEquals(1, ard.size());\n ard.removeFirst();\n //front = 3\n assertEquals(0, ard.size());\n ard.addFirst(\"front was 2, now is 1\");\n String[] expect = {null, null, \"front was 2, now is 1\", null, null, null, null, null, null, null, null};\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n\n ard = new ArrayDeque<String>();\n ard.addFirst(\"c\");\n //front should be -1\n ard.addFirst(\"b\");\n //front should be -2\n ard.addFirst(\"a\");\n //front = -3\n ard.removeLast();\n //front = -3\n assertEquals(2, ard.size());\n ard.removeLast();\n //front = -3\n assertEquals(1, ard.size());\n ard.removeLast();\n //front = -3\n assertEquals(0, ard.size());\n ard.addFirst(\"front was -3, now is -4\");\n expect = new String[]{null, null, null, null, null, null, null, \"front was -3, now is -4\", null, null, null};\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n }", "public boolean deleteLast() {\n if(size == 0) return false;\n\n tail.prev = tail.prev.prev;\n tail.prev.next= tail;\n size -= 1;\n return true;\n}", "public E removeLast() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Node oldLast = this.last;\n this.last = this.last.prev;\n this.size--;\n\n if (this.size != 0) {\n this.last.next = null;\n } else {\n this.first = null;\n }\n\n return oldLast.item;\n }", "protected T removeEnd() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> iterator = this.getHead();\r\n\t\t\twhile (iterator.getPrev().getPrev() != tail) {\r\n\t\t\t\titerator = iterator.getPrev();\r\n\t\t\t}\r\n\t\t\tSNode<T> endNode = iterator.getPrev();\r\n\t\t\titerator.setPrev(tail);\r\n\t\t\tsize--;\r\n\t\t\treturn endNode.getValue();\r\n\t\t}\r\n\t\t// The list is empty\r\n\t\treturn null;\r\n\t}", "public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = tail.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> tailPrev = tail.prev;\n tailPrev.next = null;\n tail = tailPrev;\n }\n size--;\n return item;\n }", "public int deletion() {\r\n\t\tif(isEmpty()) return -1;\r\n\t\treturn arr[cur_index--];\r\n\t}", "public Object removeLast() {\r\n Object last = header.previous.element;\r\n remove(header.previous);\r\n return last;\r\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}", "public final void removeLastElem()\n {\n\n if (m_firstFree > 0)\n {\n m_map[m_firstFree] = null;\n\n m_firstFree--;\n }\n }", "public E removeLast() {\n\t\t// low-level methods should be efficient - don't call other rmv()\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public Item removeLast() {\n\t\tif (count == 0) throw new NoSuchElementException();\n\t\tcount--;\n\t\tItem target = last.item;\n\t\tNode previousNode = last.previous;\n\t\tlast = null;\n\t\tif (count > 0) {\n\t\t\tlast = previousNode;\n\t\t}\n\t\t\n\t\treturn target;\n\t}", "@Override\r\n\tpublic E removeLast() {\n\t\treturn null;\r\n\t}", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public long removeLeft() {\n long temporary = Array[start++];\n if ( start == max ) {\n start = 0;\n }\n nItems--;\n return temporary;\n }", "public Item removeLast() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = tail;\n\t\ttail = tail.prev;\n\t\tif (tail == null) {\n\t\t\thead = null;\n\t\t} else {\n\t\t\ttail.next = null;\n\t\t}\n\t\ttmp.prev = null;\n\t\tN--;\n\t\treturn tmp.item;\n\n\t}" ]
[ "0.76068497", "0.7439687", "0.7430201", "0.74259955", "0.7406086", "0.73057276", "0.72197187", "0.71646994", "0.7128954", "0.7120657", "0.71195656", "0.70502275", "0.7041026", "0.7020424", "0.69874626", "0.6868098", "0.68360245", "0.67603827", "0.6753613", "0.6749326", "0.6667474", "0.6619602", "0.65925205", "0.6580385", "0.6550887", "0.65466064", "0.6484467", "0.6483703", "0.64581686", "0.6415742", "0.6414468", "0.6412366", "0.64042544", "0.640403", "0.6393854", "0.6387301", "0.63871086", "0.6379935", "0.63727343", "0.6365493", "0.6363199", "0.63609445", "0.633912", "0.6334435", "0.6322861", "0.6301759", "0.6296849", "0.628973", "0.6288758", "0.62868875", "0.628163", "0.6269713", "0.62671065", "0.6259996", "0.62413126", "0.624025", "0.62387455", "0.6231448", "0.62060416", "0.62038004", "0.6202261", "0.62002176", "0.61920804", "0.6190687", "0.6186792", "0.616991", "0.6162222", "0.6155143", "0.6149537", "0.61483115", "0.61322945", "0.6131554", "0.6119274", "0.6118962", "0.6115882", "0.61147344", "0.61007595", "0.6093608", "0.60756195", "0.6075034", "0.60750204", "0.6072643", "0.6061209", "0.605856", "0.60535145", "0.6053218", "0.6047728", "0.6040956", "0.60398126", "0.6038109", "0.60352874", "0.6032549", "0.60296184", "0.6024847", "0.60229826", "0.60131615", "0.6003247", "0.59928465", "0.5983606", "0.5980391" ]
0.829718
0
method set(int i, T t) replaces element at position i with new element e it changes the value of element stored in an array with index i and returns an object that was stored in array with index i before value changing Time Complexity is O(1) constant
public T set(int i, T t) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException T previousValue = (T) elements[i]; // store previous value of element with index i elements[i] = t; // set element with index i to t return previousValue; // return previous value of element with index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object set (int i, Object t)\r\n {\r\n }", "@Override\n // worst-case complexity: O(1), only assignments and array accesses\n public T set(int index, T item) {\n if (index < size && index >= 0) {\n T prev = arr[index];\n // replace the item\n arr[index] = item;\n // return the previous item at this index\n return prev;\n }\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }", "T set(int index, T element);", "void set(int i, E e) {\r\n arr[i] = e;\r\n }", "public T set(int i, T obj);", "@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n data[i] = e;\n return temp;\n }", "@Override\n public E set(int i, E e) throws IndexOutOfBoundsException {\n checkRange(i);\n E previousValue = get(i);\n\n if (size == 1) {\n storage = e;\n } else if (size <= 5) {\n ((E[]) storage)[i] = e;\n } else {\n ((ArrayList<E>) storage).set(i, e);\n }\n\n return previousValue;\n }", "@Override\n public boolean set(int index, T element) {\n array[index] = element;\n return true;\n }", "void setArrayElement(int index, Object value);", "void setArrayElement(int index, Object value);", "public E set(int index, E element);", "E set(int i , E e) throws IndexOutOfBoundsException;", "void set(int index, Object element);", "@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }", "@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }", "void set(int index, T data);", "E set(int i, E e) throws IndexOutOfBoundsException;", "public abstract E set(int index, E e);", "public void setObject(int i, T obj);", "public abstract <T> void set(int index, T value);", "@Override\n public T set(final int index, final T element) {\n this.checkIndex(index);\n final T prevElment = get(index);\n this.data[index] = element;\n return prevElment;\n }", "public void set(int i, A o);", "public void set(int index, Object value) {\n\tif(arr.length < index){\n\t\tObject arr2[] = new Object[index+1];\n\t\tSystem.arraycopy(arr, 0, arr2, 0, arr.length);\n\t\tarr2[index] = value;\n\t\tarr = arr2;\n\t\t\n\t}\n\telse arr[index] = value;\n}", "public int set(int index, int element);", "@Override\n public final void set(int index, E newValue) {\n array[index] = newValue;\n }", "public void set(int index, Object value) {\n\n\t\t// the right portion of values of the array -> room is not available\n\t\tif(index >= arr.length) {\n\t\t\tObject[] tmpArr = new Object[index+1]; // keep all values of the variable arr\n\t\t\t\n\t\t\t// keep all items of arr\n\t\t\tfor(int i=0; i<arr.length; i++) {\n\t\t\t\ttmpArr[i] = arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tarr = tmpArr; // exchange addresses\n \t\t}\t\n\t\t\n\t\tarr[index] = value;\n\t\t\n\t}", "public void set(int i,T e){\n if(rangeCheck(i)){\n data[i] = e;\n }\n }", "public void setElementAt(Object obj, int index);", "@Override\n\tpublic E set(int idx, E element) {\n\t\tif (element == null) throw new NullPointerException();\n\t\tif (idx < 0 || idx >= size()) throw new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tE output = null;\n\t\toutput = list[idx];\n\t\tlist[idx] = element;\n\t\treturn output;\n\t}", "public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }", "@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }", "public void set(int idx, E value) {\n assert idx >= 0;\n \n checkgrow(idx);\n \n\tarray[idx] = value;\n\t\n }", "public void setArray(int i, Array x);", "public void setElement(T newvalue);", "public T set(int index, T value) throws IndexOutOfBoundsException {\n checkException(index);\n arr[index] = value;\n return arr[index];\n }", "public Object set(int index, Object element) {\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject replaced = this.storedObjects[index];\n\t\tthis.storedObjects[index] = element;\n\n\t\treturn replaced;\n\t}", "public T put(int index, T t);", "public Vector<T> set(int aIndex, T aValue);", "@Override\n\tpublic E set(int i, E e) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}", "@Override\n public void set(int i, E e) throws IndexOutOfBoundsException {\n validIndex(i);\n data[i] = e;\n }", "@Override\n public final Integer set(final int index, final Integer element) {\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n arrayList[index] = element;\n return temp;\n }\n }", "public @Override E set(int index, E element) {\n \tNode n = getNode(index);\n \tE result = n.data;\n \tn.data = element;\n \treturn result;\n }", "@Override\n public E set(int index, E value) {\n this.rangeCheck(index);\n E oldValue = (E) this.values[index];\n this.values[index] = value;\n return oldValue;\n }", "void set(int idx, int val);", "void set(int index, int value) {\n array[index] = value;\n }", "@TimeComplexity(\"O(1)\")\n\tpublic E setElement(E eT)\n\t{\n\t\t//TCJ: the cost does not vary with input size so it is constant\n\t\tE temp = element;\n\t\telement = eT;\n\t\treturn temp;\n\t}", "@Override\n\tpublic E set(int index, E element) {\n\t\tNode<E> node = node(index);\n\t\tE old = node.elementE;\n\t\tnode.elementE = element;\n\t\treturn old;\n\t}", "public E set(int index, E newValue){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E oldValue = theData[index];\n theData[index] = newValue;\n\n return oldValue;\n }", "public void set(int index, T element) {\n genericArrayList[index] = element;\n }", "private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }", "public void setAt(int iterator, T element) {\n data[iterator] = element;\n }", "@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }", "@Override\r\n public E set(int index, E element) {\r\n if (index < 0 || index >= size()) {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n\r\n for (int i = 0; i < size; i++) {\r\n if (get(i).equals(element)) {\r\n throw new IllegalArgumentException();\r\n }\r\n }\r\n\r\n LinkedListIterator it = new LinkedListIterator(index);\r\n \r\n E replaced = it.next(); \r\n it.set(element);\r\n return replaced;\r\n }", "void set(T t);", "public E set(int index, E element) {\n if(index < 0 || index >= size())\n throw new IndexOutOfBoundsException();\n E currentElement = get(index);\n list[index] = element;\n return currentElement;\n }", "public Comparable set( int index, Comparable newVal ) {\n\tComparable temp= _data[index];\n\t_data[index]= newVal;\n\treturn temp;\n }", "private void setInArray(int i, int j, E element) {\r\n\t\tmElements.set(j*mRowCount+i, element);\r\n\t}", "public void sett(int pos, T x);", "<T> void put(String variable, T newValue, int... indexes) throws ClassCastException, ArrayIndexOutOfBoundsException;", "public boolean set(int index, E value){\n if (index > maxIndex || index < 0){\n System.out.println(\"Error while replacing value. Your index \" + index + \" is out of bound of array\");\n return false;\n }\n\n array[index] = value;\n return true;\n }", "public void set(T t, int i) {\n try {\n this.field.set(t, Integer.valueOf(i));\n } catch (IllegalAccessException e) {\n throw new AssertionError(e);\n }\n }", "public void set(int i, int value) {\n\t\tassert i < size();\n\t\tarr[i] = value;\n\t}", "public E set(int index, E obj) {\n\t\tif (obj == null) {\n\t\t\tthrow new NullPointerException(\"Object to set cannot be null\");\n\t\t}\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\t// Check for dupes\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (obj.equals(get(i))) {\n\t\t\t\tthrow new IllegalArgumentException(\"Object to set cannot be a duplicate\");\n\t\t\t}\n\t\t}\n\t\tE temp = get(index);\n\t\tlist[index] = obj;\n\t\treturn temp;\n\t}", "@Override\n\tpublic void set(int index, T insertItem) {\n\t\t\n\t}", "public Object set(int index, Object element) {\r\n return deref(refs.set(index, new WeakReference(element)));\r\n }", "public void set(int[] ai);", "public void set(int i);", "@Override\r\n\tpublic E set(int index, E e) {\r\n\t\tif (e == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tif (index < 0 || index >= size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t}\r\n\t\tfor (ListNode p = front; p != null; p = p.next) {\r\n\t\t\tif (e.equals(p.data)) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t}\r\n\t\tE result = null;\r\n\t\tif (front != null && index == 0) {\r\n\t\t\tresult = front.data;\r\n\t\t\tfront.data = e;\r\n\t\t\treturn result;\r\n\t\t} \r\n\r\n\t\tListNode current = front;\r\n\t\twhile (index > 0) {\r\n\t\t\tcurrent = current.next;\r\n\t\t\tindex--;\r\n\t\t}\t\t\t\r\n\t\t//check not beyond end of list\r\n\t\tif (current != null) {\t\t\t\t\r\n\t\t\tresult = current.data;\r\n\t\t\tcurrent.data = e;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public synchronized boolean set(int index, E value) {\n return this.array.set(index, value);\n }", "BinaryArrayReadWrite set(int index, byte x);", "private static <Key extends Comparable<Key> > void exch(Key []a, int i, int j){\n Key tmp=a[i-1];\n a[i-1]=a[j-1];\n a[j-1]=tmp;\n }", "public E set(int index, E element) {\n\t\tif(index < 0 || index > size) {\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\t} else if(index == size) {\r\n\t\t\tadd(element);\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\tE e = getNode(index).getData();\r\n\t\tgetNode(index).setData(element);\r\n\t\treturn e;\r\n\t}", "public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }", "public void set(long index);", "private static <Key extends Comparable<Key>> void exch(Key[] a, int i, int j)\n\t{\n\t\tKey tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}", "public E set(int index, E data) \n throws IndexOutOfBoundsException,NullPointerException\n {\n if(index > size() || index < 0)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n if(data == null)\n {\n throw new NullPointerException();\n }\n currNode.data = data;\n return currNode.data; \n }", "@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException(\"The worklist is empty\");\n }\n // if i is less than 0 or greater than size of worklist, throw exception\n if(i < 0 || i >= array.length) {\n throw new IndexOutOfBoundsException(\"This index does not exist\");\n }\n // update value\n array[i] = value;\n }", "public T setVal(int idx, T val) {\n\t\tint index = (idx << 1) + 1;\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tT old = (T) nvPairs.get(index);\n\t\tnvPairs.set(index, val);\n\t\treturn old;\n\t}", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "void setIdx(int i);", "public void set(int index, int o) {\n\t\tif(index == 0) return;\n\t\tr[index] = o;\n\t}", "public static void main(String[] args) {\n\n\n\n int[] myArray = new int[5];\n\n Array.set(myArray,0,100); // another way as shown above --> myArray[0] = 100;\n Array.set(myArray,1,81);\n Array.set(myArray,2,64);\n Array.set(myArray,3,49);\n Array.set(myArray,4, 36);\n\n// int getValue = Array.get(myArray,3); //--> Array onune int yazmadigimiz icin object\n // farzediyor. (int) yazarak tipini belirlemeliyiz\n // bu type casting ornegidir\n int getValue = (int)Array.get(myArray,3);\n System.out.println(\"The value at index 3 is : \" + getValue);\n\n// System.out.println(Arrays.toString(myArray));\n\n /**\n * java.lang.reflect.Array -->\n * The Array class provides static methods to dynamically create and access Java arrays.\n *\n * java.util.Arrays -->\n * This class contains various methods for manipulating arrays (such as sorting and searching).\n * This class also contains a static factory that allows arrays to be viewed as lists.\n * Utility class,which contains static methods to manipulate(sort,max,min etc.) the values stored in array.\n */\n\n /**\n * getArray METHOD\n * get Array Class method = Allows you to return the value at a specific index\n * Syntax = Array.get(Object [], int index)\n */\n\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storageValue =(int) Array.get(myArray,i);\n// System.out.println(\"The value at \" + i + \" index is: \" + storageValue);\n// }\n\n // similar code\n// int[] myArray = {2,4,6,8};\n// for(int i = 0; i < myArray.length; i++){\n// int storeValue = myArray[i];\n// System.out.println(\"The value at \" + i + \" index is \" + storeValue);\n// }\n\n\n\n\n\n\n\n }", "private static void changeValuesTTT(int[][] ttt, int i, int j) {\n\t\tfor (int k = 0; k<ttt[i].length;k++){\n\t\t\tttt[i][k]=ttt[i][k]==0?0:-1;\n\t\t\t\n\t\t\t}\n\t\t\n\n\t\tfor (int l = 0; l<ttt.length;l++){\n\t\t\tttt[l][j]=ttt[l][j]==0?0:-1;\n\t\t\t\n\t\t}\n\t}", "@Override\n protected void swap(int i, int j)\n {\n E temp = this.elements[i];\n this.elements[i] = this.elements[j];\n \tthis.elementsToArrayIndex.put(elements[i], i);\n this.elements[j] = temp;\n \tthis.elementsToArrayIndex.put(elements[j], j);\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }", "public void set(int index, int val) {\n boolean exists = arr.get(index).get(arr.get(index).size() - 1).id == id;\n if (exists) {\n arr.get(index).get(arr.get(index).size() - 1).val = val;\n } else {\n List<Pair> list = arr.get(index);\n list.add(new Pair(id, val));\n arr.set(index, list);\n } \n }", "public void setValue(T v){\n \telement = v;\n }", "public T set(T obj);", "private static void exch(Object[] a, int i, int j) {\r\n Object swap = a[i];\r\n a[i] = a[j];\r\n a[j] = swap;\r\n }", "void setArray(int index, Array value) throws SQLException;", "public void set(int index, E newValue)\n {\n if (index >= 0 && index < size)\n data[index] = newValue;\n else\n throw new NoSuchElementException();\n }", "public void setValue(T element) {\n\t\t\n\t}", "public TempList<T> set(int index, T elem) {\n chk();\n list.set(index, elem);\n return this;\n }", "public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);", "@Override\n public void set(int i, Node<T> e)\n {\n super.set(i, e);\n if(i == 0) \n {\n lastNode.setNext(firstNode);\n updateFirstNode();\n }\n else if(i == size - 1) lastNode = e;\n }", "public void setTimingArray(int i, org.landxml.schema.landXML11.TimingDocument.Timing timing)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.TimingDocument.Timing target = null;\r\n target = (org.landxml.schema.landXML11.TimingDocument.Timing)get_store().find_element_user(TIMING$2, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(timing);\r\n }\r\n }", "private Object set( int r, int c, Object newVal ) {\n\tObject oldVal = matrix[r][c];\n\tmatrix[r][c] = newVal;\n\treturn oldVal;\n }" ]
[ "0.74435097", "0.7404326", "0.73810774", "0.7375247", "0.7361659", "0.72207564", "0.7130071", "0.7128156", "0.7090049", "0.7090049", "0.70748067", "0.6988286", "0.6988225", "0.69818586", "0.6972991", "0.6965925", "0.6932217", "0.6854048", "0.67922854", "0.6784514", "0.67244667", "0.67238367", "0.66601324", "0.6619256", "0.6574468", "0.656147", "0.6561187", "0.6559405", "0.6552258", "0.65494007", "0.6533122", "0.65161455", "0.6501282", "0.64983195", "0.64758307", "0.6373604", "0.6367573", "0.63365185", "0.6324355", "0.63040996", "0.63040096", "0.6276653", "0.626517", "0.6260515", "0.6251634", "0.62191117", "0.62125736", "0.61878926", "0.6156713", "0.61379755", "0.6116525", "0.6107961", "0.6100106", "0.6071424", "0.60624826", "0.6056146", "0.59958214", "0.5988564", "0.59613556", "0.59385633", "0.5936189", "0.5936064", "0.59280545", "0.59257734", "0.5886613", "0.5883796", "0.58794147", "0.5865579", "0.5850972", "0.583799", "0.58183944", "0.58180165", "0.58127713", "0.5800273", "0.579488", "0.578557", "0.5765691", "0.573732", "0.57249075", "0.5718483", "0.5709447", "0.5695329", "0.56916285", "0.56887835", "0.56847745", "0.56847745", "0.56847745", "0.5677816", "0.56754094", "0.567064", "0.5669401", "0.56647986", "0.56583947", "0.5646325", "0.56440705", "0.56436366", "0.56429785", "0.56397533", "0.56333643", "0.5628045" ]
0.8053582
0
method get(int i) retrieve element at position i it returns an object stored in an array with index i Time Complexity is O(1) constant
@SuppressWarnings("unchecked") public T get(int i) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException return (T) elements[i]; // return element with index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object get(int i);", "Object get(int index);", "Object get(int index);", "public Object get(int index);", "public Object get(int index);", "public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}", "@Override\n // worst-case complexity: O(1), it's basically just an array access\n public T get(int index) {\n if (index < size && index >= 0)\n return arr[index];\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }", "E get(int i) throws IndexOutOfBoundsException;", "public T get(int i);", "Object getArrayElement(int index);", "Object getArrayElement(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "public T get(int index);", "public T get(int index);", "public T get(int index);", "public int get(int index) {\n return array[index];\n }", "public abstract T get(int index);", "@Override\n public T get(int index) {\n if (index < 0 || index >= size) {\n return null;\n }\n int position = index + plusOne(nextFirst);\n if (position >= array.length) {\n position -= array.length;\n return array[position];\n } else {\n return array[position];\n }\n }", "public T get(int aIndex);", "public Item get(int i);", "E get(int i) {\r\n @SuppressWarnings(\"unchecked\")\r\n final E e = (E)arr[i];\r\n return e;\r\n }", "T get(int i);", "public E get(int i) {\n\n\t if (i < 0 && i > num_elements)\n\t return null;\n\t \n\t return(elements[i]);\n\t }", "public Object get(int i) {\n return elementAt(i);\n }", "Object getElementAt(int index);", "E get( int index );", "@Override\n public E get(final int index) {\n return array[index];\n }", "@Override\n public T get(int idx) {\n //if item is within the bounds of the array list, it is returned others null is returned\n if (idx >= 0 && idx<=size){\n return arr[idx+1];\n } else {\n return null;\n }\n\n }", "@Override\n public T get(int index) {\n return (T) array[index];\n }", "public Object get( int index )\n {\n\treturn _data[index];\n }", "public Object get (int i)\r\n {\r\n }", "public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}", "@Override\n public E get(int i) throws IndexOutOfBoundsException {\n validIndex(i);\n return data[i];\n }", "public abstract Object get(int pos) throws IndexOutOfBoundsException;", "public int get(int index);", "T get(int position);", "public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }", "abstract int get(int index);", "public int get(int i) {\n\t\tassert i < size();\n\t\treturn arr[i];\n\t}", "@Override\n\tpublic E get(int i) {\n\t\tif (i < 0 || i >= this.numberOfElements) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\treturn this.arrayList[i];\n\t\t}\n\t}", "public T get(int pos);", "@Override\n public E get(int i) throws IndexOutOfBoundsException {\n checkRange(i);\n\n if (size == 1) {\n return (E) storage;\n } else if (size <= 5) {\n return ((E[]) storage)[i];\n } else {\n return ((ArrayList<E>) storage).get(i);\n }\n }", "public synchronized E get(int index) {\n return this.array.get(index);\n }", "public E get(int index);", "public Object[] elementAt(int index);", "public Item get(int i) {\n return items[i];\n }", "public abstract E get(int index);", "int get(int idx);", "@Override\n @SuppressWarnings(\"unchecked\")\n public T get(int index)\n {\n return (T) array[index];\n }", "@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}", "public Object elementAt(int index);", "public int get(int i) throws ArrayIndexOutOfBoundsException {\n if (i >= 0 && i < count) {\n return list[i];\n } else {\n throw new ArrayIndexOutOfBoundsException();\n }\n }", "public E get(int i) {\n\t\tif (size == 0) {\n\t\t\tthrow new IllegalArgumentException(\"List is empty, cannot retrieve item.\");\n\t\t}\n\n\t\tif (i < 0 || i >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Requested index is out of bounds.\");\n\t\t}\n\n\t\treturn list[i];\n\n\t}", "public Object get(int index)\n {\n return items[index];\n }", "public E get(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n return theData[index];\n }", "public T get(int index) {\n if (size == 0) {\n return null;\n }\n if (index < 0 || index > size - 1) {\n return null;\n }\n index = Math.floorMod(index + front, array.length);\n return array[index];\n }", "public T get(int index) throws IndexOutOfBoundsException {\n checkException(index);\n return arr[index];\n }", "public Object get(int i)\n {\n if(_list!=null)\n return _list.get(i);\n return null;\n }", "@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }", "public E get(int index) {\n return this.elements[index];\n }", "@Override\n\tpublic E get(int i) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}", "public int getElementAtIndex(int index){\r\n return mArray[index];\r\n }", "public Object getObject(int pos) {\n return elements.get(pos);\n }", "public Object get(int index) {\n int i;\n if (index < 0 || (i = index + start) >= size)\n throw new NoSuchKeyException(index, size - start);\n return array[i];\n }", "public Object get(int index) {\r\n return entry(index).element;\r\n }", "public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }", "@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}", "@Override\n public T get(final int index) {\n this.checkIndex(index);\n return this.data[index];\n }", "default V item( int i ) { return getDataAt( indexOfIndex( i ) ); }", "public T returnItem(int i) {\n return a[i];\n }", "public O get(int index)\r\n {\r\n if (index >= count || index < 0) return null;\r\n \r\n if (index > count/2)\r\n {\r\n //search from the end\r\n VectorItem<O> vi = last;\r\n for (int i=count-1;i>index;i--)\r\n {\r\n vi = vi.getPrevious();\r\n }\r\n return vi.getObject(); \r\n \r\n } else\r\n {\r\n //search from the beginning\r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<index;i++)\r\n {\r\n vi = vi.getNext();\r\n }\r\n return vi.getObject(); \r\n }\r\n }", "public TypeHere get(int i) {\n return items[i];\n }", "public Occ get( int index )\n {\n if ( index < 0 || index >= size ) throw new IndexOutOfBoundsException( \"\"+index+\" >= \"+size );\n return data[index];\n }", "public KVPair get(int i) {\r\n\r\n if (i >= capacity())\r\n return null;\r\n\r\n return htable[i];\r\n }", "public T get(int i) {\n // we add values.length to head-i to avoid negative indices\n return values[(head-i+values.length) % values.length];\n }", "public Object get(int index) {\n\t\tif (index < 0 || index > (size - 1)) {\n\t\t\tthrow new IndexOutOfBoundsException(\n\t\t\t\t\t\"Cannot get the element with invalid index from the ArrayIndexedCollection.\");\n\t\t}\n\n\t\treturn elements[index];\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t\tpublic U get(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//Uses cast to take U object out of generic-less array\r\n\t \treturn (U) array[idx];\r\n\t }", "public T get(int index) {\n return this.list[index];\n }", "@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }", "public E get(int index) { \n return (E)list[index];\n }", "@Override\n public T get(int index) {\n return list.get(index);\n }", "@Override\n public E get(int index) {\n if ((index < 0) || (index >= _size)) {\n throw new IndexOutOfBoundsException();\n }\n return _store[index];\n }", "public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}", "public Object get(int index) {\n\t\tif (this.index == index) {\n\t\t\treturn object;\n\t\t} else {\n\t\t\treturn nextItem.get(index);\n\t\t}\n\t}", "@Override\n public Person lookup(final int i) {\n if(i >= size() || i < 0) throw new IndexOutOfBoundsException();\n return mData.get(i);\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public synchronized E get(int index) {\n if (index < 0 || index >= this.pointer) {\n throw new ArrayIndexOutOfBoundsException(\"Out of bound.\");\n }\n return (E) (this.container[index]);\n }", "public Type get(int index);", "int get(int index)\n\t{\n\t\treturn inputArray[index];\n\t}", "public A get(int i){\n return null;\n }", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "public Object getValue(int index);", "public E get(int index) {\n //make sure the index is valid\n if (this.array.length - 1 >= index) {\n //encapsulate\n Object element = this.array[index];\n return (E) element;\n } \n \n //if the index is invalid, return -1\n throw new IllegalArgumentException();\n }", "public Comparable get( int index ) {\n \treturn _data[index]; }", "public T get(int i) {\n return null;\n }", "public T get(int index) {\n if (index < 0 || index > size - 1) {\n throw new IndexOutOfBoundsException(\"Cannot access data outside \"\n + \"the size of the data structure(null)\");\n } else {\n if (index == 0) {\n return head.getData();\n } else if (index == size - 1) {\n return tail.getData();\n }\n Object[] myarray = this.toArray();\n return (T) myarray[index];\n }\n }", "@Override\n\tpublic T get(int indice) {\n\t\tif (indice >= 0 && indice < tamanho) {\n\t\t\treturn elementosDaLista[indice];\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.7884647", "0.7862725", "0.7862725", "0.7811654", "0.7811654", "0.7678454", "0.76223636", "0.75993884", "0.7595538", "0.75827736", "0.75827736", "0.7576707", "0.7576707", "0.7576707", "0.7576707", "0.7576707", "0.75705576", "0.75705576", "0.75705576", "0.7503997", "0.7468971", "0.7459606", "0.74464947", "0.7431197", "0.7425769", "0.73692167", "0.73548865", "0.73394436", "0.7336873", "0.72932905", "0.728064", "0.72766846", "0.7275062", "0.7233035", "0.72315454", "0.72222", "0.72137016", "0.72102165", "0.7207395", "0.7206461", "0.7190861", "0.7184773", "0.7134104", "0.70801514", "0.70352167", "0.7034901", "0.70233256", "0.7023159", "0.70144457", "0.7012129", "0.7011344", "0.7008695", "0.699007", "0.6973126", "0.6970992", "0.6939134", "0.69282025", "0.6920411", "0.6869586", "0.68624747", "0.685706", "0.68510365", "0.68504226", "0.6849233", "0.68433785", "0.6836881", "0.68333876", "0.68308204", "0.6800174", "0.6796438", "0.6782578", "0.6775233", "0.67648846", "0.676044", "0.6750374", "0.6742631", "0.6735861", "0.6732873", "0.6707854", "0.66781414", "0.66725373", "0.66725135", "0.6666887", "0.6663074", "0.6662233", "0.66617876", "0.6656564", "0.6656274", "0.66537386", "0.66464746", "0.6644014", "0.6641972", "0.66166866", "0.66092044", "0.65892726", "0.6584354", "0.6583428", "0.657587", "0.65694195", "0.6569288" ]
0.73517025
27
Assistive methods method size() returns the size of the Dynamic Array Time Complexity is O(1) constant
public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int arraySize();", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "int size() {\n\t\treturn array.length;\n\t}", "public int size (){\n return N;\n }", "public int size()\r\n { return N; }", "public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}", "public int size() {\n\t\treturn array.length();\n\t}", "public int size(){\r\n\t\treturn N;\r\n\t}", "public int size()\n\t{\n\t\treturn arraySize;\n\t}", "int sizeOfRelatedArray();", "int getArrayLength();", "int getArrayLength();", "int size()\n\t{\n\t\t//If array is null then return -1\n\t\tif(inputArray == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\t//If the array is not null then return the length of the array\n\t\treturn inputArray.length;\n\t}", "int sizeOfTaskAbstractArray();", "int sizeOfDecisionSightDistanceArray();", "@Override\n public int size() {\n return array.length;\n }", "public int getSize() {\r\n return array.length;\r\n }", "public int size(){return n;}", "long arrayLength();", "@Override\n public synchronized int getSize() {\n return mArray.size();\n }", "int sizeOfSpeedsArray();", "public int size() {\n return N;\n\n }", "public int size()\n {\n return N;\n }", "int sizeOfPerformerArray();", "int sizeOfRoadsideArray();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public int size() {\r\n return N;\r\n }", "int sizeOfStarArray();", "int sizeOfGuideArray();", "@Override\n\tpublic int size() {\n\t\treturn N;\n\t}", "int sizeOfStockArray();", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "int sizeOfDescriptionArray();", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n return _N;\n\n }", "public int sizeOfSupArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUP$4);\n }\n }", "private int size() {\n return n;\n }", "public int size() {\n\t return N;\n\t }", "protected int getArraySize(){\r\n\t \treturn numElems;\r\n\t \t//return arraySize;\r\n\t }", "public int sizeOfGuardianArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(GUARDIAN$22);\n }\n }", "abstract int size();", "abstract int size();", "public int size() { \r\n \treturn n; \r\n }", "public int size(){\n\t\treturn n;\n\t}", "public int size(){\n\t\treturn n;\n\t}", "int sizeOfObjectDefinitionArray();", "int sizeOfFunctionArray();", "public int size( )\n {\n // Implemented by student.\n }", "public int size() {\n return a.length;\n }", "public int sizeOfTimingArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TIMING$2);\r\n }\r\n }", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();" ]
[ "0.76706696", "0.7479186", "0.7375774", "0.72778004", "0.72305167", "0.7226266", "0.718397", "0.7151756", "0.71467245", "0.71341753", "0.7132479", "0.7132479", "0.7100664", "0.7086875", "0.7079043", "0.7076383", "0.70578027", "0.70467097", "0.70466644", "0.7042502", "0.70287967", "0.70249546", "0.6996965", "0.69872576", "0.69849414", "0.69815785", "0.69815785", "0.69815785", "0.69815785", "0.69815785", "0.69815785", "0.6970252", "0.69509614", "0.6933386", "0.69298184", "0.6927231", "0.69236207", "0.69236207", "0.69236207", "0.69236207", "0.69236207", "0.69236207", "0.69236207", "0.6915914", "0.6912385", "0.69033855", "0.69033855", "0.69033855", "0.69033855", "0.69033855", "0.68608046", "0.6853077", "0.685234", "0.68521667", "0.68418264", "0.68387985", "0.68355185", "0.68355185", "0.6833685", "0.6809983", "0.6809983", "0.6808624", "0.6790275", "0.67804146", "0.6771742", "0.6765813", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927", "0.6756927" ]
0.0
-1
method ensureCapacity() double the capacity of the Dynamic Array it creates new array with increased length, then copies all elements of current array in this array and then assigns current array to new one Time Complexity is O(n) linear
private void ensureCapacity() { int newSize = elements.length * 2; Object[] newElements = new Object[newSize]; for (int i = 0; i < elements.length; i++) { newElements[i] = elements[i]; } elements = newElements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ensureCapacity(int newCapacity) {\n\t\t\t data = Arrays.copyOf(data, newCapacity * 2);\n\t\t\t this.capacity = newCapacity * 2;\n\t\t }", "private void ensureCapacity() {\n\t\tif (numberOfElements == capacity) {\n\t\t\tT[] newArray = (T[])new Object[(numberOfElements+1) * CAPACITY_MULTIPLIER];\n\t\t\tSystem.arraycopy(elements,0,newArray,0,numberOfElements);\n\t\t\telements = newArray;\n\t\t}\n\t}", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "private void ensureCapacity()\n\t{\n\t\tif (elements.length == size)\n\t\t\telements = Arrays.copyOf(elements, 2 * size + 1);\n\t}", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "private void reallocate() {\n capacity = 2 * capacity;\n ElementType[] newData = (ElementType[]) new Object[DEFAULT_INIT_LENGTH];\n System.arraycopy(elements, 0, newData, 0, size);\n elements = newData;\n }", "private void resize(int capacity) {\n // create a new array, and copy the original array items to the new array\n T[] newArray = (T[]) new Object[capacity];\n int position = plusOne(nextFirst);\n for (int i = 0; i < size; i += 1) {\n newArray[i] = array[position];\n position = plusOne(position);\n }\n nextFirst = newArray.length - 1;\n nextLast = size;\n array = newArray;\n }", "private void ensureCapacity() {\n int newLength = (this.values.length * 3) / 2 + 1;\n Object[] newValues = new Object[newLength];\n System.arraycopy(this.values, 0, newValues, 0, this.values.length);\n this.values = newValues;\n }", "private void resize(int newCapacity) {\n\n E[] temp = (E[]) new Object[newCapacity];\n for(int i = 0; i < size(); i++)\n temp[i] = data[calculate(i)];\n data = temp;\n head = 0;\n tail = size()-1;\n\n\n }", "private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void resize(int capacity) {\r\n\t\tItem[] copy = (Item[]) new Object[capacity];\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\tcopy[i] = arr[i];\r\n\t\tarr = copy;\r\n\t}", "private void resizeArray(int capacity){\n //take temporary array to copy elements\n String[] copy = new String[capacity];\n for(int i=0;i<N;i++){\n copy[i]=stackArray[i];\n }\n //point the temp array to main array\n stackArray=copy;\n }", "private void ensureCapacity(int capacity) {\n\t\t\tif(capacity > elementData.length) {\n\t\t\t\tint newCap = elementData.length * 2 + 1;\n\t\t\t\tif(capacity > newCap) {\n\t\t\t\t\tnewCap = capacity;\n\t\t\t\t}\n\t\t\t\telementData = Arrays.copyOf(elementData, newCap);\n\t\t\t}\n\t\t}", "private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }", "private void ensureCapacity() {\n if ( top + 1 < storage.length ) {\n return;\n }\n storage = Arrays.copyOf( storage, storage.length * 2 );\n }", "private void reallocate() {\n\t\tthis.capacity *= 2;\n\t\tObject[] newElements = new Object[this.capacity];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnewElements[i] = this.elements[i];\n\t\t}\n\n\t\tthis.elements = newElements;\n\t}", "public void ensureCapacity(int minCapacity)\n\t{\n\t\tif (array.length < minCapacity)\n\t\t{\n\t\t\tint[] newArray = new int[minCapacity * 2];\n\t\t\tfor (int index = 0; index < arraySize; index++)\n\t\t\t{\n\t\t\t\tnewArray[index] = array[index];\n\t\t\t}\n\t\t\tarray = newArray;\n\t\t}\n\t\t\t\n\t}", "private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }", "private void resize(int capacity) {// O(N)\r\n\t\tthis.capacity=capacity;\r\n\t\tE[] temp=(E[])list;\t//temporary list that stores old array\r\n\t\t//array of new required length initialized\r\n\t\tlist=new Object[this.capacity];\r\n\t\t//loop executes until all elements are copied from temp to list array\r\n\t\tfor (int i=0;i<size;i++) {\r\n\t\t\tlist[i]=temp[i];\r\n\t\t}\r\n\t}", "private void enlargeCapacity() {\n Object[] tmp = this.container;\n this.container = new Object[this.container.length + this.capacity];\n System.arraycopy(tmp, 0, this.container, 0, tmp.length);\n }", "@SuppressWarnings(\"unchecked\") // this will stop Java complaining about the cast\n private void ensureCapacity() {\n if (count == data.length) { //if count is equal to the length of data a new array is made doubling the initial size, it then makes the data collection == to the temp collection\n E[] temp = (E[]) new String[data.length * 2]; //effectivly increasing the size of the array\n for (int i = 0; i < data.length; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }\n }", "private void ensureCapacity(final int minCapacity) {\n // If the array becomes full, double the size\n if (capacity <= (minCapacity + 1)) {\n final int newCap = capacity * 2;\n arrayList = Arrays.copyOf(arrayList, newCap);\n capacity = newCap;\n }\n }", "@SuppressWarnings(\"unchecked\")\n\t private boolean grow() {\n\n\t /* \n\t * Add code here \n\t * Expand capacity (double it) and copy old array contents to the\n\t * new one. \n\t */\n\t\t \n\t\t capacity = (capacity*2);\n\t\t E[] new_elements = elements;\n\t\t elements = (E[])new Object[capacity];\n\t\t for(int i=0; i<new_elements.length;i++){\n\t\t\t elements[i] = new_elements[i];\n\t\t }\n\t System.out.println(\"Capacity reached. Increasing storage...\");\n\t System.out.println(\"New capacity is \" + capacity + \" elements\");\n\n\t return true;\n\t }", "private void reallocateDoubleCapacity() {\n\t\tObject oldElements[] = elements;\n\t\tcapacity *= reallocateFactor;\n\t\tsize = 0;\n\t\telements = new Object[capacity];\n\n\t\tfor (Object object : oldElements) {\n\t\t\tthis.add(object);\n\t\t}\n\t}", "private void resize(int capacity)\r\n {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++)\r\n temp[i] = a[i];\r\n a = temp;\r\n }", "private void grow() { \r\n\t\tint capacity = accounts.length;\r\n\t\tAccount [] tempArray = new Account[capacity += INITIAL_SIZE]; //tempArray with new capacity\r\n\t\tfor ( int i = 0; i < accounts.length; i++ ) { // Transfer all accounts into new Accounts\r\n\t\t\ttempArray[i] = accounts[i];\r\n\t\t}\t\t\r\n\t\taccounts = tempArray;\t\r\n\t\treturn;\r\n\t}", "private void resize(int newCap) {\n\t\tE[] newArray = (E[]) new Object[newCap];\n\t\tfor(int x = 0; x < newCap && x < capacity; x++) {\n\t\t\tnewArray[x] = elements[x];\n\t\t}\n\t\telements = newArray;\n\t\tcapacity = newCap;\n\t}", "private void resize(int capacity) {\n assert capacity >= n;\n\n Item[] temp = (Item[]) new Object[capacity];\n for (int i = 0; i < n; i++) {\n temp[i] = a[i];\n }\n a = temp;\n }", "private void resize(int capacity) {\n TypeHere[] a = (TypeHere[]) new Object[capacity];\n System.arraycopy(items, 0, a, 0, size);\n items = a;\n }", "public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}", "private void expandCapacity() {\n heap = Arrays.copyOf(heap, heap.length * 2);\n }", "public void ensureCapacity(int capacity) {\n if (capacity > this.capacity) {\n int newSize = this.capacity + this.capacity >> 1;\n if (newSize < capacity) {\n newSize = capacity;\n }\n ArrayMapEntry<K, V>[] newArray = new ArrayMapEntry[newSize];\n int i = length;\n while (i-- > 0) {\n newArray[i] = data[i];\n }\n this.capacity = newSize;\n data = newArray;\n }\n }", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "int increaseCapacity(int expectedCapacity)\r\n/* 425: */ {\r\n/* 426:456 */ int newCapacity = this.elements.length;\r\n/* 427:457 */ int maxCapacity = this.maxCapacity;\r\n/* 428: */ do\r\n/* 429: */ {\r\n/* 430:459 */ newCapacity <<= 1;\r\n/* 431:460 */ } while ((newCapacity < expectedCapacity) && (newCapacity < maxCapacity));\r\n/* 432:462 */ newCapacity = Math.min(newCapacity, maxCapacity);\r\n/* 433:463 */ if (newCapacity != this.elements.length) {\r\n/* 434:464 */ this.elements = ((Recycler.DefaultHandle[])Arrays.copyOf(this.elements, newCapacity));\r\n/* 435: */ }\r\n/* 436:467 */ return newCapacity;\r\n/* 437: */ }", "public void ensureCapacity(int minimumCapacity)\n\t{\n\t\tEmployee[] newBigArray;\n\t\t\n\t\tif(minimumCapacity > 0)\n\t\t{\n\t\t\tif(employeeData.length < minimumCapacity)\n\t\t\t{\n\t\t\t\tnewBigArray = new Employee [minimumCapacity];\n\t\t\t\tfor(int i = 0; i < numOfEmployees; i++ )\n\t\t\t\t{\n\t\t\t\t\tnewBigArray[i] = employeeData[i];\n\t\t\t\t}\n\t\t\t\t employeeData = newBigArray;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"ERROR: The capacity of the array should be a positive number!\");\n\t\t}\n\t\t\t\n\t}", "void resize() {\n capacity = array.size();\n }", "protected void resize(int capacity){\n E[] temp = (E[]) new Object[capacity];\n for (int i = 0; i < size; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }", "private void expandArray() {\r\n//\t\tSystem.out.println(\"Expanding: current capacity \" + capacity); //Used for debugging\r\n\t\tcapacity = 2 * capacity;\r\n\t\tE[] temp = (E[]) new Object[capacity];\r\n\t\tfor (int i = 0; i < t + 1; i++)\r\n\t\t\ttemp[i] = stack[i];\r\n\t\tstack = temp;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}", "private void resize(int capacity) {\n// assert capacity >= N;\n// StdOut.println(\"resize capacity:\"+ capacity);\n// StdOut.println(\"resize count:\"+ count);\n \n Item[] temp = (Item[]) new Object[capacity];\n int index = 0;\n for (int i = 0; i < N; i++) {\n if (randomizedQueue[i] != null){\n// StdOut.println(\"resize index :\"+ index);\n// StdOut.println(\"resize i :\"+ i);\n// StdOut.println(\"resize N :\"+ N);\n// StdOut.println(\"resize randomizedQueue[i] :\"+ randomizedQueue[i]);\n// StdOut.println(\"--------------------------------------------------\");\n temp[index] = randomizedQueue[i];\n index++;\n }\n }\n randomizedQueue = temp;\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public void resizeByLinearize(int newCapacity) {\r\n Object[] temp = new Object[newCapacity];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n start = 0;\r\n }", "private void resize(int cap) {\n Item[] temp = (Item[]) new Object[cap];\n for(int i = 0; i < size; i++)\n temp[i] = rqArrays[i];\n rqArrays = temp;\n }", "protected Object[] freshElemArray(int capacity) {\n return new Object[capacity];\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}", "private void expand(int newCapacity) {\r\n\t\tcapacity = newCapacity;\r\n\t\tsize = 0;\r\n\t\tLinkedList<KVPair>[] hashMapNew = hashMapArray;\r\n\t\thashMapArray = new LinkedList[newCapacity];\r\n\t\tfor (LinkedList<KVPair> i : hashMapNew) {\r\n\t\t\tif (i != null) {\r\n\t\t\t\tfor (int j = 0; j < i.size(); j++) {\r\n\t\t\t\t\tK putKey = i.get(j).getKey();\r\n\t\t\t\t\tV putValue = i.get(j).getValue();\r\n\t\t\t\t\tput(putKey, putValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}", "public void ensureCapacity(int minimumCapacity) {\n\t\tCell[] biggerArray;\n\t\tint n1, n2;\n\n\t\tif (data.length >= minimumCapacity)\n\t\t\treturn; // Do Nothing\n\t\telse if (manyItems == 0) {\n\t\t\tdata = new Cell[minimumCapacity];\n\t\t} else if (front <= rear) {\n\t\t\tbiggerArray = new Cell[minimumCapacity];\n\t\t\tSystem.arraycopy(data, front, biggerArray, front, manyItems);\n\t\t\tdata = biggerArray;\n\t\t} else {\n\t\t\tbiggerArray = new Cell[minimumCapacity];\n\t\t\tn1 = data.length - front;\n\t\t\tn2 = rear + 1;\n\t\t\tSystem.arraycopy(data, front, biggerArray, 0, n1);\n\t\t\tSystem.arraycopy(data, 0, biggerArray, n1, n2);\n\t\t\tfront = 0;\n\t\t\trear = manyItems - 1;\n\t\t\tdata = biggerArray;\n\t\t}\n\t}", "private void increase_capacity() {\r\n Object[] temp = new Object[capacity = capacity + capacity/2];\r\n for (int i = 0;i < stack.length ;i++) {\r\n temp[i] = stack[i];\r\n }\r\n stack = temp;\r\n }", "private void expandCapacity() {\n\t\tT[] larger = (T[]) (new Object[stack.length*2]);\t\t//double size of previous stack\n\t\t\n\t\tfor(int i = 0; i < stack.length; i++)\n\t\t\tlarger[i] = stack[i];\n\t\t\n\t\tstack = larger;\n\t}", "private void ensureCapacity()\n {\n if (numberOfEntries >= dictionary.length - 1)\n {\n int newCapacity = 2 * dictionary.length;\n checkCapacity(newCapacity); // Is capacity too big?\n dictionary = Arrays.copyOf(dictionary, newCapacity + 1);\n } // end if\n }", "@SuppressWarnings(\"unchecked\")\n protected static <K, V> HPTNode<K, V>[] reallocate(int capacity) {\n return (HPTNode<K, V>[]) new HPTNode[capacity];\n }", "private void reallocate() {\r\n //elem = java.util.Arrays.copyOf(elem, elem.length * 2);\r\n E[] temp = (E[]) new Object[elem.length * 2];\r\n int i = 0;\r\n while (elem[i] != null) {\r\n temp[i] = elem[i];\r\n i++;\r\n }\r\n int j = elem.length - 1;\r\n int k = temp.length - 1;\r\n while (elem[i] != null) {\r\n temp[k] = elem[j];\r\n j--;\r\n k--;\r\n }\r\n front = k;\r\n elem = temp;\r\n }", "private void resize(int newSize){\n Item[] temp = (Item[]) new Object[newSize]; //newsize\n for(int i=0; i<itemCount; i++){\n temp[i] = array[i]; // fill temp with array's stuff\n }\n array = temp; // reset array to temp\n }", "@Override\n public void ensureCapacity(int index) {\n\n }", "Object createArray(int capacity);", "@SuppressWarnings(\"unchecked\")\r\n private void resize(int capacity) {\r\n \r\n T[] array = (T[]) new Object[capacity];\r\n for (int i = 0; i < size(); i++) {\r\n array[i] = elements[i];\r\n }\r\n elements = array;\r\n }", "private void resize(int capacity) {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++) {\r\n temp[i] = list[(first + i) % list.length];\r\n }\r\n list = temp;\r\n first = 0;prior=list.length-1;\r\n last = n-1;latter=n;}", "private void expandCapacity()\r\n {\r\n T[] larger = (T[])(new Object[stack.length*2]);\r\n \r\n for (int index=0; index < stack.length; index++)\r\n larger[index] = stack[index];\r\n \r\n stack = larger;\r\n }", "private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }", "public void ensureCapacity(int minCap){\n if(minCap > data.length){\n int newCapa = (data.length * 3)/ 2 +1;\n if(newCapa < minCap){\n newCapa = minCap;\n }\n data = Arrays.copyOf(data, newCapa);\n }\n }", "public void ensureCapacity(int minCapacity);", "private static char[] expand(char[] array, int neededSpace, int size)\r\n/* 108: */ {\r\n/* 109:125 */ int newCapacity = array.length;\r\n/* 110: */ do\r\n/* 111: */ {\r\n/* 112:128 */ newCapacity <<= 1;\r\n/* 113:130 */ if (newCapacity < 0) {\r\n/* 114:131 */ throw new IllegalStateException();\r\n/* 115: */ }\r\n/* 116:134 */ } while (neededSpace > newCapacity);\r\n/* 117:136 */ char[] newArray = new char[newCapacity];\r\n/* 118:137 */ System.arraycopy(array, 0, newArray, 0, size);\r\n/* 119: */ \r\n/* 120:139 */ return newArray;\r\n/* 121: */ }", "private void expandArray(int expandSize) {\n\t\tif(expandSize < 1) {\n\t\t\treturn;\n\t\t}\n\t\t// Save current array reference, and create new array size\n\t\tObject[] temp = array;\n\t\tthis.array = new Object[temp.length + expandSize]; // same as [this.array.length + expandSize]\n\n\t\t// If there is any 'wrap around' data, copy data up to the end of the array and copy the wrap around data\n\t\tif(index+length > temp.length) {\n\t\t\t// Copy everything up to the end of the old array\n\t\t\tSystem.arraycopy(temp, index, array, index, temp.length - index);\n\n\t\t\t// Calculate the remaining number of elements that need copying\n\t\t\tint remaining = (length - (temp.length - index));\n\t\t\t// Determine if all of the wrap around elements can fit in the remaining space at the end of the\n\t\t\t// expanded array\n\t\t\tint tailSize = 0;\n\t\t\tif(remaining < expandSize) { tailSize = remaining; }\n\t\t\telse { tailSize = expandSize; }\n\n\t\t\t// Copy the wrap around elements into the expanded array up to the end of the expanded array\n\t\t\tSystem.arraycopy(temp, 0, array, temp.length, tailSize);\n\t\t\t// Wrap around and copy any remaining wrap around elements\n\t\t\tif(remaining > tailSize) {\n\t\t\t\tSystem.arraycopy(temp, tailSize, array, 0, remaining-tailSize);\n\t\t\t}\n\t\t}\n\t\t// Else none of the data 'wraps around', so everything can be copied at once\n\t\telse {\n\t\t\tSystem.arraycopy(temp, index, array, index, length);\n\t\t}\n\t}", "private void grow(int minCapacity) {\n // overflow-conscious code\n int oldCapacity = buf.length;\n int newCapacity = oldCapacity << 1;\n if (newCapacity - minCapacity < 0) {\n newCapacity = minCapacity;\n }\n if (newCapacity - MAX_ARRAY_SIZE > 0) {\n newCapacity = hugeCapacity(minCapacity);\n }\n buf = Arrays.copyOf(buf, newCapacity);\n }", "private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}", "public GenericDynamicArray(int initialCapacity) {\n if (initialCapacity < 0) throw new IllegalArgumentException(\"Illegal array size: \" + initialCapacity);\n this.capacity = initialCapacity;\n genericArrayList = (T[]) new Object[initialCapacity];\n }", "private void ensureCharacterArrayCapacity(int requiredCapacity) {\n int capacity = characterArray.length;\n if (requiredCapacity > capacity) {\n while (capacity < requiredCapacity) {\n capacity <<= 1;\n }\n\n // Expand the character array.\n characterArray = ArrayHelper.expandArray(characterArray, capacity);\n }\n }", "private void grow() {\n int oldCapacity = heap.length;\n // Double size if small; else grow by 50%\n int newCapacity = oldCapacity + ((oldCapacity < 64) ?\n (oldCapacity + 2) :\n (oldCapacity >> 1));\n Object[] newQueue = new Object[newCapacity];\n for (int i = 0; i < heap.length; i++) {\n newQueue[i] = heap[i];\n }\n heap = newQueue;\n }", "public void resizeByLinearize(int newcapacity){\n Object []lin=new Object[newcapacity];\n int k=start;\n for(int i=0;i<size;i++){\n lin[i]=cir[k];\n k=(k+1)%cir.length;\n }\n cir=new Object[newcapacity];\n for(int i=0;i<size;i++){\n cir[i]=lin[i];\n }\n \n }", "private void ensureCapacity(){\n if(topIndex >= stack.length - 1){\n int newLength = 2 * stack.length;\n stack = Arrays.copyOf(stack, newLength);\n }\n }", "public void reSize() {\n int newSize = arr.length * 2;\n arr = Arrays.copyOf(arr, newSize);\n }", "void resize() {\n Comparable[] temp = new Comparable[size * 2];\n for (int i = 0; i < pq.length; i++) {\n temp[i] = pq[i];\n }\n pq = temp;\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "private void expand() { \n\t\tComparable[] temp = new Comparable[ _data.length * 2 ];\n\t\tfor( int i = 0; i < _data.length; i++ )\n\t \ttemp[i] = _data[i];\n\t\t_data = temp;\n }", "public Array(int capacity)\n {\n array = new Object[capacity];\n }", "private void ensureIntArrayCapacity(int requiredCapacity) {\n int capacity = intArray.length;\n if (requiredCapacity > capacity) {\n while (capacity < requiredCapacity) {\n capacity <<= 1;\n }\n\n // Expand the character array.\n intArray = ArrayHelper.expandArray(intArray, capacity);\n }\n }", "private void resizeArray(int length) {\n Item[] newItems = (Item[]) new Object[length];\n\n for (int x=0; x<size; x++) {\n newItems[x] = items[x];\n }\n\n items = newItems;\n }", "private void ensureCapacityInternal(int minCapacity) {\n if (element == DEFAULTCAPACITY_EMPTY_ELEMENTDATA) {\n minCapacity = Math.max(DEFAULT_CAPACITY, minCapacity);\n }\n modCount++;\n if (minCapacity - element.length > 0) {\n // overflow-conscious code\n int oldCapacity = element.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n if (newCapacity - minCapacity < 0)\n newCapacity = minCapacity;\n if (newCapacity - MAX_ARRAY_SIZE > 0)\n newCapacity = hugeCapacity(minCapacity);\n // minCapacity is usually close to size, so this is a win:\n element = Arrays.copyOf(element, newCapacity);\n }\n }", "public MutableArray(int capacity) {\r\n\t\tif(capacity < 1)\r\n\t\t\tcapacity = 1;\r\n\t\tbackingArray = new Object[capacity];\r\n\t}", "private void reallocateArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tTableEntry<K, V>[] newTable = new TableEntry[table.length * 2];\r\n\t\tTableEntry<K, V> currentElement = null, nextElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\t\t\tnextElement = currentElement.next;\r\n\r\n\t\t\twhile (currentElement != null) {\r\n\t\t\t\tcurrentElement.next = null;\r\n\t\t\t\taddTableEntry(currentElement, newTable);\r\n\r\n\t\t\t\tcurrentElement = nextElement;\r\n\t\t\t\tnextElement = currentElement == null ? null : currentElement.next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttable = newTable;\r\n\t}", "private void expandCapacity() {\n T[] tempVertices = (T[])(new Object[vertices.length * 2]);\n int[][] tempEdges = new int[vertices.length * 2][vertices.length * 2];\n \n for (int i = 0; i < n; i++) {\n tempVertices[i] = vertices[i];\n for (int j = 0; j < n; j++) {\n tempEdges[i][j] = edges[i][j];\n }\n }\n \n vertices = tempVertices;\n edges = tempEdges;\n }", "public int capacity()\r\n/* 81: */ {\r\n/* 82:116 */ ensureAccessible();\r\n/* 83:117 */ return this.array.length;\r\n/* 84: */ }", "public void resize()\r\n\t{\r\n\t\tif(nItems >= arraySize/2)\t\t\t\t\t\t\t\t\t\t\t\t//If array is half full, the array becomes twice as large.\r\n\t\t{\t\t\t\r\n\t\t\tItem[] tempArray = (Item[]) new Object[2*arraySize];\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < nItems; i++)\r\n\t\t\t{\r\n\t\t\t\ttempArray[i] = q[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq = tempArray;\t\t\t\t\t\t\t\t\t\t\t\t//Re-initialization of q array.\r\n\t\t\tarraySize = 2*arraySize;\t\t\t\t\t\t\t\t\t\t\t//Array size is doubled.\r\n\t\t}\r\n\t\telse if(nItems <= arraySize/4)\t\t\t\t\t\t\t\t\t\t\t//If array is a quarter full, the array size is halved.\r\n\t\t{\r\n\t\t\tItem[] tempArray = (Item[]) new Object[arraySize/2];\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < nItems; i++)\r\n\t\t\t{\r\n\t\t\t\ttempArray[i] = q[i];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq = tempArray;\t\t\t\t\t\t\t\t\t\t\t\t//Re-initialization of q array.\r\n\t\t\tarraySize = arraySize/2;\t\t\t\t\t\t\t\t\t\t\t//Array size is halved.\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "public void resizeStartUnchanged(int newCapacity) {\r\n Object[] temp = new Object[newCapacity];\r\n int k = start;\r\n int p = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[p] = cir[k];\r\n p = (p + 1) % temp.length;\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }", "@SuppressWarnings(\"unchecked\")\n public GrowingStatementArray(int initialCapacity) {\n this.arr = new Statement[initialCapacity];\n }", "public void reAllocate() {\n\t\tmat_ = new double[n_][hbw_ + 1];\n\t}", "private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}", "private void resize(int newCapacity){\n ArrayList<ArrayList<Entry>> newBuckets = new ArrayList<>();\n for (int i = 0; i < newCapacity; i++) {\n newBuckets.add(new ArrayList<>());\n }\n\n for(K key:this){\n int newIndex=reduce(key,newCapacity);\n newBuckets.get(newIndex).add(new Entry(key,get(key)));\n\n }\n\n buckets=newBuckets;\n numBuckets=newCapacity;\n\n }", "private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "private void ensureCapacity(int count) {\n\t\tint capacity = getCapacity();\n\t\t\n\t\tint newLength = length + count;\n\t\tif (capacity >= newLength)\n\t\t\treturn;\n\n\t\t// Double capacity\n\t\tcapacity <<= 1;\n\t\t\n\t\tif (newLength > capacity)\n\t\t\tcapacity = newLength;\n\n\t\tchar[] newBuffer = new char[capacity];\n\t\tSystem.arraycopy(buffer, 0, newBuffer, 0, length);\n\t\tbuffer = newBuffer;\n\t}", "private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}", "private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }", "protected void grow()\r\n\t{\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting grow\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] temp = new int[count*2];\r\n\t\t\r\n\t\tfor(int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\ttemp[index] = numArray[index];\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Debug - temp[index] = \" + temp[index]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnumArray = temp;\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending grow\");\r\n\t\t}\r\n\t}", "private void resizeArray()\n {\n int[] temp = new int[integerList.length * 2];//Create new array with twice the size.\n for(int i = 0; i < integerList.length; i++)//Populate new array with data from old array\n {\n temp[i] = integerList[i];\n }\n integerList = temp;//Set the integerList to point to the new array.\n }", "private Object[] resize(E[] elems, int newsize){\n if(newsize < 0){\n throw new IllegalArgumentException();\n // UP FOR CHANGE\n }\n E[] newelems = (E[])(new Comparable[newsize]);\n if (elems == null){\n return newelems;\n }\n // Add elements back in\n System.arraycopy(elems, 0, newelems, 0, Math.min(elems.length, newsize));\n\n return newelems;\n }", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "private void resize(int capacity) {\r\n assert capacity > N;\r\n PuzzleBoard[] temp = new PuzzleBoard[capacity];\r\n for (int i = 1; i <= N; i++) {\r\n temp[i] = pq[i];\r\n }\r\n pq = temp;\r\n }" ]
[ "0.74355954", "0.73727447", "0.73171073", "0.7279275", "0.7147237", "0.71083957", "0.7107402", "0.7070864", "0.7034882", "0.7000838", "0.6972654", "0.69267106", "0.690593", "0.6887336", "0.687732", "0.6870693", "0.6865834", "0.6858927", "0.6836334", "0.68337744", "0.6799619", "0.67480826", "0.6731993", "0.6720068", "0.66957664", "0.66772974", "0.6667302", "0.66638625", "0.6661855", "0.6655233", "0.6648579", "0.664442", "0.6636719", "0.65860826", "0.6585114", "0.6561756", "0.6552712", "0.6536985", "0.6527524", "0.6518527", "0.6512661", "0.6510715", "0.6509248", "0.64919263", "0.64347297", "0.64317256", "0.6415538", "0.64084166", "0.6392712", "0.6371561", "0.634243", "0.6334479", "0.6313319", "0.63085604", "0.6298118", "0.62965983", "0.6286466", "0.62632966", "0.6255923", "0.6249594", "0.6247342", "0.6246229", "0.62389827", "0.6233534", "0.622781", "0.6226686", "0.6223815", "0.6220551", "0.6210844", "0.6202269", "0.6197504", "0.61973757", "0.61837107", "0.61603475", "0.61545885", "0.615399", "0.6152522", "0.61445946", "0.6132111", "0.612463", "0.61234266", "0.61199236", "0.6116954", "0.61105585", "0.61068994", "0.608239", "0.60804474", "0.60803694", "0.60782564", "0.607793", "0.60616535", "0.60425156", "0.60416675", "0.603855", "0.6026763", "0.6025854", "0.60192734", "0.60128623", "0.60113984", "0.60100937" ]
0.73769885
1
method toString() returns the string interpretation of the Dynamic Array Time Complexity is O(n) linear
public String toString() { String temp = ""; temp += "[ "; for (int i = 0; i < elements.length - 1; i++) { temp += elements[i] + ","; } temp += elements[this.elements.length - 1]; temp += " ]\n"; return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\t\tString str = new String ();\n\t\tfor (int i = 0; i <size; i++)\n\t\t{\n\t\t\tstr +=\"(\" + i +\")\" + arr[i] + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}", "public String toString() {\n if (N == 0) return \"[ ]\";\n String s = \"\";\n s = s + \"[ \";\n for (int i = 0; i <= N; i++)\n s = s + a[i] + \" \";\n s = s + \"]\";\n return s;\n }", "@Override\n public String toString() {\n String arrString = \"\";\n \n //loop to add all the elements\n for (int i = 0; i < this.array.length; i++) {\n arrString = arrString + \" \" + this.array[i];\n }\n \n return arrString;\n }", "public String toString() {\n String[] collect = new String[this.array.length];\n for (int i = 0; i < this.array.length; i++) {\n collect[i] = String.valueOf(this.array[i]);\n }\n return \"[\" + String.join(\";\", collect) + \"]\";\n }", "public String toString()\r\n {\r\n String result = \"\";\r\n for ( int i = 0; i < SIZE; i++)\r\n {\r\n result = myArray[i] + result;\r\n }\r\n return result;\r\n \r\n }", "public String toString() { \n\t\t String str=\"\";\n\t\t for(int i=0; i< size; i++)\n\t\t\t str += data[i]+\" \";\n\t\t return str;\n\t }", "public String toString()\n {\n // create a counter called count\n int count = 0;\n // create empty string for concatenation purposes\n String retString = \"\";\n while(count < size)\n {\n // appending to retString\n retString += arr[count] + \" \";\n // increment count\n count++;\n }\n return retString;\n }", "public String toString()\r\n\t{\r\n\t\tString s=\"\";\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t{\r\n\t\t\ts+=a[i]+\" \";\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public String toString() {\n int[] d = new int[size];\n for (int k=0; k<size; k++)\n d[k] = data[k];\n return Arrays.toString(d);\n }", "public String toString()\n {\n\n String elem;\n StringBuilder s = new StringBuilder();\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array1[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n s.append('|');\n for(int i = 0 ; i < n ; i++)\n {\n elem = Integer.toString(array2[i]);\n s.append(elem);\n if(i < (n-1))\n s.append(',');\n }\n return s.toString();\n }", "public String toString(){\r\n\t\tString theString= \"\";\r\n\t\t\r\n\t\t//loop through and add values to the string\r\n\t\tfor (int i = 0; i < this.data.length; i++)\r\n\t\t{\r\n\t\t\ttheString = theString + this.data[i];\r\n\t\t\tif (i != this.data.length - 1)\r\n\t\t\t{\r\n\t\t\t\ttheString = theString + \", \";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn \"[\" + theString + \"]\";\r\n\t}", "@Override\n public String toString(){\n String result = \"\";\n for(int i = 0; i < numItems; i++){\n result += arr[i] + \" \";\n }\n return result;\n }", "public String toString(){\n\treturn Arrays.toString(a);\n }", "public String toString(){\r\n\t \tString str = \"\";\r\n\t \tint i=0;\r\n\t \tfor(; i < numElems-1; i++){\r\n\t \t\tstr += array[i].toString();\r\n\t \t\tstr += \", \";\r\n\t \t}\r\n\t \tstr += array[numElems-1];\r\n\t \treturn str;\r\n\t }", "@Override\n public final String toString() {\n final int[] temp = new int[size];\n for (int i = 0; i < size; i++) {\n temp[i] = arrayList[i];\n }\n return Arrays.toString(temp);\n }", "@Override\n\tpublic String toString() {\n\t\tString s = \"\";\n\t\ts += \"[\";\n\t\tif (size() > 0) {\n\t\t\ts += arr[0];\n\t\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\t\ts += \", \" + arr[i];\n\t\t\t}\n\t\t}\n\t\ts += \"]\";\n\t\treturn s;\n\t}", "@Override\n public String toString() {\n double[][] temp = matx.getArray();\n String tempstr = \"[\";\n for (int i = 0; i < temp.length; i++) {\n for (int j = 0; j < temp.length; j++) {\n tempstr += (int) temp[i][j] + \", \";\n }\n tempstr = tempstr.substring(0, tempstr.length() - 2);\n tempstr += \"]\\n[\";\n }\n return tempstr.substring(0, tempstr.length() - 2);\n }", "public String toString() {\n int iMax = array.length - 1;\n if (iMax == -1)\n return \"[]\";\n\n StringBuilder b = new StringBuilder();\n b.append('[');\n for (int i = 0; ; i++) {\n b.append(getRaw(byteOffset(i)));\n if (i == iMax)\n return b.append(']').toString();\n b.append(',').append(' ');\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic String toString()\r\n\t{\r\n\t\tString result =\"Table:\\n\";\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t{ \r\n\t\t\tLinkedArrays<T> L = (LinkedArrays<T>) table[i]; \r\n\t\t\tresult+= i+\": \";\r\n\t\t\tresult+= L.toString() ;\r\n\t\t\tif(i<this.tableSize-1)\r\n\t\t\t{ result +=\"\\n\"; }\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\treturn result;\r\n\t}", "public String toString()\n\t{\n\t\t// For empty array\n\t\tif(length() < 1)\n\t\t\tSystem.out.print(\"\");\n\t\tString output = \"\";\n\n\t\tfor(int index = 0; index < length(); index++)\n\t\t{\n\t\t\toutput = output + data[index];\n\t\t\tif(index+1 < length())\n\t\t\t{\n\t\t\t\toutput = output + \" \";\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }", "public String toString(){\r\n\t\tString output = \"\";\r\n\t\tfor(String s: this.data){\r\n\t\t\toutput = output + s + \"\\t\";\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}", "public String toString() {\r\n\t\tString out = \"\";\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tout += this.objectHeap[i] + \" \" + this.costHeap[i] + \"\\n\";\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", blocks[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", matrix[i][j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString() {\n\t\tStringBuilder tmpStringBuilder = new StringBuilder(\"(\");\n\t\tint frontIndex = theFrontIndex;\n\t\tfor (int j = 0; j < theSize; j++) {\n\t\t\tif (j > 0)\n\t\t\t\ttmpStringBuilder.append(\", \");\n\t\t\ttmpStringBuilder.append(theData[frontIndex]);\n\t\t\tfrontIndex = (frontIndex + 1) % theData.length;\n\t\t}\n\t\ttmpStringBuilder.append(\")\");\n\t\treturn tmpStringBuilder.toString();\n\t}", "public String toString() {\n\t\tString str = \"\";\n\t\tfor(int i = 0;i < data.length;i++) {\n\t\t\tstr = str + data[i];\n\t\t}\n\t\tif(overflow) {\n\t\t\treturn \"Overflow\";\n\t\t}else {\n\t\t\treturn str;\n\t\t}\n\t}", "public synchronized String toString()\n\t{\n\t\treturn Arrays.toString(array);\n\t}", "public String toString() {\n \n StringBuffer buffer = new StringBuffer();\n \n buffer.append( String.format( \"Size=%d, A = [ \", size ) );\n \n if ( !isEmpty() ) {\n \n for ( int i=0; i<size-1; i++ ) {\n buffer.append( String.format( \"%d, \", get(i) ) ); \n }\n \n buffer.append( String.format( \"%d ]\", get(size-1 ) ) );\n \n } else {\n \n buffer.append( \"] \" );\n }\n \n return buffer.toString();\n \n }", "public String toString(){\r\n\t\treturn Arrays.toString(ray)+\"\";\r\n\t}", "public String toString(){\n\t\tStringBuilder output = new StringBuilder();\n\t\tfor(int i = 0; i<this.size; i++){\n\t\t\tfor(int j=0; j<this.size; j++){\n\t\t\t\toutput.append(this.numbers[i][j] + \"\\t\");\n\t\t\t}\n\t\t\toutput.append(\"\\n\");\n\t\t}\n\t\treturn output.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (size() == 0) {\n\t\t\treturn \"[]\";\n\t\t} else if (size() == 1) {\n\t\t\treturn \"[\" + arr[0] + \"]\";\n\t\t} else {\n\t\t\t// size() >= 2\n\t\t\tString result = \"[\" + arr[0];\n\t\t\tfor (int i = 1; i < end; ++i) {\n\t\t\t\tresult += \", \" + arr[i];\n\t\t\t}\n\t\t\treturn result + \"]\";\n\t\t}\n\t}", "public String toString() {\n\t\treturn Arrays.toString(data);\n\t}", "public String toString() {\r\n\t\tString salida = \"El inicio de la subsecuencia maxima es \" + izq\r\n\t\t\t\t+ \", el final \" + der + \", la suma maxima es \" + sumaMax\r\n\t\t\t\t+ \" y los datos son \";\r\n\t\tfor (int a : array)\r\n\t\t\tsalida += a + \" \";\r\n\t\treturn salida;\r\n\t}", "public String toString() {\n String s = \"\";\n try {\n s += get_nodeid()+\"\\t\";\n //s += \" [nodeid=0x\"+Long.toHexString(get_nodeid())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += get_counter()+\"\\t\";\n //s += \" [counter=0x\"+Long.toHexString(get_counter())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+get_p_sendts()+\"\\t\";\n //s += \" [p_sendts=0x\"+Long.toHexString(get_p_sendts())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+get_receivets()+\"\\t\";\n //s += \" [receivets=0x\"+Long.toHexString(get_receivets())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_virtual_clk())+\"\\t\";\n //s += \" [virtual_clk=\"+Float.toString(get_virtual_clk())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_skew_cmp())+\"\\t\";\n //s += \" [skew_cmp=\"+Float.toString(get_skew_cmp())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \"\"+Float.toString(get_offset_cmp())+\"\";\n //s += \" [offset_cmp=\"+Float.toString(get_offset_cmp())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n return s;\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb=new StringBuilder();\n\t\tif(isEmpty()){\n\t\t\tsb.append(String.format(\"ArrayQueueLoop:[] %d/%d\",size,data.length));\n\t\t}else{\n\t\t\tsb.append(\"ArrayQueueLoop:[\");\n\t\t\tfor(int i=front;i!=rear;i=(i+1)%data.length){\n\t\t\t\tif((i+1)%data.length==rear){\n\t\t\t\t\tsb.append(data[i]+\"]\");\n\t\t\t\t}else{\n\t\t\t\t\tsb.append(data[i]+\",\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(String.format(\" %d/%d\",size,data.length));\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "@Override\n public String toString() {\n StringBuilder string = new StringBuilder();\n string.append(\"size=\").append(size).append(\", [\");\n for (int i = 0; i < size; i++) {\n if (i != 0) {\n string.append(\", \");\n }\n\n string.append(elements[i]);\n\n//\t\t\tif (i != size - 1) {\n//\t\t\t\tstring.append(\", \");\n//\t\t\t}\n }\n string.append(\"]\");\n return string.toString();\n }", "public String toString()\n\t{\n\t\tSystem.out.print(\"Array list contains: [ \");\n\t\tfor(int i=0; i<size; i++)\n\t\t\tSystem.out.print(myArray[i]+ \", \");\n\t\treturn\" ]\";\n\t}", "private String arrayToString(double[] a) {\n StringBuffer buffy = new StringBuffer();\n for (int i=0; i<a.length; i++) {\n buffy.append(a[i]+\"\\t\");\n }\n return buffy.toString();\n }", "private String arrayToString(double[] a) {\n StringBuffer buffy = new StringBuffer();\n for (int i=0; i<a.length; i++) {\n buffy.append(a[i]+\"\\t\");\n }\n return buffy.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tif (size == 0) {\r\n\t\t\treturn \"[]\";\r\n\t\t}\r\n\r\n\t\tString s = \"[\";\r\n\r\n\t\tint currentRow = 0;\r\n\t\twhile (table[currentRow] == null) {\r\n\t\t\tcurrentRow++;\r\n\t\t}\r\n\r\n\t\ts += table[currentRow].toString();\r\n\t\ts += rowOfEntriesToString(table[currentRow].next);\r\n\r\n\t\tcurrentRow++;\r\n\r\n\t\twhile (currentRow < table.length) {\r\n\t\t\ts += rowOfEntriesToString(table[currentRow]);\r\n\t\t\tcurrentRow++;\r\n\t\t}\r\n\r\n\t\ts += \"]\";\r\n\t\treturn s;\r\n\t}", "public String toString() {\n\t \tif(size == 0) {\n\t \t\treturn \"[]\";\n\t \t}else {\n\t \t\t\n\t \t\tString result = \"[\" + elementData[0];\n\t \t\tfor(int i = 1; i < size; i++) {\n\t \t\t\tresult += \", \" + elementData[i];\n\t \t\t}\n\t \t\t\n\t \t\tresult += \"]\";\n\t \t\t\n\t \t\treturn result;\n\t \t}\n\t }", "public String toString() {\n\t\tString s = \"\";\n\t\tfor (Coord x : array)\n\t\t\ts += x;\n\t\treturn s;\n\t}", "public String toString() { return new String(b,0,i_end); }", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dimension + \"\\n\");\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n s.append(String.format(\"%2d \", (int) blocks[i * dimension + j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "public String toString(){\r\n\t\tString ret = \"MatrixArray:\\n\";\r\n\t\tfor (int i = 0; i < this.MA.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.MA[i].length; j++){\r\n\t\t\t\tif (j > 0) {\r\n\t\t\t\t\tret += \", \";\r\n\t\t }\r\n\t\t ret += String.valueOf(this.MA[i][j]);\r\n\t\t\t}\r\n\t\t\tret += \"\\n\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public String toString() {\n String sorted = \"[\";\n for (int i = 0; i < size - 1; i++) {\n sorted = sorted + array[i] + \", \";\n }\n sorted = sorted + array[size - 1] + \"]\";\n return sorted;\n }", "public String toString() {\r\n\t\tString elements = \"<\";\r\n\t\t\r\n\t\tfor(int i = 0; i < count; i++) {\r\n\t\t\telements += \" \" + array[i];\r\n\t\t\t}\r\n\t\t\r\n\t\t\telements += \" >\";\r\n\t\t\treturn elements;\r\n\t }", "public String toString() {\n\t \t\treturn \"(\" + i + \", \" + j + \")\";\n\t \t}", "@Override\r\n\tpublic String toString(){\r\n\t\tString output = \"[ \";\r\n\t\tIterator<Object> it = iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tObject n = it.next();\r\n\t\t\toutput += n + \" \"; \r\n\t\t}\r\n\t\toutput += \"]\";\r\n\t\treturn output;\r\n\t}", "public String[] toStringArray()\r\n {\r\n String[] a = new String[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (String) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public String toString()\n/* */ {\n/* 210 */ return \"[array type, component type: \" + this._componentType + \"]\";\n/* */ }", "public String toString()\n {\n\t return \"[\" + data + \"]\";\n }", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n for (double[] b : matrix) {\n builder.append(\"\\n\");\n for (double c : b) {\n builder.append(c).append(\" \");\n }\n }\n return builder.toString();\n }", "public String toString() {\n String result = \"[\";\n if (!isEmpty()) {\n result += elementData[1];\n for (int i = 2; i <= size; i++) {\n result += \", \" + elementData[i];\n }\n }\n return result + \"]\";\n }", "@Override\n public String toString() {\n return Arrays.toString(heap);\n }", "public String toString2()\n {\n\t String queueToString = \"\";\n\t int i =1;\n\t for(Generics object: AL)\n\t {\n\t\t queueToString += i + \". \";\n\t\t //queueToString+= StateStatistics.KeyType.name;\n\t\t queueToString += object.getName() + \": \" + object.toString();\n\t\t queueToString += \"\\n \";\n\t\t i++;\n\t }\n\t \n\t //queueToString += \"]\";\n\t \n\t return queueToString;\n }", "public String toString() {\n\tString retStr = \"\";\n\tfor (int r = 0; r < this.size(); r++){\n\t for (int c = 0; c < this.size(); c++){\n\t\tretStr += matrix[r][c] + \"\\t\";\n\t }\n\t retStr += \"\\n\";\n\t}\n\treturn retStr;\n }", "public String toString(){\r\n\t\tString desc = \"[\";\r\n\t\tfor(Character c : used){\r\n\t\t\tdesc += c;\r\n\t\t\tSystem.out.println(\"hashCode of \" + c + \":\" + c.hashCode());\r\n\t\t}\r\n\t\treturn desc + \"]\";\r\n\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic String toString() {\n\t\tString mystr=\" \";\n\t\tmystr +=(T)_keepadr[index];\n\t\treturn mystr;\n\t\t\n\t\t\n\t}", "@Override\n\tpublic String toString() {\n\t\tString s = \"[\";\n\t\tif(this.vector != null) {\n\t\t\tfor(int i = 0; i < this.vector.size(); i++) {\n\t\t\t\ts = s + this.vector.get(i);\n\t\t\t\tif(i != this.vector.size()-1) s = s + \",\";\n\t\t\t}\n\t\t}\n\t\ts = s + \"]\";\n\t\treturn s;\n\t}", "public String[] toStrings();", "public String toString(){\n String string = new String();\n for(int i = 0; i < axis.length; i++){\n string += axis[i];\n if(i != (axis.length - 1)){\n string += \" / \";\n }\n }\n return string;\n }", "public String toString() {\n\t\tString str = \"\";\n\t\tfor (int i = 1 ; i < size - 1; i++ ){\n\t\t\tstr = str + getBlock(i);\n\t\t}\n\t\treturn str;\n\t}", "@Override\n public String toString() {\n if (arrayLen != 1) {\n setLength(stringArray, arrayLen);\n String s = join(stringArray);\n // Create a new array to allow everything to get GC'd.\n stringArray = new String[] {s};\n arrayLen = 1;\n }\n return stringArray[0];\n }", "public String toString()\n {\n\n String str = \"[\";\n Iterator<E> iterate = iterator();\n if (size == 0)\n {\n return \"[]\";\n }\n while (iterate.hasNext())\n {\n str += (iterate.next() + \", \");\n }\n return str.substring(0, str.length() - 2) + \"]\";\n }", "public String toString()\n\t{\n\t\t//DecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tString report = \"\";\n\t\treport += \"m = \" + rows + \"\\n\";\n\t\treport += \"n = \" + cols + \"\\n\";\n\t\treport += \"[ | ] = \" + \"\\n\";\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < cols+1; j++)\n\t\t\t{\n\t\t\t\treport += /*df.format*/(A[i][j]) + \" \";\n\t\t\t}\n\t\t\treport += \"\\n\";\n\t\t}\n\t\treturn report;\n\t}", "public String toString(){\n String s = \"\";\n s += \"\\t\";\n \n for (int i = 0; i < n; i++){\n // adding vertices for columns\n s += vertices[i] + \"\\t\";\n }\n \n s += \"\\n\";\n \n for (int i = 0; i < n; i++){\n s += vertices[i] + \"\\t\"; // vertex for row\n for (int j = 0; j < n; j++){\n s += edges[j][i] + \"\\t\"; // adding edges across row\n }\n s += \"\\n\";\n }\n \n return s;\n }", "public String toString() {\n String res = String.format(\"(%2d,%2d):\", n, H.length);\n for (int i = 0; i < n; ++i)\n res += String.format(\" %3d\", H[i]);\n if (n != 0) res += \";\"; else res += \" \";\n if (n < H.length) {\n res += String.format(\"%3d\", H[n]);\n for (int i = n+1; i < H.length; ++i)\n res += String.format(\" %3d\", H[i]);\n }\n return res;\n }", "public String toString() {\r\n String result = new String();\r\n for (int i = getSize() - 1; i >= 0; i--) result+=getDigit(i);\r\n return result;\r\n }", "public String toString() ;", "public @Override String toString() {\n String res= \"[\";\n // invariant: res = \"[s0, s1, .., sk\" where sk is the object before node n\n for (Node n = sentinel.succ; n != sentinel; n= n.succ) {\n if (n != sentinel.succ)\n res= res + \", \";\n res= res + n.data;\n }\n return res + \"]\";\n }", "public String toString() {\n\t\treturn Arrays.toString(ram);\n\t}", "public String toString() {\n if (size > 0) {\n String display = \"[\";\n for (int i = 0; i < size - 1; i++) {\n display += list[i] + \",\";\n } display += list[size - 1] + \"]\";\n return display;\n }\n return \"[]\";\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder();\n int N = size();\n s.append(N + \"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", tileAt(i,j)));\n }\n s.append(\"\\n\");\n }\n /*\n s.append(manhattan());\n s.append(\"\\n\");\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n s.append(String.format(\"%2d \", _goal[i][j]));\n }\n s.append(\"\\n\");\n }*/\n s.append(\"\\n\");\n return s.toString();\n }", "public String toString() {\n\tString HashTable=\"\";\n\tfor(int i=0;i<this.capacity;i++) {\n\t for(MyEntry k:table[i]) {\n\t\tHashTable=HashTable+k.value+\" \"+k.key+\"\\n\";\n\t }\n\t}\n\treturn HashTable;\n }", "@Override\n public String toString()\n {\n return Arrays.toString(this.toArray());\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n output.append(\"{\\n\");\n for (int i=0; i<rows; i++) {\n output.append(Arrays.toString(matrix.get(i)) + \",\\n\");\n }\n output.append(\"}\\n\");\n return output.toString();\n }", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();" ]
[ "0.71447587", "0.7126797", "0.69063455", "0.68889993", "0.6864462", "0.6840972", "0.6816762", "0.6797534", "0.67969716", "0.67910486", "0.67711425", "0.6770553", "0.6743213", "0.6710861", "0.6663064", "0.6637717", "0.6611937", "0.6603598", "0.6495593", "0.6485447", "0.6461919", "0.6458318", "0.6419281", "0.641038", "0.64100474", "0.6408961", "0.6398702", "0.6398491", "0.6396352", "0.6348543", "0.634622", "0.63291365", "0.6303294", "0.6290675", "0.62777275", "0.6264915", "0.62569535", "0.62393117", "0.6235858", "0.6235858", "0.6234745", "0.6230577", "0.6227739", "0.6225795", "0.6187428", "0.61761206", "0.61658365", "0.6149996", "0.6142724", "0.6135377", "0.61263674", "0.6106588", "0.61032885", "0.61025405", "0.6097641", "0.6089851", "0.6072572", "0.6064561", "0.6054339", "0.6049326", "0.60348296", "0.60300034", "0.60251564", "0.6011445", "0.59854776", "0.59834975", "0.59694797", "0.5969068", "0.5965574", "0.59641707", "0.5960402", "0.5957272", "0.5956084", "0.59504306", "0.5947679", "0.59416264", "0.5933538", "0.59106046", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174", "0.589174" ]
0.60865307
56
private BiMap SdkUser = Maps.synchronizedBiMap(HashBiMap.create());
@Override public void handleInit() { Integer curMaxPlayerId = playerDao.selectMaxPlayerId(); if (curMaxPlayerId == null) { curMaxPlayerId = 0; } maxPlayerId = (curMaxPlayerId / 1000); LocalDateTime dateTime = LocalDateTime.now(); int second = dateTime.getSecond(); int minute = dateTime.getMinute() % 5; timerService.scheduleAtFixedRate(new Runnable() { //每5分钟检测一次,活动开关 @Override public void run() { try { doCheckTimeOut(); } catch (Exception e) { ServerLogger.err(e, "内存检测异常"); } } }, (4 - minute) * 60 + (60 - second), 5 * 60, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SharedData(ConcurrentHashMap<String, User> userMap) {\n this.mapOfLoggedInUsersByConnectedIds = new ConcurrentHashMap<>();\n this.mapOfRegisteredUsersByUsername = userMap;\n }", "public static HashMap<Long, User> userMapInit() {\n HashMap<Long, User> userMap = new HashMap<Long, User>();\n\n\n User user = UserFactory.getNewUser(\"firstName\", \"secondName\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"first2\", \"second2\", \"890006662525\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"fir3\", \"sec3\", \"72563698562\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"firstN1\", \"secondN1\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bbbbb\", \"nbvnbn\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"first2\", \"second2\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"bb\", \"nb\", \"72563698588\"));\n userMap.put(user.getId(), user);\n\n user = UserFactory.getNewUser(\"fir3\", \"sec3\");\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"asdfdsf\", \"secovbnd2\", \"890006662577\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"firstN1\", \"secondN1\", \"88005553535\"));\n user.addPhone(PhoneService.getPhoneFactory().getNewPhone(\"sfg\", \"gdsfg\", \"88005693599\"));\n userMap.put(user.getId(), user);\n\n return userMap;\n }", "public Map<Object, Object> getUserMap() {\n\t\treturn userMap;\n\t}", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void setUserMap(Map<Object, Object> userMap) {\n\t\tthis.userMap = userMap;\n\t}", "public Map<String, IUser> getUserMap() {\n return userMap;\n }", "public Map<String, Long> getUserIdLetterMap() throws UserManagementException;", "public HashMap<Integer, Advocate> getUserAdvocateMapping() {\n\n \n return userAdvocateMapping;\n\n }", "MAP createMAP();", "public Twitter() {\n usersMap = new HashMap<>();\n }", "private static Map<String, User> getUsers() {\n Map<String, User> users = new HashMap<String, User>();\n\n User userOne = new User(\"one\",\"1\");\n User userTwo = new User(\"two\",\"2\");\n\n users.put(userOne.getName(), userOne);\n users.put(userTwo.getName(), userTwo);\n\n return users;\n }", "public Map getUserSelectFromMap(User user) {\n\t\t\r\n\t\tList us = dao.getUsers(null);\r\n\t\t\r\n\t\tMap reply = new LinkedHashMap();\r\n\t\t\r\n\t Iterator it = us.iterator();\r\n \treply.put(\"0\",\"==业务员==\");\r\n\t while(it.hasNext()){\r\n\t \t\r\n\t \tUser users = (User) it.next();\r\n\t \t\r\n\t \treply.put(users.getId(),users.getFullName());\r\n\t }\r\n\t\treturn reply;\r\n\t\t\r\n\t}", "public void readUserMap(){\n DatabaseReference usersRef = FirebaseDatabase.getInstance().getReference().child(\"users\");\n usersRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n GenericTypeIndicator<HashMap<String, User>> hash = new GenericTypeIndicator<HashMap<String, User>>() {};\n users = dataSnapshot.getValue(hash);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "private Map<String, Object> userMap(boolean synced) {\n Map<String, Object> user = new HashMap<>();\n user.put(IS_SYNCED, synced);\n if(!synced) {\n user.put(FIRST, sUserInfo.getFirstName());\n user.put(LAST, sUserInfo.getLastName());\n user.put(EMAIL, sUserInfo.getEmail());\n }\n return user;\n }", "RegularImmutableBiMap(Map.Entry<?, ?>[] entriesToAdd) {\n/* 104 */ int n = entriesToAdd.length;\n/* 105 */ int tableSize = Hashing.closedTableSize(n, 1.2D);\n/* 106 */ this.mask = tableSize - 1;\n/* 107 */ ImmutableMapEntry[] arrayOfImmutableMapEntry1 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 108 */ ImmutableMapEntry[] arrayOfImmutableMapEntry2 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 109 */ ImmutableMapEntry[] arrayOfImmutableMapEntry3 = (ImmutableMapEntry[])createEntryArray(n);\n/* 110 */ int hashCode = 0;\n/* */ \n/* 112 */ for (int i = 0; i < n; i++) {\n/* */ \n/* 114 */ Map.Entry<?, ?> entry = entriesToAdd[i];\n/* 115 */ K key = (K)entry.getKey();\n/* 116 */ V value = (V)entry.getValue();\n/* 117 */ CollectPreconditions.checkEntryNotNull(key, value);\n/* 118 */ int keyHash = key.hashCode();\n/* 119 */ int valueHash = value.hashCode();\n/* 120 */ int keyBucket = Hashing.smear(keyHash) & this.mask;\n/* 121 */ int valueBucket = Hashing.smear(valueHash) & this.mask;\n/* */ \n/* 123 */ ImmutableMapEntry<K, V> nextInKeyBucket = arrayOfImmutableMapEntry1[keyBucket];\n/* 124 */ for (ImmutableMapEntry<K, V> keyEntry = nextInKeyBucket; keyEntry != null; \n/* 125 */ keyEntry = keyEntry.getNextInKeyBucket()) {\n/* 126 */ checkNoConflict(!key.equals(keyEntry.getKey()), \"key\", entry, keyEntry);\n/* */ }\n/* 128 */ ImmutableMapEntry<K, V> nextInValueBucket = arrayOfImmutableMapEntry2[valueBucket];\n/* 129 */ for (ImmutableMapEntry<K, V> valueEntry = nextInValueBucket; valueEntry != null; \n/* 130 */ valueEntry = valueEntry.getNextInValueBucket()) {\n/* 131 */ checkNoConflict(!value.equals(valueEntry.getValue()), \"value\", entry, valueEntry);\n/* */ }\n/* 133 */ ImmutableMapEntry<K, V> newEntry = (nextInKeyBucket == null && nextInValueBucket == null) ? new ImmutableMapEntry.TerminalEntry<K, V>(key, value) : new NonTerminalBiMapEntry<K, V>(key, value, nextInKeyBucket, nextInValueBucket);\n/* */ \n/* */ \n/* */ \n/* 137 */ arrayOfImmutableMapEntry1[keyBucket] = newEntry;\n/* 138 */ arrayOfImmutableMapEntry2[valueBucket] = newEntry;\n/* 139 */ arrayOfImmutableMapEntry3[i] = newEntry;\n/* 140 */ hashCode += keyHash ^ valueHash;\n/* */ } \n/* */ \n/* 143 */ this.keyTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry1;\n/* 144 */ this.valueTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry2;\n/* 145 */ this.entries = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry3;\n/* 146 */ this.hashCode = hashCode;\n/* */ }", "public interface UserAuthortyMapper extends BaseMapper<UserAuthorty> {\n}", "public interface UserMapper extends Mapper<User>{\n}", "private static Map<String, AttributeValue> getFacebookAccountKV(Map<String, AttributeValue> item, ActiveUser activeUser) {\n\t\tHashMap<String, String> _facebookAccount = activeUser.getFacebookAccount();\n\t\t\n\t\tSet<String> c = _facebookAccount.keySet();\n\t\tIterator<String> itr = c.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString i = (String) itr.next();\n\t\t\tString _token = _facebookAccount.get(i);\n\t\t\t\n\t\t\titem.put(i, new AttributeValue(_token));\n\t\t\t// The following line needs to be changed if more than one FB accounts are needed\n\t\t\titem.put(\"facebook\",new AttributeValue(i));\n\t\t\t \n\t\t}\n\t\t\n\t\treturn item;\n\t}", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "public interface UserMapper extends MyBaseMapper<User> {\n}", "@Ignore\n @Test\n public void whenAddTwoUsersWithTheSameNameAndBirthdayToHashMapThenGetTwoElementsAdded() {\n Calendar birthday = Calendar.getInstance();\n birthday.set(1001, 12, 21);\n User john = new User(\"John Snow\", birthday);\n User snow = new User(\"John Snow\", birthday);\n\n Map<User, String> map = new HashMap<>();\n map.put(john, \"John Snow\");\n map.put(snow, \"John Snow\");\n System.out.println(map);\n\n assertThat(\"Map has two values.\", map.size(), is(2));\n }", "public interface UserMapper extends CommonMapper<User> {\n}", "ConstantIdentityKey[] getMappingSnapshot();", "public interface UserMapper {\n int addUser(TBUser tbUser);\n int alterUser(TBUser tbUser);\n TBUser getUserByAccount(String account);\n TBUser getUserPasswordByAccount(String account);\n int alterUserPassword(TBUser tbUser);\n}", "@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}", "private OwBootstrapToIdMapping()\r\n {\r\n\r\n }", "public OwnMap() {\n super();\n keySet = new OwnSet();\n }", "public interface UserInfoMapper extends Mapper<UserInfo> {\n\n}", "private static Map<String, AttributeValue> getEmailAccountsKV(Map<String, AttributeValue> item, ActiveUser activeUser) {\n\t\tHashMap<String, HashMap<String, String>> _emailAccounts = (HashMap<String, HashMap<String, String>>) activeUser.getEmailAccounts();\n\t\t\n\t\tCollection<String> c = _emailAccounts.keySet();\n\t\titem.put(\"emailProviders\", new AttributeValue().withSS(c));\n\t\t\n\t\tIterator<String> itr = c.iterator();\n\t\twhile(itr.hasNext()) {\n\t\t\tString emailProvider = (String) itr.next();\n\t\t\tHashMap<String, String> emailProviderAccounts = (HashMap<String, String>) _emailAccounts.get(emailProvider);\n\t\t\t\n\t\t\tCollection<String> _accountNames = emailProviderAccounts.keySet();\n\t\t\titem.put(emailProvider, new AttributeValue().withSS(_accountNames));\n\t\t\t\n\t\t\tIterator<String> itr2 = _accountNames.iterator();\n\t\t\twhile(itr2.hasNext()) {\n\t\t\t\tString _account = (String) itr2.next();\n\t\t\t\tString token = emailProviderAccounts.get(_account);\n\t\t\t\t\n\t\t\t\titem.put(_account, new AttributeValue(token));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn item;\n\t\t\n\t}", "public void setUserAdvocateMapping(HashMap<Integer, Advocate> userAdvocateMapping) {\n \n this.userAdvocateMapping = userAdvocateMapping;\n\n }", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "public interface WeixinUserKindleMapper {\n}", "public RBTMap() {\n RBT = new TreeMap<K,V>();\n \n }", "public interface UserMapper extends SysMapper<UserPo>{\n}", "public interface UserMapper {\n public List<UserVo> getUsersList (Map<String, String> params);\n}", "public Map<String, User> getUserIdUserMap(List<String> userIds)\n {\n return null;\n }", "protected WumpusMap() {\n\t\t\n\t}", "@org.apache.ibatis.annotations.Mapper\npublic interface UserMapper extends Mapper<User>{\n}", "@Test\n public void whenAddTwoUsersWithTheSameNameAndBirthdayToHashMapThenGetOneElementAdded() {\n Calendar birthday = Calendar.getInstance();\n birthday.set(1001, 12, 21);\n User john = new User(\"John Snow\", birthday);\n User snow = new User(\"John Snow\", birthday);\n\n Map<User, String> map = new HashMap<>();\n map.put(john, \"John Snow 1\");\n map.put(snow, \"John Snow 2\");\n System.out.println(map);\n\n assertThat(\"Map has two values.\", map.size(), is(1));\n }", "public interface BizKeyMapper extends BaseMapper<BizKeyEntity> {\n}", "public Twitter() {\n u_map = new HashMap<>();\n }", "@Test\n public void whenHaveListOfUsersThenMakeMapOfUsers() {\n HashMap<Integer, User> expect = new HashMap<>();\n User firstUser = new User(1, \"Vasya\", \"Murmansk\");\n User secondUser = new User(5, \"Vova\", \"Vologda\");\n expect.put(1, firstUser);\n expect.put(5, secondUser);\n List<User> list = new ArrayList<>();\n list.add(firstUser);\n list.add(secondUser);\n UserConvert userConvert = new UserConvert();\n assertThat(userConvert.process(list), is(expect));\n }", "public interface UserStore {\n\n// List<User> getAllUsers();\n Map<String, String> getAllUsersFromHashMap();\n void addUser(User user);\n // void fillUserList();\n void fillHashMap();\n}", "RegularImmutableBiMap(int n, ImmutableMapEntry.TerminalEntry<?, ?>[] entriesToAdd) {\n/* 56 */ int tableSize = Hashing.closedTableSize(n, 1.2D);\n/* 57 */ this.mask = tableSize - 1;\n/* 58 */ ImmutableMapEntry[] arrayOfImmutableMapEntry1 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 59 */ ImmutableMapEntry[] arrayOfImmutableMapEntry2 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 60 */ ImmutableMapEntry[] arrayOfImmutableMapEntry3 = (ImmutableMapEntry[])createEntryArray(n);\n/* 61 */ int hashCode = 0;\n/* */ \n/* 63 */ for (int i = 0; i < n; i++) {\n/* */ \n/* 65 */ ImmutableMapEntry.TerminalEntry<?, ?> terminalEntry = entriesToAdd[i];\n/* 66 */ K key = (K)terminalEntry.getKey();\n/* 67 */ V value = (V)terminalEntry.getValue();\n/* */ \n/* 69 */ int keyHash = key.hashCode();\n/* 70 */ int valueHash = value.hashCode();\n/* 71 */ int keyBucket = Hashing.smear(keyHash) & this.mask;\n/* 72 */ int valueBucket = Hashing.smear(valueHash) & this.mask;\n/* */ \n/* 74 */ ImmutableMapEntry<K, V> nextInKeyBucket = arrayOfImmutableMapEntry1[keyBucket];\n/* 75 */ for (ImmutableMapEntry<K, V> keyEntry = nextInKeyBucket; keyEntry != null; \n/* 76 */ keyEntry = keyEntry.getNextInKeyBucket()) {\n/* 77 */ checkNoConflict(!key.equals(keyEntry.getKey()), \"key\", terminalEntry, keyEntry);\n/* */ }\n/* 79 */ ImmutableMapEntry<K, V> nextInValueBucket = arrayOfImmutableMapEntry2[valueBucket];\n/* 80 */ for (ImmutableMapEntry<K, V> valueEntry = nextInValueBucket; valueEntry != null; \n/* 81 */ valueEntry = valueEntry.getNextInValueBucket()) {\n/* 82 */ checkNoConflict(!value.equals(valueEntry.getValue()), \"value\", terminalEntry, valueEntry);\n/* */ }\n/* 84 */ ImmutableMapEntry<K, V> newEntry = (nextInKeyBucket == null && nextInValueBucket == null) ? (ImmutableMapEntry)terminalEntry : new NonTerminalBiMapEntry<K, V>((ImmutableMapEntry)terminalEntry, nextInKeyBucket, nextInValueBucket);\n/* */ \n/* */ \n/* */ \n/* 88 */ arrayOfImmutableMapEntry1[keyBucket] = newEntry;\n/* 89 */ arrayOfImmutableMapEntry2[valueBucket] = newEntry;\n/* 90 */ arrayOfImmutableMapEntry3[i] = newEntry;\n/* 91 */ hashCode += keyHash ^ valueHash;\n/* */ } \n/* */ \n/* 94 */ this.keyTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry1;\n/* 95 */ this.valueTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry2;\n/* 96 */ this.entries = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry3;\n/* 97 */ this.hashCode = hashCode;\n/* */ }", "public static BokMapper getInstance(){\r\n\t\treturn BokMapper;\r\n\t}", "public UserStorage() {\n this.base = new TreeMap<>();\n }", "@Mapper\npublic interface UserInfoMapper extends BaseMapper<UserInfo> {\n}", "public interface ProbeUserMapper {\n List<ProbeUser> queryProbeUser(User user) throws Exception;\n void setProbeUser(List<ProbeUser> probeUser) throws Exception;\n}", "HashMap getMasterAttributes(String userNo, String gcif) throws BaseException;", "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "public interface BatchUserMapper extends IBatchMapper<BatchUser> {\n\n}", "public ApplicationUserBoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "Map<String, Object> getUserProfile();", "public TreeMap<String, User> getClientUsersMap() {\n TreeMap<String, User> clients = new TreeMap<>();\n usersConnected.values().stream().forEach((user) -> {\n clients.put(user.getName(), user.toClientUser());\n });\n return clients;\n }", "@Nonnull\n private static MultimapBuilder.SetMultimapBuilder<Comparable, Object> newMapBuilder()\n {\n return MultimapBuilder.SetMultimapBuilder\n .treeKeys()\n .hashSetValues();\n }", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }", "private void populateUserMap(List<User> list) {\n\t\tfor (User user : list) {\n\t\t\tuserMap.put(user.getUserName(), user);\n\t\t}\n\n\t}", "public Item() {this.users = new HashSet<>();}", "@SuppressWarnings(\"unchecked\")\n private Map<String, String> getUsers() {\n try {\n return (HashMap<String, String>) FileUtil.getInstance().readObjectFromFile(openFileInput(\"users.ser\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return new HashMap<>();\n }", "XClass getMapKey();", "void chooseMap(String username);", "public interface UserInfoMapper extends BaseMapper<UserInfoE> {\n}", "public HashMap<String, UserSign> getUserSigns(){\n return userSigns;\n }", "IcedHM() { _m = new NonBlockingHashMap<>(); }", "private Map<String, AttributeInfo> getUserSchemaMap() {\n if (userSchemaMap == null) {\n schema();\n }\n return userSchemaMap;\n }", "public static void main(String[] args) {\n\t\tInteger u=new Integer(10);\n\t\tInteger u1=new Integer(10);\n\t\tIdentityHashMap<Integer,String> g=new IdentityHashMap();\n\t\tg.put(u, \"dhdanas\");\n;\n\t\tg.put(u1,\"dtttt\");\n\t\t\nSystem.out.println(g);\n}", "private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }", "protected void fillAdditionalFields(U user, Map<String, Object> map) {\n\t}", "void setHashMap();", "public void generateRandomMap() {\n\n\t}", "public interface InverseHashView<K, V> {\r\n\r\n /**\r\n * Finds first primary key which corresponds to value. There may be more then one, others are ignored\r\n *\r\n * @param val\r\n * @return first primary key found or null if not found\r\n */\r\n K findKeyForValue(V val);\r\n\r\n /**\r\n * Finds primary keys which corresponds to value. There may be more then one, others are ignored\r\n *\r\n * @param val\r\n * @return primary keys found\r\n */\r\n Iterable<K> findKeysForValue(V val);\r\n\r\n\r\n}", "public static Map<String, User> mapUserByJmbag(Collection<User> collection) {\n\t\tMap<String, User> m = new HashMap<String, User>(collection.size());\n\t\tfor(User u : collection) {\n\t\t\tm.put(u.getJmbag(), u);\n\t\t}\n\t\treturn m;\n\t}", "public static Map<String, Object> initUser() {\n\n Map<String, Object> user = new HashMap<String, Object>();\n Map<String, Object> tone = new HashMap<String, Object>();\n\n Map<String, Object> emotionTone = new HashMap<String, Object>();\n emotionTone.put(\"current\", null);\n\n Map<String, Object> socialTone = new HashMap<String, Object>();\n socialTone.put(\"current\", null);\n\n Map<String, Object> languageTone = new HashMap<String, Object>();\n languageTone.put(\"current\", null);\n\n tone.put(\"emotion\", emotionTone);\n tone.put(\"social\", socialTone);\n tone.put(\"language\", languageTone);\n\n user.put(\"tone\", tone);\n\n return user;\n }", "@Mapper\npublic interface UserGroupMapper extends BaseMapper<UserGroupDO> {\n}", "public Twitter() {\n map = new HashMap<>();\n }", "private synchronized int generateUserID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; users.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}", "@Override\r\n\tpublic Account getAccountHashmap(String accnum) {\n\t\treturn dataMap.get(accnum);\r\n\t}", "protected Map getProfileMap() {\n \t\t\treturn profileMap;\n \t\t}", "public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}", "public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}", "public RelationBuilderContainsTest() {\n builder = new BiMap<Integer, Integer>();\n builder.put(zero, one);\n }", "User getUserInformation(Long user_id);", "public HashMultiSet() {\r\n\t\tbaseMap = new HashMap<>();\r\n\t}", "public interface UserMapper {\n public int addUser(Tbuser users);\n public int addUser2(Tbuser users);\n public int addUser3(Tbuser users);\n public int addUser4(Tbuser users);\n}", "private SimpleMap(Builder builder) {\n super(builder);\n }", "private void setUpHelper(String username) {\n String isbn = \"11223344556677889900\";\n Database.getRequestsForBook(isbn)\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (!task.isSuccessful()) {\n\n } else {\n String id = isbn + \"-\" + username;\n Map<String, Object> acc = new HashMap<>();\n Map<String, Object> dec = new HashMap<>();\n Map<String, Object> acc2 = new HashMap<>();\n Map<String, Object> acc3 = new HashMap<>();\n acc.put(\"status\", \"accepted\");\n acc2.put(\"lat\", 65.34);\n acc3.put(\"lng\", -169.9);\n dec.put(\"status\", \"declined\");\n for (DocumentSnapshot doc : task.getResult()) {\n if (doc.getId().equals(id)) {\n doc.getReference().set(acc, SetOptions.merge());\n doc.getReference().set(acc2, SetOptions.merge());\n doc.getReference().set(acc3, SetOptions.merge());\n } else {\n doc.getReference().set(dec, SetOptions.merge());\n }\n }\n }\n }\n });\n }", "public GoogleUserInfo(Map<String, Object> attributes) {\n this.attributes = attributes;\n }", "public void addUserInfo(HashMap<String,Object> map){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).set(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n }", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "static void init() {\n\t\tuserDatabase = new HashMap<String, User>();\n\t}", "private void linkedHashMap() {\n LinkedHashMap lhm = new LinkedHashMap();\n User e = new User(1, \"user\");\n\n lhm.put(e, \"Harshal\");\n lhm.put(new User(1, \"Employee\"), \"Harshal\");\n lhm.put(new User(1, \"user\"), \"Harshal\");\n lhm.put(e, \"Sumit\");\n\n System.out.println(lhm);\n lhm.putIfAbsent(new User(2,\"Harshal\"),\"Added new val\");\n lhm.putIfAbsent(new User(2,\"Harshal\"),\"Added new val\");\n\n lhm.keySet().removeIf(key->((User)key).equals(new User(2,\"Harshal\")));\n System.out.println(lhm);\n }", "protected SortedMap getSortedMap() {\n/* 65 */ return (SortedMap)this.map;\n/* */ }", "@Mapper(componentModel = \"spring\", uses = {AuthorityMapper.class, })\npublic interface BizUserMapper {\n\n BizUserDTO bizUserToBizUserDTO(BizUser bizUser);\n\n List<BizUserDTO> bizUsersToBizUserDTOs(List<BizUser> bizUsers);\n\n @Mapping(target = \"companies\", ignore = true)\n @Mapping(target = \"products\", ignore = true)\n BizUser bizUserDTOToBizUser(BizUserDTO bizUserDTO);\n\n List<BizUser> bizUserDTOsToBizUsers(List<BizUserDTO> bizUserDTOs);\n\n default Authority authorityFromId(Long id) {\n if (id == null) {\n return null;\n }\n Authority authority = new Authority();\n authority.setId(id);\n return authority;\n }\n}", "protected Map getProfileMap() {\n \t\tif (profiles != null) {\n \t\t\tMap result = (Map) profiles.get();\n \t\t\tif (result != null)\n \t\t\t\treturn result;\n \t\t}\n \t\tMap result = restore();\n \t\tif (result == null)\n \t\t\tresult = new LinkedHashMap(8);\n \t\tprofiles = new SoftReference(result);\n \t\treturn result;\n \t}", "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "public MyHashMap() {\n hashMap = new ArrayList<>();\n }", "public static void setHash_profiles() {\n\t\t\r\n\t\tProfilePojo pf1 = new ProfilePojo(1, \"Sonal\");\r\n\t\tProfilePojo pf2 = new ProfilePojo(2, \"Komal\");\r\n\t\tProfilePojo pf3 = new ProfilePojo(3, \"Sanidh\");\r\n\t\tProfilePojo pf4 = new ProfilePojo(4, \"Vanshika\");\r\n\t\thash_profiles.put((long) 1, pf1);\r\n\t\thash_profiles.put((long) 2, pf2);\r\n\t\thash_profiles.put((long) 3, pf3);\r\n\t\thash_profiles.put((long) 4, pf4);\r\n\t\t\r\n\t}", "public abstract void createMap();", "public void populate_dict(userinfo uinfo) {\n\t\n\t\tuinfo.dictionary.put(uinfo.username, uinfo.getBlocked());\n\t\tSystem.out.println(\"List of people blocked by \" + uinfo.username + \" are as follows:\");\n\t\tfor (int i = 0; i < uinfo.getBlocked().size(); i++) {\n\t\t\tSystem.out.println(uinfo.getBlocked().get(i));\n\n\t\t}\n\t\t\n\t\n}", "public MapsAccountProperties() {\n }" ]
[ "0.6383905", "0.62971187", "0.60475487", "0.6035612", "0.5910234", "0.5870377", "0.5797515", "0.5779249", "0.57623", "0.5724848", "0.56864464", "0.5646336", "0.564312", "0.55802155", "0.5507739", "0.5498498", "0.5490004", "0.54768264", "0.5450639", "0.5442972", "0.54215527", "0.5421269", "0.54082906", "0.54027605", "0.5391522", "0.53860754", "0.5378238", "0.5375174", "0.5374418", "0.5338827", "0.53339404", "0.53296214", "0.53167546", "0.53105915", "0.5296486", "0.52900445", "0.52833056", "0.52681285", "0.5266948", "0.5265799", "0.52574486", "0.5256075", "0.52431536", "0.52197087", "0.5210469", "0.51939815", "0.5188979", "0.5180106", "0.51727504", "0.5166303", "0.51643914", "0.5155123", "0.51469076", "0.5127591", "0.51095456", "0.50997823", "0.50978214", "0.5096572", "0.5095943", "0.50939643", "0.5093426", "0.508213", "0.50794095", "0.5078989", "0.5074742", "0.50683635", "0.5059217", "0.50489676", "0.50476545", "0.50377506", "0.5031643", "0.5026688", "0.5023664", "0.50228953", "0.50196207", "0.5019007", "0.5014416", "0.5013417", "0.50114864", "0.5010038", "0.50090474", "0.5009038", "0.5006246", "0.5002002", "0.50017977", "0.49971017", "0.4990413", "0.49891353", "0.49799663", "0.49785727", "0.49741122", "0.49670342", "0.4963502", "0.49481192", "0.4940033", "0.49386317", "0.4932099", "0.49257517", "0.49205166", "0.49151888", "0.49133655" ]
0.0
-1
A generic interface for representing composite keys in data stores that use a bucket and key pair.
public interface BucketKeyPair<B, K> { /** * Get the bucket representation. * * @return */ B getBucket(); /** * Get the key representation. * * @return */ K getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CompositeKey(double startPrice,double endPrice){\n\t this.key1=startPrice;\n\t this.key2=endPrice;\n }", "interface Bucket extends MultiBucketsAggregation.Bucket {}", "abstract public String getKey();", "public interface Bucket {\n String getUid();\n\n String getName();\n\n Uri getImageUri();\n\n List<Selection> getSelections();\n\n void addSelection(Selection s);\n\n void removeSelection(Selection s);\n}", "public interface KeyValueStore {\n\n\t/**\n\t * Put a value into the database with an associated key\n\t * @param key The key of the value\n\t * @param value The value to store\n\t * @return True if successful\n\t */\n\tpublic HasID put(@SuppressWarnings(\"rawtypes\") Class type, HasID value);\n\t\n\t/**\n\t * Get a value using the associated key\n\t * @param key The key\n\t * @return The value or null\n\t */\n\tpublic HasID get(@SuppressWarnings(\"rawtypes\") Class type, String key);\n\t\n\t/**\n\t * \n\t * @param c\n\t * @return\n\t */\n\tpublic List<HasID> getAll(@SuppressWarnings(\"rawtypes\") Class type);\n\t\n\t/**\n\t * Delete a value in the store\n\t * @param key The key of the value\n\t * @return True if removed\n\t */\n\tpublic boolean delete(@SuppressWarnings(\"rawtypes\") Class type, String key);\n\t\n}", "public interface ComplexKeyMap<K, V> extends Map<K, V> {\n\n}", "public MultiKey() {}", "protected abstract Object getKey(Subject subject, ConnectionRequestInfo cri,\n boolean separateNoTx) throws ResourceException;", "KeyIdPair createKeyIdPair();", "private void addKeyToTuple(Tuple tuple, ByteBuffer key, CfDef cfDef, AbstractType comparator) throws IOException\n {\n if( comparator instanceof AbstractCompositeType )\n {\n StorageHelper.setTupleValue(tuple, 0, composeComposite((AbstractCompositeType) comparator, key));\n }\n else\n {\n StorageHelper.setTupleValue(tuple, 0, StorageHelper.cassandraToObj(getDefaultMarshallers(cfDef).get(MarshallerType.KEY_VALIDATOR), key, nativeProtocolVersion));\n }\n\n }", "public abstract int getBucketID();", "BListKey getKey();", "B getBucket();", "Object getKey();", "public interface Partitioner<ELEMENT, CLASS> {\n\n\t/**\n\t * @param obj\n\t * the Object to be assigned to a bucket\n\t * @return A key representing the bucket containing obj\n\t */\n\tpublic CLASS assignToBucket(ELEMENT obj);\n\n}", "public interface Key<T> {\n String getName();\n Class<T> getType();\n\n static <T> Key<T> of(Class<T> type) {\n return of(type.getName(), type);\n }\n\n static <T> Key<T> of(String name, Class<T> type) {\n return new Key<T>() {\n @Override\n public String getName() {\n return name;\n }\n\n @Override\n public Class<T> getType() {\n return type;\n }\n };\n }\n }", "public interface EntryStoreDb<K> {\n\n void serializeKey(final ByteBuffer keyBuffer, K key);\n\n /**\n * @param writeTxn\n * @param keyBuffer\n * @param valueBuffer\n * @param overwriteExisting\n * @param isAppending Only set to true if you are sure that the key will be at the end of the db\n * @return\n */\n PutOutcome put(final Txn<ByteBuffer> writeTxn,\n final ByteBuffer keyBuffer,\n final ByteBuffer valueBuffer,\n final boolean overwriteExisting,\n final boolean isAppending);\n\n boolean delete(final Txn<ByteBuffer> writeTxn, final ByteBuffer keyBuffer);\n\n Optional<ByteBuffer> getAsBytes(Txn<ByteBuffer> txn, final ByteBuffer keyBuffer);\n\n Optional<UID> getMaxUid(final Txn<ByteBuffer> txn, PooledByteBuffer pooledByteBuffer);\n}", "public String getBucket();", "public interface KeyValueStore {\r\n\r\n /**\r\n * Return true if store contains a value for the key.\r\n *\r\n * @param key key.\r\n * @return true if store contains a value for the key.\r\n * @throws IllegalArgumentException if key is null.\r\n */\r\n public boolean contains(String key);\r\n\r\n /**\r\n * Return value.\r\n *\r\n * @param key key.\r\n * @return value for the key or null if value does not exist.\r\n * @throws IllegalArgumentException if key is null.\r\n */\r\n public String get(String key);\r\n\r\n /**\r\n * Create or replace value.\r\n *\r\n * @param key key\r\n * @param value value\r\n * @return true if value was created, false if it was replaced.\r\n * @throws IllegalArgumentException if key is null or value is null\r\n */\r\n public boolean put(String key, String value);\r\n\r\n /**\r\n * Delete value.\r\n *\r\n * @param key key\r\n * @return true if value delete, false if no value associated with a key.\r\n * @throws IllegalArgumentException if key is null.\r\n */\r\n public boolean delete(String key);\r\n \r\n}", "public interface RepositoryKey {\n\n}", "public interface ContextPartitionSelectorSegmented extends ContextPartitionSelector {\n /**\n * Returns the partition keys.\n *\n * @return key set\n */\n public List<Object[]> getPartitionKeys();\n}", "private IDataKey(Queue<Part> parts) {\n super(parts);\n }", "@Test\n public void should_iterate_with_partition_keys_and_partition_keys_IN() throws Exception {\n //Given\n long partitionKey = RandomUtils.nextLong(0,Long.MAX_VALUE);\n\n insertCompositeClusteredValues(partitionKey,\"bucket1\",1,\"name1\",1);\n insertCompositeClusteredValues(partitionKey,\"bucket2\",1,\"name2\",1);\n insertCompositeClusteredValues(partitionKey,\"bucket3\",1,\"name3\",1);\n\n //When\n final Iterator<CompositeClusteredEntity> iterator = manager.sliceQuery(CompositeClusteredEntity.class)\n .forIteration()\n .withPartitionComponents(partitionKey)\n .andPartitionComponentsIN(\"bucket1\", \"bucket3\")\n .iterator();\n\n //Then\n assertThat(iterator.hasNext()).isTrue();\n CompositeClusteredEntity next = iterator.next();\n assertThat(next.getId().getId()).isEqualTo(partitionKey);\n assertThat(next.getId().getBucket()).isEqualTo(\"bucket1\");\n assertThat(next.getId().getName()).isEqualTo(\"name11\");\n assertThat(next.getValue()).isEqualTo(\"value11\");\n\n assertThat(iterator.hasNext()).isTrue();\n next = iterator.next();\n assertThat(next.getId().getId()).isEqualTo(partitionKey);\n assertThat(next.getId().getBucket()).isEqualTo(\"bucket3\");\n assertThat(next.getId().getName()).isEqualTo(\"name31\");\n assertThat(next.getValue()).isEqualTo(\"value11\");\n }", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "Bucket getBucket(K key) {\r\n\t\treturn (Bucket) buckets[key.hashCode() % numBuckets];\r\n\t}", "KeyMetadata metadata();", "public interface HPTKeyComparator<K> {\n\n boolean keysEqual(int queryKeyIndex, K queryKey, K treeKey);\n\n }", "public org.vcell.util.document.KeyValue getCompoundKey() {\r\n\treturn formalCompound.getDBFormalSpeciesKey();\r\n}", "public MultiKey(final K key1, final K key2, final K key3) {\n this(newArray(key1, key2, key3), false);\n }", "public interface Contributor\n extends Keyed\n{\n Collection<Attribute> createAttributesFor( Key key, Content content, Record cr );\n}", "public interface KeySerDe {\n byte[] serialize(IndexedRecord key);\n IndexedRecord deserialize(byte[] keyBytes);\n}", "public abstract String getRefKey();", "public boolean existsKey(String bucket, String inKey);", "public interface Pair<K,V> {\n public K getKey();\n public V getValue();\n}", "boolean hasCompoundKey();", "public IDataKey(String key, boolean literal) {\n if (key == null) throw new NullPointerException(\"key must not be null\");\n\n for (String part : literal ? new String[] { key } : key.split(SEPARATOR)) {\n add(new Part(part, literal));\n }\n }", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "public K accessKey(T obj);", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "public interface TypeKey {\n}", "public K setKey(K key);", "public interface SecondaryMultiKeyCreator {\r\n\r\n\t/**\r\n\t * Javadoc for this public method is generated via the doc templates in the\r\n\t * doc_src directory.\r\n\t */\r\n\tpublic void createSecondaryKeys(SecondaryDatabase secondary,\r\n\t\t\tDatabaseEntry key, DatabaseEntry data, Set results)\r\n\t\t\tthrows DatabaseException;\r\n}", "public interface KeySegmentConverter<K> {\n // Return key segment object based on node object\n // Key segment equality is used to identify the source node object\n // The .toString() of the key segment object will be used to write DOM node IDs.\n public Object getSegment(K node);\n // Used to create complete NodeKey with segment objects parsed from their .toString()\n // representations.\n public NodeKey parseSegments(String[] segments);\n}", "private int getBucketIndex( K key ) {\r\n\t\tint hashCode = key.hashCode();\r\n\t\treturn hashCode % numBuckets;\r\n\t}", "public interface Filters extends MultiBucketsAggregation {\n\n /**\n * A bucket associated with a specific filter (identified by its key)\n */\n interface Bucket extends MultiBucketsAggregation.Bucket {}\n\n /**\n * The buckets created by this aggregation.\n */\n @Override\n List<? extends Bucket> getBuckets();\n\n Bucket getBucketByKey(String key);\n\n}", "public interface DataStore {\n\n Bucket loadBucket(String bucketName);\n\n List<Bucket> loadBuckets();\n\n void saveBucket(Bucket bucket);\n\n void deleteBucket(String bucketName);\n\n Blob loadBlob(String bucketName, String blobKey);\n\n List<Blob> loadBlobs(String bucketName);\n\n void saveBlob(String bucketName, Blob blob);\n\n void deleteBlob(String bucketName, String blobKey);\n}", "@Override\n\t\tpublic int getPartition(MyKey arg0, Text arg1, int arg2) {\n\t\t\treturn arg0.getK().hashCode()%arg2;\n\t\t}", "public interface IDataStorage<TKey extends ISizable, TValue extends ISizable> {\n WrappedKeyValue<TKey, TValue> Get(TKey key) throws IOException;\n\n //TODO: replace with iterator\n List<WrappedKeyValue<TKey, TValue>> GetElements() throws IOException;\n\n void AddOrUpdate(TKey key, TValue value) throws IOException;\n\n void AddOrUpdate(List<WrappedKeyValue<TKey, TValue>> values) throws IOException;\n\n void Delete(TKey key) throws IOException;\n\n void Clear();\n\n void Close() throws IOException;\n}", "void registerCompositeLabel(/*NotNull*/Object key1, /*???*/ Object key2, /*NotNull*/ Collection<SNode> outputNode, /*NotNull*/ String mappingLabel);", "@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}", "public MultiKey(final K key1, final K key2) {\n this(newArray(key1, key2), false);\n }", "public interface KeyPairProvider {\n\n KeyPair getJWTKey();\n\n /**\n * Get a key with the specified alias;\n * If there is no key of this alias, return\n * {@code null}\n *\n * @param alias the alias of key to load\n * @return a valid key pair or {@code null} if a key with this alias is not available\n */\n KeyPair getKey(String alias);\n}", "public interface SecondaryKeyCreator {\n\t\n /** \n * Javadoc for this public method is generated via\n * the doc templates in the doc_src directory.\n */\n public boolean createSecondaryKey( SecondaryDatabase secondary, DatabaseEntry key, DatabaseEntry data, DatabaseEntry result) throws DatabaseException ;\n\n\n}", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "String key();", "K getKey();", "K getKey();", "K getKey();", "K getKey();", "public K buscarCartas(K key);", "org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey();", "private String key(final String... parts)\n\t{\n\t\treturn JesqueUtils.createKey(this.config.getNamespace(), parts);\n\t}", "byte[] getKey();", "@Override\n protected final Object getKey()\n {\n return this;\n }", "List<DTOKeyPair> getStochasticKeys();", "public mapper3c(Integer theKey, String theValue) { super(theKey, theValue); }", "public interface KademliaBucket\n{\n\n /**\n * Adds a contact to the bucket\n *\n * @param c the new contact\n */\n public void insert(Contact c);\n\n /**\n * Create a new contact and insert it into the bucket.\n *\n * @param n The node to create the contact from\n */\n public void insert(Node n);\n\n /**\n * Checks if this bucket contain a contact\n *\n * @param c The contact to check for\n *\n * @return boolean\n */\n public boolean containsContact(Contact c);\n\n /**\n * Checks if this bucket contain a node\n *\n * @param n The node to check for\n *\n * @return boolean\n */\n public boolean containsNode(Node n);\n\n /**\n * Remove a contact from this bucket.\n * \n * If there are replacement contacts in the replacement cache,\n * select the last seen one and put it into the bucket while removing the required contact.\n *\n * If there are no contacts in the replacement cache, then we just mark the contact requested to be removed as stale.\n * Marking as stale would actually be incrementing the stale count of the contact.\n *\n * @param c The contact to remove\n *\n * @return Boolean whether the removal was successful.\n */\n public boolean removeContact(Contact c);\n\n /**\n * Remove the contact object related to a node from this bucket\n *\n * @param n The node of the contact to remove\n *\n * @return Boolean whether the removal was successful.\n */\n public boolean removeNode(Node n);\n\n /**\n * Counts the number of contacts in this bucket.\n *\n * @return Integer The number of contacts in this bucket\n */\n public int numContacts();\n\n /**\n * @return Integer The depth of this bucket in the RoutingTable\n */\n public int getDepth();\n\n /**\n * @return An Iterable structure with all contacts in this bucket\n */\n public List<Contact> getContacts();\n}", "org.apache.calcite.avatica.proto.Common.DatabasePropertyOrBuilder getKeyOrBuilder();", "public DBRecordKey<gDBR> createKey() // <? extends DBRecord<?>>\n throws DBException\n {\n if (this.keyClass != null) {\n try {\n // this creates an empty key with no key fields\n Constructor<? extends DBRecordKey<gDBR>> kc = this.keyClass.getConstructor(new Class<?>[0]);\n return kc.newInstance(new Object[0]); // \"unchecked cast\"\n } catch (Throwable t) { // NoSuchMethodException, ...\n // Implementation error (should never occur)\n throw new DBException(\"Key Creation\", t);\n }\n }\n return null;\n }", "abstract K getFirstLeafKey();", "abstract K getFirstLeafKey();", "public interface KeyValueConst {\n\n String PUBLIC_KEY = \"PublicKey\";\n String PRIVATE_KEY = \"PrivateKey\";\n}", "protected static Object getSurrogateKey(NamedCache cache, Object oKey, int nSalt)\n {\n PartitionedService service = (PartitionedService) cache.getCacheService();\n Associator assoc = (Associator) service.getKeyAssociator();\n\n return assoc.getSurrogateKey(oKey, nSalt);\n }", "void put(int partitionID, String key, String value);", "public List<Object[]> getPartitionKeys();", "T key();", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "public abstract boolean containsKey(K key);", "@Override\n List<? extends Bucket> getBuckets();" ]
[ "0.6670252", "0.6198553", "0.6074657", "0.59068316", "0.58303857", "0.5811057", "0.5763683", "0.5732558", "0.5718785", "0.570441", "0.5680401", "0.56076634", "0.55806786", "0.5535342", "0.55282956", "0.5525804", "0.5517863", "0.54707533", "0.54474026", "0.5397028", "0.538635", "0.5384729", "0.53688115", "0.5366654", "0.5366654", "0.5366654", "0.5366654", "0.534998", "0.5348709", "0.53018135", "0.5289189", "0.5274958", "0.5270699", "0.52662987", "0.5265375", "0.5251819", "0.52408516", "0.52126694", "0.5205948", "0.52024865", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.5197381", "0.51925755", "0.5186999", "0.5186999", "0.5186999", "0.5186999", "0.5186999", "0.5186999", "0.51856273", "0.5180342", "0.51766497", "0.5174821", "0.5173531", "0.51677704", "0.5167495", "0.5157967", "0.5156929", "0.51521623", "0.514275", "0.51305497", "0.51244396", "0.5109846", "0.51091534", "0.50996715", "0.5096747", "0.5096747", "0.5096747", "0.5096747", "0.50863427", "0.5052244", "0.5043707", "0.5041284", "0.50366014", "0.50346625", "0.5033563", "0.503347", "0.50333774", "0.5026985", "0.5024654", "0.5024654", "0.5021328", "0.50209785", "0.5017479", "0.5017144", "0.5013109", "0.50116235", "0.5009975", "0.50099444" ]
0.7413909
0
Get the bucket representation.
B getBucket();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBucket();", "public String getBucket() {\n return bucket;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getGcsBucketBytes() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n gcsBucket_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n List<? extends Bucket> getBuckets();", "public com.google.protobuf.ByteString getGcsBucketBytes() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n gcsBucket_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getGcsBucket() {\n java.lang.Object ref = gcsBucket_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n gcsBucket_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getGcsBucket() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n gcsBucket_ = s;\n return s;\n }\n }", "@Required\n @Updatable\n public BucketResource getBucket() {\n return bucket;\n }", "@Updatable\n @Required\n public BucketResource getBucket() {\n return bucket;\n }", "public String getBucketName(){\n return bucketName;\n }", "public bucket[] getData() {\n\t\treturn (bucket.clone());\n\t}", "public String getBucketName()\n {\n return bucketName;\n }", "public String getBucketName() {\n return bucketName;\n }", "public String getBucketName() {\n return bucketName;\n }", "public String printBucket() {\n\t\t\tString result = this.toString() + \" \";\n\t\t\tif (this.getNext() != null)\n\t\t\t\tresult += this.getNext().printBucket();\n\t\t\treturn result;\n\t\t}", "public Bucket() {\n\t\t\te = new ArrayList<Entry<K, V>>();\n\t\t}", "@Override\n\tpublic List<? extends MyHashMap.Bucket<K, V>> getBuckets() {\n\t\treturn (ArrayList<? extends MyHashMap.Bucket<K, V>>) b;\n\t}", "public String getBucketName() {\n return getProperty(BUCKET_NAME);\n }", "@Override\r\n\tpublic String toString(){\n\t\tString s = \"{\";\r\n\t\tboolean first = true;\r\n\t\tfor(int n=0; n<_numBuckets; n++)\r\n\t\t{\r\n\t\t\tNode node = _buckets[n];\r\n\t\t\tif(node != null)\r\n\t\t\t{\r\n\t\t\t\tif(first)\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\telse\r\n\t\t\t\t\ts += \", \";\r\n\t\t\t\ts += node.toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\ts += \"}\";\r\n\t\treturn s;\r\n\t}", "Bucket getBucket(K key) {\r\n\t\treturn (Bucket) buckets[key.hashCode() % numBuckets];\r\n\t}", "public String getBucketName() {\n\treturn _bucketName;\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < mySize; i++) {\n\t\t\tfor (int j = 0; j < myBuckets.get(i).size(); j++) {\n\t\t\t\tsb.append(\"(\" + myBuckets.get(i).get(j).myKey + \", \" + myBuckets.get(i).get(j).myValue + \"), \");\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public interface Bucket {\n String getUid();\n\n String getName();\n\n Uri getImageUri();\n\n List<Selection> getSelections();\n\n void addSelection(Selection s);\n\n void removeSelection(Selection s);\n}", "public bucket getbucket(int x) {\n\t\treturn bucket[x];\n\t}", "protected Collection getNewBucket()\n {\n return new ArrayList();\n }", "public abstract int getBucketID();", "@Nullable public String getBucketEndpoint() {\n return bucketEndpoint;\n }", "public StorageClassEnum getBucketStorageClass()\n {\n return storageClass;\n }", "public long getBucketID(){\n return localBucketID;\n }", "@Override\n\tpublic String toString() {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < buckets.length; i++) {\n\t\t\tif (buckets[i] != null) {\n\t\t\t\tresult += \"[\" + i + \"]\" + \" \";\n\t\t\t\tresult += buckets[i].printBucket() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\tif (result == \"\")\n\t\t\treturn \"Relation is empty\";\n\t\treturn result;\n\t}", "public java.util.Map<String, BucketInfo> getFacets() {\n if (facets == null) {\n facets = new com.amazonaws.internal.SdkInternalMap<String, BucketInfo>();\n }\n return facets;\n }", "interface Bucket extends MultiBucketsAggregation.Bucket {}", "public interface BucketKeyPair<B, K> {\n\n /**\n * Get the bucket representation.\n *\n * @return\n */\n B getBucket();\n\n /**\n * Get the key representation.\n *\n * @return\n */\n K getKey();\n\n}", "public Bucket() {\n// this.bucketPath = bucketPath;\n keys = new Vector<>();\n }", "public byte[] bucketOf(String saltedKey) {\n return saltedKey.substring(0, Integer.toString(numOfBuckets - 1).length()).getBytes(getCharset());\n }", "@Override\r\n\tpublic Collection<V> values() {\r\n\t\tCollection<V> valueList = new ArrayList<V>();\r\n\t\tfor (Object o : buckets) {\r\n\t\t\tBucket b = (Bucket) o;\r\n\t\t\tvalueList.addAll(b.values());\r\n\t\t}\r\n\t\treturn valueList;\r\n\t}", "@Override\r\n\tpublic V get(Object key) {\r\n\t\tBucket bucket = (Bucket) buckets[key.hashCode() % numBuckets];\r\n\t\treturn bucket.get((K) key);\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getIgnorePublicAcls() != null)\n sb.append(\"IgnorePublicAcls: \").append(getIgnorePublicAcls()).append(\",\");\n if (getRestrictPublicBuckets() != null)\n sb.append(\"RestrictPublicBuckets: \").append(getRestrictPublicBuckets()).append(\",\");\n if (getBlockPublicAcls() != null)\n sb.append(\"BlockPublicAcls: \").append(getBlockPublicAcls()).append(\",\");\n if (getBlockPublicPolicy() != null)\n sb.append(\"BlockPublicPolicy: \").append(getBlockPublicPolicy());\n sb.append(\"}\");\n return sb.toString();\n }", "public static String getIntervalBucket() throws Exception {\n\t\treturn getConfig(\"intervalBucket\");\n\t}", "com.google.protobuf.ByteString\n getS3Bytes();", "@GetMapping(\"/buckets/{id}\")\n @Timed\n public ResponseEntity<BucketDTO> getBucket(@PathVariable Long id) {\n log.debug(\"REST request to get Bucket : {}\", id);\n BucketDTO bucketDTO = bucketService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(bucketDTO));\n }", "@Override\n\tpublic String toString() {\n\t\treturn getFluidId().toString() + \", \" + NumberUtilities.shorten(getAmount().doubleValue(), \"\") + \"/\" + NumberUtilities.shorten(getSize().doubleValue(), \"\") + \" Buckets\";\n\t}", "public byte[] getBytes()\n {\n try { return getRepo().newObjectReader().open(_entry.getObjectId()).getBytes(); }\n catch(Exception e) { throw new RuntimeException(e); }\n }", "GroupBuckets buckets();", "public String toString() {\n\t\treturn BlobUtil.string(buffer, offset, size);\n\t}", "public String getcBz() {\n return cBz;\n }", "public String getcBz() {\n return cBz;\n }", "public String getcBz() {\n return cBz;\n }", "com.google.protobuf.ByteString\n getSerBytes();", "public void setBucket(String inBucket);", "public String getBz() {\n return bz;\n }", "public String getBz() {\n return bz;\n }", "public String getBz() {\n return bz;\n }", "@Nonnull\n Map<Object, T> fetchBucket(int bucketIdx) throws Exception;", "public byte[] bucketOf(byte[] saltedKey) {\n return Arrays.copyOfRange(saltedKey, 0, Integer.toString(numOfBuckets - 1).length());\n }", "@Override\n public List<String> AllFileFromS3Bucket()\n {\n List<Bucket> buckets= amazonS3.listBuckets();\n List<String> keys = new ArrayList<>();\n \n for (Bucket b :buckets) {\n \t System.out.println(\" **** \" + b.getName());\n \t keys.add(b.getName());\n }\n\treturn keys;\n \n }", "public java.lang.String getS3() {\n java.lang.Object ref = s3_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n s3_ = s;\n }\n return s;\n }\n }", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "com.google.protobuf.ByteString\n getContractBytes();", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "public com.google.protobuf.ByteString\n getS3Bytes() {\n java.lang.Object ref = s3_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n return normalizedBic;\n }", "com.google.protobuf.ByteString getArtifactStorageBytes();", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "com.google.protobuf.ByteString getSerializedItem();", "public java.lang.String getS3() {\n java.lang.Object ref = s3_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n s3_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getS3Bytes() {\n java.lang.Object ref = s3_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n s3_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getCommit() != null)\n sb.append(\"Commit: \").append(getCommit()).append(\",\");\n if (getBlobId() != null)\n sb.append(\"BlobId: \").append(getBlobId()).append(\",\");\n if (getPath() != null)\n sb.append(\"Path: \").append(getPath()).append(\",\");\n if (getRevisionChildren() != null)\n sb.append(\"RevisionChildren: \").append(getRevisionChildren());\n sb.append(\"}\");\n return sb.toString();\n }", "com.google.protobuf.ByteString getGroupBytes();", "@Override\n public byte[] getBytes() {\n int len = 0;\n List<byte[]> chunks = new ArrayList<>();\n for (RvtAoiMetadataKey tag : getTags()) {\n chunks.add(new byte[] {(byte) tag.getIdentifier()});\n len += 1;\n IRvtPoiAoiMetadataValue value = getField(tag);\n byte[] bytes = value.getBytes();\n byte[] lengthBytes = BerEncoder.encode(bytes.length);\n chunks.add(lengthBytes);\n len += lengthBytes.length;\n chunks.add(bytes);\n len += bytes.length;\n }\n return ArrayUtils.arrayFromChunks(chunks, len);\n }", "public Bucket loadBucket(String name) throws S3Exception {\n\t\treturn null;\r\n\t}", "com.google.protobuf.ByteString\n getToBytes();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getClusterArn() != null)\n sb.append(\"ClusterArn: \").append(getClusterArn()).append(\",\");\n if (getCurrentVersion() != null)\n sb.append(\"CurrentVersion: \").append(getCurrentVersion()).append(\",\");\n if (getTargetBrokerEBSVolumeInfo() != null)\n sb.append(\"TargetBrokerEBSVolumeInfo: \").append(getTargetBrokerEBSVolumeInfo());\n sb.append(\"}\");\n return sb.toString();\n }", "@GetMapping(\"/buckets\")\n @Timed\n public ResponseEntity<List<BucketDTO>> getAllBuckets(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Buckets\");\n Page<BucketDTO> page = bucketService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/buckets\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public byte[] getBytes() {\r\n \treturn toString().getBytes();\r\n }", "@GET\n @Produces(\"application/xml\")\n public StorageConverter get() {\n return new StorageConverter(dao.retrieveById(id), context.getAbsolutePath());\n }", "com.google.protobuf.ByteString getObj();", "@Override\n\tpublic byte[] toByteArray() {\n\t\tComparatorProtos.ByteArrayComparable.Builder builder = ComparatorProtos.ByteArrayComparable.newBuilder();\n\t\tbuilder.setValue(ByteString.copyFrom(getValue()));\n\t\treturn builder.build().toByteArray();\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn this.key;\r\n\t}", "BucketStatistics() {\n\t\tthis(\"Historgram\");\n\t}", "public S3BucketSource getS3BucketSource() {\n return this.s3BucketSource;\n }", "public List<String> listBuckets() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (Bucket bucket : s3client.listBuckets()) {\n\t\t\tlist.add(bucket.getName());\n\t\t\t// System.out.println(\" - \" + bucket.getName());\n\t\t}\n\n\t\treturn list;\n\t}", "private String histogram() {\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint size = 0;\n\t\t\tfor (int j = 0; j < myBuckets.size(); j++) {\n\t\t\t\tif (myBuckets.get(j).size() == i) size++;\n\t\t\t}\n\t\t\tsb.append(size + \", \");\n\t\t}\n\t\tsb.replace(sb.length() - 2, sb.length(), \"]\");\n\t\treturn sb.toString();\n\t}", "public godot.wire.Wire.Basis.Builder getBasisValueBuilder() {\n return getBasisValueFieldBuilder().getBuilder();\n }", "public static Bucket getInstance(String bucket, String password, String server){\n\n String key = bucket.concat(password);\n\n if (cbClients == null){\n cbClients = new HashMap<String, Bucket>();\n }\n\n if (!cbClients.containsKey(key)) {\n try {\n List<String> nodes = new ArrayList<String>();\n String host1 = server;\n nodes.add(host1);\n Cluster cluster = CouchbaseCluster.create(host1);\n Bucket theBucket = cluster.openBucket(bucket,password);\n cbClients.put(key, theBucket);\n } catch (Exception e){\n e.printStackTrace();\n }\n }\n\n return cbClients.get(key);\n\n }", "public String getRepresentation();", "@Override\n public String toString() {\n return encodedHash.get();\n }", "public byte[] getBytes()\n {\n if (isModified())\n {\n // collect all constants\n ConstantPool pool = m_pool;\n boolean fOptimize = !pool.isOrderImportant();\n if (fOptimize)\n {\n if (pool != null)\n {\n // detach the previous pool from the ClassFile\n pool.setClassFile(null);\n }\n pool = new ConstantPool(this);\n }\n preassemble(pool);\n if (fOptimize)\n {\n pool.sort();\n }\n m_pool = pool;\n\n // assemble the class into bytes\n ByteArrayOutputStream streamRaw = new ByteArrayOutputStream(8192);\n DataOutputStream stream = new DataOutputStream(streamRaw);\n try\n {\n assemble(stream, pool);\n }\n catch (IOException e)\n {\n throw ensureRuntimeException(e);\n }\n m_abClazz = streamRaw.toByteArray();\n\n resetModified();\n }\n\n return m_abClazz;\n }", "public java.lang.String getBUKRS() {\n return BUKRS;\n }", "@Override\n public Blob getBlob(String bucketName, String objectPath) {\n Blob result = storageProvider.get().get(bucketName, objectPath);\n if (result == null) {\n throw new NotFoundException(String.format(\"Bucket %s, Object %s\", bucketName, objectPath));\n }\n return result;\n }", "public HashMap<String, T> getStorage();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getItems() != null) sb.append(\"Items: \" + getItems() + \", \");\n if (getCount() != null) sb.append(\"Count: \" + getCount() + \", \");\n if (getLastEvaluatedKey() != null) sb.append(\"LastEvaluatedKey: \" + getLastEvaluatedKey() + \", \");\n if (getConsumedCapacityUnits() != null) sb.append(\"ConsumedCapacityUnits: \" + getConsumedCapacityUnits() + \", \");\n sb.append(\"}\");\n return sb.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getZBytes() {\n java.lang.Object ref = z_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n z_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCollectionBytes() {\n return instance.getCollectionBytes();\n }", "@Override\n public String toString() {\n return getKey().toString() + \" scale\";\n }", "public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n gcsBucket_ = value;\n bitField0_ |= 0x00100000;\n onChanged();\n return this;\n }", "private int getBucketIndex( K key ) {\r\n\t\tint hashCode = key.hashCode();\r\n\t\treturn hashCode % numBuckets;\r\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}" ]
[ "0.74450624", "0.7444667", "0.6631115", "0.6618154", "0.65964174", "0.6538197", "0.65292335", "0.64291835", "0.64267373", "0.6421582", "0.64060223", "0.63522804", "0.626638", "0.626638", "0.6243037", "0.62183666", "0.6194888", "0.61523503", "0.61158234", "0.6098888", "0.6054213", "0.6051787", "0.59651655", "0.58934355", "0.5868591", "0.5854966", "0.5812632", "0.5723612", "0.57046425", "0.57013535", "0.566167", "0.55655", "0.55556476", "0.55347955", "0.5520758", "0.5511192", "0.54709667", "0.53677964", "0.5318855", "0.5311201", "0.5296363", "0.52925116", "0.5253942", "0.52508795", "0.5204026", "0.52027136", "0.52027136", "0.52027136", "0.51927763", "0.51530707", "0.5143872", "0.5143872", "0.5143872", "0.51294625", "0.5124783", "0.5120463", "0.51179487", "0.5086854", "0.5086854", "0.5086854", "0.5086854", "0.50797564", "0.5078296", "0.5068729", "0.50616956", "0.5045017", "0.50329274", "0.50322753", "0.50166035", "0.50061756", "0.49409768", "0.49373972", "0.4932701", "0.4929403", "0.49257606", "0.4913894", "0.49081725", "0.49064422", "0.49009368", "0.4900342", "0.48997983", "0.48976785", "0.48945978", "0.48803985", "0.4875456", "0.48741663", "0.48680738", "0.4866581", "0.48571908", "0.48542145", "0.48517177", "0.4848954", "0.48361954", "0.4833659", "0.48273164", "0.48273045", "0.48236138", "0.48219207", "0.48203638", "0.4817736" ]
0.7446115
0
Get the key representation.
K getKey();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getKey() {\n Object ref = key_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n key_ = s;\n }\n return s;\n }\n }", "public String getKey() {\n Object ref = key_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n key_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public final String getKey() {\n return key;\n }", "public java.lang.String getKey() {\n java.lang.Object ref = key_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n key_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getKey() {\n java.lang.Object ref = key_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n key_ = s;\n return s;\n }\n }", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public com.google.protobuf.ByteString\n getKeyBytes() {\n Object ref = key_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n key_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public com.google.protobuf.ByteString\n getKeyBytes() {\n Object ref = key_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n key_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getKey() {\n return key;\n }", "public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}", "public com.google.protobuf.ByteString\n getKeyBytes() {\n java.lang.Object ref = key_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n key_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getKey()\r\n {\r\n return getValue().toString();\r\n }", "@Override\n\tpublic String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public com.google.protobuf.ByteString\n getKeyBytes() {\n java.lang.Object ref = key_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n key_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getKey() {\n\n return this.key;\n }", "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "public String getKey()\n\t{\n\t\treturn key;\n\t}", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "public Key getKey() {\n return Key.of(getTone(), getQuality());\n }", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey(){\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n return this.key;\n }", "com.google.protobuf.ByteString getKeyBytes();", "com.google.protobuf.ByteString getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "public static String getKey(){\n\t\treturn key;\n\t}", "public String getKey() {\n\treturn key;\n }", "public String getKey()\n\t{\n\t\treturn this.key;\n\t}", "public java.lang.String getKey() {\n\t\treturn this.key;\n\t}", "byte[] getKey();", "public Key getKey() {\n\t\treturn key;\n\t}", "public String key() {\n return key;\n }", "public String key() {\n return key;\n }", "java.lang.String getClientKey();", "@Override\r\n\tpublic String toString() {\n\t\treturn this.key;\r\n\t}", "protected K getKey() {\n return this.key;\n }", "String key();", "public byte[] getKey() {\n return this.key;\n }", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "@Nullable public String getKey() {\n return key;\n }", "public static byte[] getKey() {\n return key;\n }", "@Override\n public String getKey() {\n return key;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public K getKey() {\n return key;\n }" ]
[ "0.7883103", "0.7878083", "0.7768571", "0.77516603", "0.774592", "0.7683487", "0.7683487", "0.7683487", "0.7683487", "0.7632131", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.75950307", "0.75950307", "0.75950307", "0.75879794", "0.7577724", "0.7572698", "0.75710773", "0.7570071", "0.7565633", "0.75619537", "0.75619537", "0.75619537", "0.7561948", "0.75560576", "0.75560576", "0.75560576", "0.75515276", "0.75515276", "0.75418097", "0.7539475", "0.7535402", "0.7496499", "0.74919534", "0.74919534", "0.74919534", "0.74919534", "0.74919534", "0.74919534", "0.74796236", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74559265", "0.74478024", "0.74478024", "0.74478024", "0.74478024", "0.74478024", "0.74478024", "0.7447199", "0.740035", "0.740035", "0.740035", "0.7397546", "0.7389802", "0.7389802", "0.7387527", "0.7387527", "0.7365965", "0.7354228", "0.7352598", "0.7350682", "0.7327075", "0.73225915", "0.73220986", "0.73220986", "0.72999895", "0.7294146", "0.7278904", "0.7269064", "0.72640145", "0.7263949", "0.7263949", "0.7263949", "0.72618234", "0.7260514", "0.7252728", "0.72467166", "0.72467166", "0.72467166", "0.72467166", "0.7242509" ]
0.0
-1
displays or hides tutorial depending on whether it is in view or not
@Override public void onClick(View v) { toggleTutorial(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toggleTutorial(){\n final RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n if(relLayoutTutorial.getVisibility() == View.VISIBLE){\n relLayoutTutorial.setVisibility(View.GONE);\n }else{\n relLayoutTutorial.setVisibility(View.VISIBLE);\n }\n Button btnCloseTutorial = (Button) view.findViewById(R.id.btn_close_tutorial);\n btnCloseTutorial.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n relLayoutTutorial.setVisibility(View.GONE);\n }\n });\n }", "boolean hasTutorial();", "public boolean isTutorialMode() {\n\t\treturn (this.tutorial != null);\n\t}", "private void tutorialCheck() {\n SharedPreferences sp = getApplicationContext().getSharedPreferences(getApplicationContext().getString(R.string.app_name), MODE_PRIVATE);\n if (sp.contains(\"Tutorial_Complete\")) {\n if (sp.getBoolean(\"Tutorial_Complete\", false)) {\n return;\n }\n }\n Intent intent = new Intent(this, TutorialPanel.class);\n startActivity(intent);\n }", "@Override\n\tpublic void editTutorial() {\n\t\t\n\t}", "public void showActivity() {\n setContentView(R.layout.activity_study);\n\n TextView info = (TextView) findViewById(R.id.trial_status);\n info.setText(getResources().getString(R.string.trial_status, Study.getCurrentTrialIndex(), Study.numTrials * 2));\n\n // hide demo button\n if (demosAvailable <= 0) {\n Button demo = (Button) findViewById(R.id.start_demo);\n demo.setVisibility(View.INVISIBLE);\n }\n }", "public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public void showInstructionsPanel()\n {\n setWidgetAsExample(introPanel);\n }", "boolean isInview();", "public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public void showInstructionsPanel() {\n\t\tsetWidgetAsExample(introPanel);\n\t}", "@FXML\r\n public void goToTutorial(ActionEvent event) {\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"../view/resources/Tutorial.fxml\"));\r\n \t\tScene scene = new Scene(root);\r\n \t\tMain.setScene(scene);\r\n\t\t}catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public boolean shown();", "public void showBuddyUpDetails() {\n\n String tutorialText = getResources().getString(R.string.tutorial_buddy_up);\n if (SharedPref.getInstance().getBooleanValue(getActivity(), isbussiness)) {\n tutorialText = getResources().getString(R.string.tutorial_buddy_up_business);\n }\n ShowcaseView mShowcaseView = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(btn_buddyup))\n .hideOnTouchOutside()\n .setContentText(tutorialText)\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_BUDDY_UP_ID)\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n mShowcaseView.setButtonText(getActivity().getString(R.string.tutorial_got_it));\n }", "private void showLyrics(){\r\n\t\tif(mLyrics == null || mLyrics.equals(\"null\")){\r\n\t\t\tmTextView.setText(R.string.no_lyrics);\r\n\t\t}else{\r\n\t\t\tmTextView.setText(mLyrics);\r\n\t\t}\r\n\t\tmViewFlipper.setDisplayedChild(1);\r\n\t}", "public void onTutorialClosed();", "public void showPickUPTutorial() {\n\n String tutorialText = getResources().getString(R.string.tutorial_pick_up);\n if (SharedPref.getInstance().getBooleanValue(getActivity(), isbussiness)) {\n tutorialText = getResources().getString(R.string.tutorial_pick_up_business);\n }\n\n ShowcaseView mShowcaseViewCreatePickup = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(btn_pickup))\n .hideOnTouchOutside()\n .setContentText(tutorialText)\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_PICK_UP_ID)\n .setShowcaseEventListener(new OnShowcaseEventListener() {\n @Override\n public void onShowcaseViewHide(ShowcaseView showcaseView) {\n\n }\n\n @Override\n public void onShowcaseViewDidHide(ShowcaseView showcaseView) {\n showCreatePickUPTutorial();\n }\n\n @Override\n public void onShowcaseViewShow(ShowcaseView showcaseView) {\n\n }\n\n @Override\n public void onShowcaseViewTouchBlocked(MotionEvent motionEvent) {\n\n }\n })\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n mShowcaseViewCreatePickup.setButtonText(getResources().getString(R.string.tutorial_got_it));\n }", "public void show(){\n System.out.println(\"Welcome to Edureka's Tutorial\");\n }", "public boolean isTargetVisible() {\n return getDouble(\"tv\") == 1;\n }", "public boolean isTextShown() {\n return introText.getVisibility() == View.VISIBLE;\n }", "void showTodoView();", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "boolean hasDisplayKeywordView();", "boolean hasTopicView();", "public boolean canDisplay(){\n if(title.isEmpty() && body.isEmpty()){\n return false;\n }\n\n return true;\n }", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "private void showElements(){\n question.setVisibility(View.VISIBLE);\n yes_for_joke.setVisibility(View.VISIBLE);\n no_for_joke.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n }", "boolean isDisplay();", "boolean isDisplay();", "public MenuButton getTutorialButton() {\n return tutorialButton;\n }", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t helpScreen.append(\"^ = walk forward\\n\");\n\t\t helpScreen.append(\"v = walk backwards\\n\");\n\t\t helpScreen.append(\"< = turn left\\n\");\n\t\t helpScreen.append(\"> = turn right\\n\");\n\t\t helpScreen.append(\"fire = change reverb manually\\n\");\n\t\t}\n\t\thelpScreen.addCommand(toggleCommand);\n\t\thelpScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(helpScreen);\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tview.setREADMEVisible(true);\n\t\t}", "@Override\n public boolean isLearnMoreDisplayed() {\n\n setLogString(\"Check if Learn More is displayed\", true, CustomLogLevel.HIGH);\n return isDisplayed(getDriver(), By.cssSelector(\".help_icon.clickable\"), TINY_TIMEOUT);\n }", "public void startTrial(View view) {\n demo = false;\n updateCurrentFragment(new SetupFragment(), \"setup\");\n }", "public static void welcome(Boolean t) {\n String logo = \" ____ _ \\n\"\n + \"| _ \\\\ _ _| | _____ \\n\"\n + \"| | | | | | | |/ / _ \\\\\\n\"\n + \"| |_| | |_| | < __/\\n\"\n + \"|____/ \\\\__,_|_|\\\\_\\\\___|\\n\";\n System.out.println(\"Hello from\\n\" + logo);\n System.out.println(\"\\t____________________________________________________________\");\n System.out.println(\"\\tHello! I'm Duke\\n\\tWhat can I do for you?\");\n\n if (!t) {\n System.out.println(\"\\tYou have existing tasks to do!\\n\\tType 'load' to view existing tasks!\");\n }\n\n System.out.println(\"\\t____________________________________________________________\");\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n myrlayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@Override\n\tpublic void shown() {\n\n\t}", "public void showStory() {\r\n\t\tGameEngine.getInstance().getCommandProcessor().clearScreen();\r\n\t\tprintln(\"\");\r\n\t\tprintln(RenderUtil.getWelcomeMessage());\r\n\t\ttry {\r\n\t\t\tfor (String outputString : GamePlayUtil.GAME_STORY) {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tRenderUtil.println(\"\\t\" + outputString);\r\n\t\t\t}\r\n\t\t\tThread.sleep(2000);\r\n\t\t} catch (Exception e) {\r\n\t\t\tprintln(\"Problem Occured...\");\r\n\t\t}\r\n\t}", "@Then(\"^story is displayed in the project page$\")\n public void newStoryNameIsDisplayedInTheProjectPage() {\n assertion.assertTrue(project.isVisibleStory(helper.getStoryVariable()));\n }", "boolean isContentDisplayed();", "protected void showViewContents() {\n\t\tnoData.heightHint = 0;\n\t\tyesData.heightHint = -1;\n\n\t\tnoData.exclude = true;\n\t\tyesData.exclude = false;\n\n\t\tnoLabel.setVisible(false);\n\t\tyesComposite.setVisible(true);\n\t\tredraw();\n\t}", "public void show() {\n hidden = false;\n }", "public TutorialPane(MainApplication app) {\n this.program = app;\n \n // Header/ General instructions for the game\n header = new GParagraph(\n \"Your goal is to defeat all the enemies in a room then progress to the next.\\nFind the staircase to the next floor.\\nPause with `ESC`\",\n MainApplication.WINDOW_WIDTH / 4, 100);\n header.setFont(\"Arial-24\");\n \n // Instructions on how one should move about the game\n moveInstructions = new GParagraph(\"To move, use the\\n\\\"WASD\\\" keys\", MainApplication.WINDOW_WIDTH / 6 + 50,\n 2 * MainApplication.WINDOW_HEIGHT / 3);\n moveInstructions.setFont(\"Arial-24\");\n \n // Instructions on how one should go about attacking in game-play\n attackInstructions = new GParagraph(\"To fire, use either mouse button\",\n 4 * MainApplication.WINDOW_WIDTH / 6, 2 * MainApplication.WINDOW_HEIGHT / 3);\n attackInstructions.setFont(\"Arial-24\");\n \n // Instructions on how to escape the tutorial menu\n pressToContinue = new GLabel(\"Press any key or mouse button to continue...\", MainApplication.WINDOW_WIDTH / 2 - 250,\n 5 * MainApplication.WINDOW_HEIGHT / 6);\n pressToContinue.setFont(\"Arial-24\");\n\n // Appropriate images and such placed correctly\n moveKeys = new GImage(\"WASD.png\", MainApplication.WINDOW_WIDTH / 6, 2 * MainApplication.WINDOW_HEIGHT / 3);\n moveKeys.move(0, -1 * moveKeys.getHeight() - 100);\n attackKeys = new GImage(\"../media/mouse_buttons.png\", 4 * MainApplication.WINDOW_WIDTH / 6 + 50, 2 * MainApplication.WINDOW_HEIGHT / 3);\n attackKeys.setSize(150, 260);\n attackKeys.move(0, -1 * attackKeys.getHeight() - 100);\n }", "void startView();", "public void displayExam(WordExam exam) {\n\n wordToExamTxt.setText(exam.getWordToExam().getWord());\n\n MediaPlayer wordMediaPlayer = wordsAudioManager.getWordMediaPlayer(exam.getWordToExam());\n if (wordMediaPlayer != null) {\n wordMediaPlayer.start();\n }\n\n option1Btn.setVisibility(View.INVISIBLE);\n option2Btn.setVisibility(View.INVISIBLE);\n option3Btn.setVisibility(View.INVISIBLE);\n option4Btn.setVisibility(View.INVISIBLE);\n\n // Wait 2 seconds\n option1Btn.postDelayed(new Runnable() {\n @Override\n public void run() {\n option1Btn.setVisibility(View.VISIBLE);\n }\n }, TIME_ANSWERS_ARE_HIDDEN);\n\n option2Btn.postDelayed(new Runnable() {\n @Override\n public void run() {\n option2Btn.setVisibility(View.VISIBLE);\n }\n }, TIME_ANSWERS_ARE_HIDDEN);\n\n option3Btn.postDelayed(new Runnable() {\n @Override\n public void run() {\n option3Btn.setVisibility(View.VISIBLE);\n }\n }, TIME_ANSWERS_ARE_HIDDEN);\n\n option4Btn.postDelayed(new Runnable() {\n @Override\n public void run() {\n option4Btn.setVisibility(View.VISIBLE);\n }\n }, TIME_ANSWERS_ARE_HIDDEN);\n\n option1Btn.setText(exam.getOptions().get(0));\n option2Btn.setText(exam.getOptions().get(1));\n option3Btn.setText(exam.getOptions().get(2));\n option4Btn.setText(exam.getOptions().get(3));\n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "public void setTutorialFish() {\n\t\txSpeed = 0;\n\t\tySpeed = 0;\n\t\txloc = frameWidth / 2;\n\t\tyloc = frameHeight / 2;\n\t\tisTutorial = true;\n\t}", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "public boolean isDisplayed();", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "private void findView() {\n\t\tteacher = Teacher.getTeacher(this);\r\n\t\tsaoyisaonan = (ImageView) findViewById(R.id.saoyisaonan);\r\n\t\tsaoyisaonv = (ImageView) findViewById(R.id.saoyisaonv);\r\n\t\tif(teacher.isBoy()){\r\n\t\t\tsaoyisaonan.setVisibility(View.VISIBLE);\r\n\t\t}else{\r\n\t\t\tsaoyisaonv.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\t\tclose = (ImageView) findViewById(R.id.close);\r\n\t\tclose.setOnClickListener(this);\r\n\t\tlogin = (ImageView) findViewById(R.id.login);\r\n\t\tlogin.setOnClickListener(this);\r\n\t\treg = (ImageView) findViewById(R.id.reg);\r\n\t\treg.setOnClickListener(this);\r\n\t}", "public void show() {\n\t\thidden = false;\n\t}", "@Override\n public boolean isShown() {\n return super.isShown();\n }", "void showAbout() {\n\t\tif (aboutScreen == null) {\n\t\t aboutScreen = new Form(\"About AMMS Mansion demo\");\n\t\t aboutScreen.append(\"This MIDlet demonstrates the 3D audio capabilities of AMMS API.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"Copyright (c) 2006 Nokia. All rights reserved.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t}\n\t\taboutScreen.addCommand(toggleCommand);\n\t\taboutScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(aboutScreen);\n }", "@Override\n\tpublic void showContents() {\n\t\tt1.start();\n\t\tif (menuAnimation.title_showing())\n\t\t{\n\t\t\tprogram.add(Play);\n\t\t\tprogram.add(Settings);\n\t\t\tprogram.add(Credits);\n\t\t\tprogram.add(Exit);\n\t\t\tprogram.add(barrel);\n\t\t\tprogram.add(tank);\n\t\t\ttitle.setLocation(30,80);\n\t\t\ttitle.changeTransparent(1);\n\t\t\tprogram.add(title);\n\t\t\tbackground.setImage(\"otherImages/background.png\");\n\t\t\tbackground.setSize(900,620);\n\t\t\tbackground.setLocation(-50,0);\n\t\t\tbg.start();\n\t\t\tbackground.sendToBack();\n\t\t\tprogram.add(background);\n\t\t}\n\t}", "public interface TutorialMvpView extends MvpView {\n}", "boolean isVisible();", "boolean isVisible();", "private void initializeViews() {\n \n \t\tIViewReference[] views = PlatformUI.getWorkbench().getActiveWorkbenchWindow()\n \t\t\t\t.getActivePage().getViewReferences();\n \n\t\tIWorkbenchPart activeView = PlatformUI.getWorkbench().getActiveWorkbenchWindow()\n\t\t\t\t.getActivePage().getActivePart();\n\n \t\ttry {\n \t\t\tfor (IViewReference view : views) {\n\n\t\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()\n\t\t\t\t\t\t.showView(view.getId());\n\t\t\t}\n\n\t\t\tif (activeView instanceof CaleydoRCPViewPart) {\n\t\t\t\t// Make sure that the active part will remain active\n \t\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()\n\t\t\t\t\t\t.showView(((CaleydoRCPViewPart) activeView).getSite().getId());\n \t\t\t}\n \t\t}\n \t\tcatch (PartInitException e) {\n \t\t\tthrow new IllegalStateException();\n \t\t}\n \n \t}", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "public void willBeDisplayed() {\n\t\t// Do what you want here, for example animate the content\n\t\tif (fragmentContainer != null) {\n\t\t\tAnimation fadeIn = AnimationUtils.loadAnimation(getActivity(), R.anim.fade_in);\n\t\t\tfragmentContainer.startAnimation(fadeIn);\n\t\t}\n\t}", "private void showHelpFragment() {\n if (!helpFragment.isVisible()) {\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.add(R.id.relativeLayout, helpFragment, \"helpFragment\");\n transaction.commit();\n }\n\n else getFragmentManager().beginTransaction().remove(getFragmentManager().findFragmentByTag(\"helpFragment\")).commit();\n }", "public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }", "public void tick() {\n if (showTutorial) {\n if (backButton.isPressed()) {\n showTutorial = false;\n }\n } else {\n if (tutorialButton.isPressed()) {\n showTutorial = true;\n }\n titleAnimation.tick();\n }\n startButton.tick();\n highscoreButton.tick();\n tutorialButton.tick();\n backButton.tick();\n }", "public void switchToTalentPanel() {\r\n this.midPanelCards.show(this.flipPanel, \"TalentPanel\");\r\n }", "public void setDisplayed(boolean show);", "public void setDisplay(boolean isFaceUp, boolean isTapped) {\n \n \t}", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "public void toIntro(View v){\n Intent intent = new Intent(this, IntroActivity.class);\n startActivity(intent);\n }", "boolean isDisplayed();", "public void showTrainGUI() {\n //Make sure to set it visible\n this.getTrainGUI().setTitle(this.getTrainID());\n this.getTrainGUI().setVisible(true);\n }", "private LessonController() {\n\t\tview = LessonPanel.getLessonPanel();\n\t\tview.clearPhraseTabelContent();\n\t\t//initAllPhrases();\n\t\taddALlListeners();\n\n\t\t//view.setVisible(true);\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "public void showFilmOverview() {\r\n try {\r\n // Load film overview.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(FilmApp.class.getResource(\"view/FilmOverview.fxml\"));\r\n AnchorPane filmOverview = (AnchorPane) loader.load();\r\n\r\n // Set film overview into the center of root layout.\r\n rootLayout.setCenter(filmOverview);\r\n\r\n // Give the controller access to the FilmApp.\r\n FilmOverviewController controller = loader.getController();\r\n controller.setFilmApp(this);\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void show();", "private void nexttest(){\n\t\tif (TestListPanel.ktea2yn = true){\n\t\tnextframe = new Ktea2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\t/*else if (wiscyn = true){\n\t\tnextframe = new Wiscframe();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse if (basc2yn = true){\n\t\tnextframe = new Basc2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\n\t\t}*/\n\t\t\n\t}", "@Override\n public boolean isVisible()\n {\n return true;\n }", "private void videoVisible() {\n }", "public void HelpButtonClick(View view) {\n GeneralHelper.ShowHelpInWishActivity(\"step_test.html\", \"\", this);\n return;\n }", "boolean hasActiveView();", "public void showContent() {\n\n mapView.setVisibility(View.VISIBLE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n\n }", "private void showShareView() {\n Timber.d(\"showShareView\");\n }", "public void display() {\n startPreview();\n }", "boolean isReadyForShowing();", "public void delhiTrue(View view) { //Sets delhi to be true\n delhi = true;\n }", "public boolean getIsVisible();", "boolean hasKeywordView();", "@FXML\r\n\tpublic void viewTest( ) {\r\n\t\ttry {\r\n\t\t\tParent root2 = FXMLLoader.load(getClass().getResource(\"../view/TestView.fxml\"));\r\n\t\t\tMain.stage.setScene(new Scene (root2, 700, 500));\r\n\t\t\tMain.stage.show();\r\n\t\t} catch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}", "public void singlePlayerChosen(){\n DifficultyViewController dif = new DifficultyViewController(this);\n dif.showView();\n this.hideView();\n }", "public void showInfo() {\n TextView nameTV = (TextView) findViewById(R.id.nameText);\n if (nameTV == null) {\n // Fragment is not loaded yet\n return;\n }\n nameTV.setText(\"Name: \" + name);\n TextView batteryTV = (TextView) findViewById(R.id.batteryText);\n batteryTV.setText(\"Battery: \" + battery);\n CheckBox stiffBox = (CheckBox) findViewById(R.id.stiffBox);\n stiffBox.setChecked(stiffness);\n\n LinearLayout robotInfo = (LinearLayout) findViewById(R.id.robotInfo);\n if (robotInfo == null) {\n return;\n }\n if (networkThread != null && networkThread.connected()) {\n robotInfo.setVisibility(View.VISIBLE);\n } else {\n robotInfo.setVisibility(View.INVISIBLE);\n }\n }", "public void startVideoNotityHelpTip() {\n }" ]
[ "0.7643905", "0.7085756", "0.69813466", "0.65988517", "0.654705", "0.6338231", "0.6189351", "0.617932", "0.61252004", "0.60842645", "0.5916989", "0.5903919", "0.58485436", "0.5816203", "0.5790957", "0.57833284", "0.577", "0.575967", "0.5751328", "0.5738212", "0.57323915", "0.5688905", "0.5672775", "0.56589496", "0.5647602", "0.5592221", "0.55858904", "0.558009", "0.558009", "0.558009", "0.558009", "0.558009", "0.558009", "0.55485183", "0.5539157", "0.5539157", "0.55269575", "0.55205977", "0.55158305", "0.5499473", "0.54974806", "0.54952526", "0.5486911", "0.54767835", "0.54684216", "0.5459069", "0.54561555", "0.5455394", "0.5452818", "0.54500157", "0.5444245", "0.5440171", "0.5436057", "0.54340017", "0.5426906", "0.5424088", "0.5412472", "0.54063106", "0.5404382", "0.5399968", "0.53943974", "0.53943676", "0.5380565", "0.5361352", "0.5361352", "0.5351217", "0.5345977", "0.53443694", "0.53250897", "0.5322778", "0.53220624", "0.53201485", "0.531981", "0.5318856", "0.5310466", "0.53084314", "0.5303364", "0.52996045", "0.529385", "0.5293814", "0.5293814", "0.5293814", "0.5292519", "0.5289097", "0.5281057", "0.5278021", "0.5260025", "0.5254327", "0.52525914", "0.52512157", "0.5250603", "0.5250576", "0.5246815", "0.5242241", "0.52422404", "0.5242016", "0.5238829", "0.5238496", "0.52375966", "0.52339876" ]
0.71236986
1
Shows a popover displaying nearby memories
@Override public void onClick(View v) { showMemoriesPopover(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMemoriesPopover(){\n\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(this);\n\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "public void showAddMemoriesPopover(){\n Log.i(logMessages.MEMORY_MONITORING, \"HistoryFragment : showAddMemoriesPopover called\");\n FragmentManager fm = getActivity().getSupportFragmentManager();\n AddMemoryFragment addMemoryFragment = AddMemoryFragment.newInstance();\n\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom);\n fragmentTransaction.replace(R.id.fragment_container, addMemoryFragment, \"AddMemoriesFragment\");\n\n fragmentTransaction.commit();\n }", "private void show() {\n\t\tdouble position = rootNode.getLayoutY();\n\n\t\tif (position >= -OFFSET && isPopping) {\n\t\t\trootNode.setLayoutY(position + SPEED);\n\t\t\tif (position + SPEED >= 40) {\n\t\t\t\tisPopping = false;\n\t\t\t}\n\n\t\t} else {\n\t\t\trootNode.setLayoutY(position - SPEED);\n\t\t\tif (position - SPEED <= -OFFSET) {\n\t\t\t\tcurrentPopUp = null;\n\t\t\t\trootNode.setLayoutY(-OFFSET);\n\t\t\t}\n\t\t}\n\t}", "private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject);\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name);\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "public void showOPanel(Point p) {\r\n \r\n \t}", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void showObject(){\n Resources res = getResources();\r\n Bitmap drag1Bitmap = BitmapFactory.decodeResource(res , R.drawable.drag1);\r\n Bitmap drag2Bitmap = BitmapFactory.decodeResource(res , R.drawable.drag2);\r\n Bitmap yandexBitmap = BitmapFactory.decodeResource(res , R.drawable.yandex);\r\n\r\n // Create a layer of objects for the map\r\n DragAndDropOverlay overlay = new DragAndDropOverlay(mMapController);\r\n\r\n // Create an object for the layer\r\n DragAndDropItem drag1Item = new DragAndDropItem(new GeoPoint(55.752004 , 37.617017), drag1Bitmap);\r\n // Set offsets of the image to match the balloon tail with the specified GeoPoint\r\n drag1Item.setOffsetX(7);\r\n drag1Item.setOffsetY(-23);\r\n // Make the object draggable\r\n drag1Item.setDragable(true);\r\n\r\n // Create a balloon model for the object\r\n BalloonItem balloonDrar1 = new BalloonItem(drag1Item.getGeoPoint(), null);\r\n balloonDrar1.setText(getString(R.string.drag));\r\n // Set the additional balloon offset\r\n balloonDrar1.setOffsetX(-10);\r\n // Add the balloon model to the object\r\n drag1Item.setBalloonItem(balloonDrar1);\r\n // Add the object to the layer\r\n overlay.addOverlayItem(drag1Item);\r\n\r\n\r\n // Create an object for the layer\r\n DragAndDropItem drag2Item = new DragAndDropItem(new GeoPoint(55.734029 , 37.588499), drag2Bitmap);\r\n // Set offsets of the image to match the balloon tail with the specified GeoPoint\r\n drag2Item.setOffsetX(7);\r\n drag2Item.setOffsetY(-23);\r\n // Make the object draggable\r\n drag2Item.setDragable(true);\r\n\r\n // Create the balloon model for the object\r\n BalloonItem balloonDrag2 = new BalloonItem(drag2Item.getGeoPoint(), yandexBitmap);\r\n balloonDrag2.setText(getString(R.string.drag));\r\n balloonDrag2.setAlign(BalloonRender.ALIGN_BOTTOM | BalloonRender.ALIGN_CENTER);\r\n // Set the additional balloon offset\r\n balloonDrag2.setOffsetX(-10);\r\n // Add the balloon model to the object\r\n drag2Item.setBalloonItem(balloonDrag2);\r\n // Add the object to the layer\r\n overlay.addOverlayItem(drag2Item);\r\n\r\n // Add the layer to the map\r\n mOverlayManager.addOverlay(overlay);\r\n }", "public void show() {\n\t\tsetLocation(\n\t\t\tgetOwner().getX() + (getOwner().getWidth() - getWidth()) / 2, \n\t\t\tgetOwner().getY() + (getOwner().getHeight() - getHeight()) / 2 );\n\n\t\tsuper.show();\n\t}", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void actualShowWorldChest(){\n\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"WorldChest\");\n\t\tel.show();\n\t\tfor(Item it : screenManager.getInventoryManager().getOpenWorldChest()){\n\t\t\tif(it.getInventoryPosition() != null){\n\t\t\t\tElement toHide = nifty.getScreen(\"hud\").findElementByName(\"hoverstats-\"+it.getId());\n\t\t\t\tif(toHide!=null){\n\t\t\t\t\ttoHide.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "void showTooltip();", "public void showTipDialog() {\n this.controller.showTipModal(C7251R.string.lys_dls_photo_tip_title, C7251R.string.lys_dls_photo_tip_text, NavigationTag.LYSAddPhotosTip);\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "@Override\n public void onMouseOver(MouseOverEvent event) {\n popup.setPositionAndShow(event);\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "static void showOverlay() {\n\t\ti1.setOverlay(OL);\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\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 showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void showPile() {\n Nodo rounded = lastIn;\n while (rounded != null) {\n List += rounded.info + \"\\n\";\n rounded = rounded.next;\n }\n JOptionPane.showMessageDialog(null, List);\n List = \"\";\n }", "protected void displayPopulation() {\n \n /**/println(\"\\nDisplaying population:\", 0);\n for(int i = 0; i < population_size; i++) {\n println(\"i = \" + i, 1);\n if(population[i] == null) {\n //System.exit(0);\n }\n displayChromosome(population[i], 0);\n }\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void show() {\n visible=true;\n }", "public void showBoomKeyTip() {\n }", "@Override\n\tpublic void move(Herbivore h, Plant p) {\n\t\tif(Flatland.distance(myX, myY, h.getX(), h.getY()) < 50){\n\t\t\tisHidden = false;\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmyColor = StdDraw.RED;\n\t\t}\n\t\telse{\n\t\t\tisHidden = true;\n\t\t\tmyX = myX;\n\t\t\tmyY = myY;\n\t\t\tmyColor = StdDraw.GREEN;\n\t\t}\n\t\t//if moved off screen, predator shows up on other side\n\t\tif(myX < 0){\n\t\t\tmyX = 1000;\n\t\t}\n\t\tif(myX > 1000){\n\t\t\tmyX = 0;\n\t\t}\n\t\tif(myY < 0){\n\t\t\tmyY = 1000;\n\t\t}\n\t\tif(myY > 1000){\n\t\t\tmyY = 0;\n\t\t}\n\t}", "public void show() {\n numberList.show();\n }", "public void showOpponentMap(Admiral admiral) {\r\n\t\tint[] mapGrid = returnOpponent(admiral).getMapGrid();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The map of admiral: \"\r\n\t\t\t\t+ returnOpponent(admiral).getAdmiralName());\r\n\t\tSystem.out.print(\" \");\r\n\t\tfor (int i = 0; i < Constants.COLUMNS_TITLES.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + Constants.COLUMNS_TITLES[i]);\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tfor (int j = 0; j < Constants.ROW_LENGTH; j++) {\r\n\t\t\tif (j < 9) {\r\n\t\t\t\tSystem.out.print(j + 1 + \" \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(j + 1);\r\n\t\t\t}\r\n\t\t\tfor (int k = 0; k < Constants.ROW_LENGTH; k++) {\r\n\t\t\t\tString cell = null;\r\n\t\t\t\tif (mapGrid[j * Constants.ROW_LENGTH + k] == 0\r\n\t\t\t\t\t\t|| mapGrid[j * Constants.ROW_LENGTH + k] == 1) {\r\n\t\t\t\t\tcell = \" \" + \"0\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == -1) {\r\n\t\t\t\t\tcell = \" \" + \"*\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == 2) {\r\n\t\t\t\t\tcell = \" \" + \"X\";\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(cell);\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "@Override\n public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) {\n if (beyondarObjects.size() > 0) {\n Toast.makeText(this, \"Clicked on: \" + beyondarObjects.get(0).getId(), Toast.LENGTH_LONG).show();\n if(mPlaceDetail!=null)\n {\n if(currentDisplayMode!=DISPLAY_PLACE_DETAIL)\n {\n if(!mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getName().equals(mPlaceDetail.get(0).getName()))\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n }\n else\n {\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);\n previousDisplayMode=currentDisplayMode;\n currentDisplayMode=DISPLAY_PLACE_DETAIL;\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n\n }\n }\n }", "@Override\n\tpublic void showItems(JZMatchBean bean, LinearLayout parent_layout) {\n\t\t\n\t}", "private void inspectShelterAt(Point p)\n {\n // Ignore clicks outside the actual grid of shelters\n int col = (int) p.getX();\n if ( col < 0 ) return;\n if ( col >= shelters.getGridWidth() ) return;\n \n int row = (int) p.getY();\n if ( row < 0 ) return;\n if ( row >= shelters.getGridHeight() ) return;\n \n Shelter s = shelters.getShelterAt( col, row );//shelterGrid[col][row];\n\n if (s != null)\n {\n // use hash map to see if the window is already created, and if so,\n // just focus; otherwise, create a new inspector window\n double time = simulation.getTime();\n String id = s.getRow() + \",\" + s.getCol() + \" \" + time;\n ShelterInspector window = ShelterInspector.windowList.get(id);\n if (window == null)\n {\n window = new ShelterInspector(s, time, id);\n ShelterInspector.windowList.put(id, window);\n }\n window.setVisible(true);\n }\n }", "public void showSquareDetails(){\r\n view.printSquareDetails(model.getSideLength(), model.getColor());\r\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "public boolean shown();", "public ShowWarehouseMore(UserMenu um) {\n initComponents();\n view=ViewLogic.getInstance();\n this.um=um;\n icon_plus.setVisible(false);\n icon_remove.setVisible(false);\n partsTableLayeredPane.setVisible(false);\n vehicleLayeredPane.setVisible(false);\n Add_btn1.setVisible(false);\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "private void updatePopupPosition() {\n // get the annotation's screen coordinates\n SKScreenPoint screenPoint = mapView.coordinateToPoint(selectedAnnotation.getLocation());\n // change the popup's (screen) position\n mapPopup.changePosition(screenPoint.getX(), screenPoint.getY(), 65);\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "public void show() {\r\n\t\tif (getSpawnLocation() == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (!checkItem()) {\r\n\t\t\titem \t= getWorld().dropItem(getSpawnLocation(), getItemStack());\r\n\t\t\titem.setVelocity(new Vector(0, 0.1, 0));\r\n\t\t\titem.setPickupDelay(1000);\r\n\t\t\t\r\n\t\t}\r\n\t\tisVisible \t= true;\r\n\t}", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "public void show() {\n\t\tshown = true;\n\t\t\n\t\tfor(CustomScoreboardEntry entry : entries)\n\t\t\tentry.show();\n\t}", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "private void showPanel()\n {\n currentPanel = this;\n isLiked = thisIsLiked;\n currentActivityId = thisActivityId;\n viewAll.setVisible(false);\n avatarPanel.clear();\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"top\", likeCountLink.getAbsoluteTop() + \"px\");\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"left\", likeCountLink.getAbsoluteLeft() + \"px\");\n \n for (PersonModelView liker : likers)\n {\n avatarPanel.add(new AvatarLinkPanel(EntityType.PERSON, liker.getUniqueId(), liker.getId(), liker\n .getAvatarId(), Size.VerySmall, liker.getDisplayName()));\n }\n \n if (likeCount > MAXLIKERSSHOWN)\n {\n viewAll.setVisible(true);\n }\n likedLabel.setText(likeCount + \" people liked this\");\n innerLikeCountLink.setText(likeCount.toString());\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "public void show() {\n if (mPopupWindow.isShowing()) return;\n\n mRectProvider.startObserving(this);\n\n updatePopupLayout();\n showPopupWindow();\n }", "public void displayInformation(View view) {\n layoutInflater = (LayoutInflater) getApplicationContext().getSystemService(LAYOUT_INFLATER_SERVICE);\r\n ViewGroup container = (ViewGroup) layoutInflater.inflate(R.layout.question_mark_popup,null);\r\n\r\n// popupWindow = new PopupWindow(container,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,true);\r\n// popupWindow.showAtLocation(view, Gravity.NO_GRAVITY,100,1300);\r\n\r\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n popupWindow = new PopupWindow(container, width, height, true);\r\n\r\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\r\n\r\n container.setOnTouchListener(new View.OnTouchListener(){\r\n @Override\r\n public boolean onTouch(View view, MotionEvent motionEvent){\r\n popupWindow.dismiss();\r\n return true;\r\n }\r\n });\r\n\r\n }", "public void showWarningPopup() {\n\t\ttv_popupTitle.setText(\"Power Warning\");\n\t\ttv_popupInfo.setText(R.string.warning);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "@Override\r\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "boolean hasDetailPlacementView();", "public void displayPossibleMoves() {\n \tGame.permBoard.displayBoard();\n }", "@Override\n\tpublic void shown() {\n\n\t}", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "static void drawPop(){\n\t\tif (currentStage[currentSlice-1]>3)\n\t\t{\n\t\t\tfloat x1,y1;\n\t\t\tint N = pop.N;\n\n\t\t\tfor (int i=0;i<N;i++)\n\t\t\t{\n\t\t\t\tBalloon bal;\n\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\tint n = bal.XX.length;\n\n\t\t\t\t// filtering (for testing purposes)\n\t\t\t\tboolean isToDraw = true;\n\t\t\t\tBalloon B0 = ((Balloon)(pop.BallList.get(i)));\n\t\t\t\tB0.mass_geometry();\n\t\t\t\tif (pop.contacts != null)\n\t\t\t\t{\n\t\t\t\t\tfor (int k=0;k<B0.n0;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pop.contacts[i][k] == -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisToDraw = true;\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\t// draw\n\t\t\t\tshape.setWindingRule(0);\n\t\t\t\tif (isToDraw)\n\t\t\t\t{\n\t\t\t\t\tPolygonRoi Proi = B0.Proi;\n\t\t\t\t\tProi.setStrokeColor(Color.red);\n\t\t\t\t Proi.setStrokeWidth(3);\n\t\t\t\t OL.add(Proi);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void showMazeSize(int size);", "private void showMessage(int position) {\n // Open Bottom sheet and show details\n }", "void showCustomizer();", "public void showBalloonTip() {\n TimingUtils.showTimedBalloon(balloonTip , 3000);\n }", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "@Override\n public void show() {\n }", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "public void showMoreClusters() {\n\t\tfor (ETNACluster cluster : ontologyInstance.getHiddenClusters()) {\n\t\t\tif (!ontologyInstance.getClustersToShowInView().contains(cluster))\n\t\t\t\tontologyInstance.getClustersToShowInView().add(cluster.clone());\n\t\t}\n\t\tthis.clustersShowFlag = false;\n\t\tthis.activeTabIndex = \"-1\";\n\n\t}", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "public void showMoreClusterItems() {\n\n\t\tfor (EASTINProperty prop : activeETNACluster.getAttributesToHide()) {\n\t\t\tif (!activeETNACluster.getAttributesToShowInView().contains(prop))\n\t\t\t\tactiveETNACluster.getAttributesToShowInView().add(prop.clone());\n\t\t}\n\n\t\tfor (EASTINProperty prop : activeETNACluster.getMeasuresToHide()) {\n\t\t\tif (!activeETNACluster.getMeasuresToShowInView().contains(prop))\n\t\t\t\tactiveETNACluster.getMeasuresToShowInView().add(prop.clone());\n\t\t}\n\n\t\tthis.activeETNACluster.setShowItems(false);\n\n\t}" ]
[ "0.6421665", "0.6088149", "0.6005732", "0.58114076", "0.57255524", "0.5713671", "0.56944036", "0.5675219", "0.557632", "0.55250674", "0.54891956", "0.54525125", "0.54114574", "0.5401078", "0.5325711", "0.5270332", "0.5251371", "0.52272636", "0.5217943", "0.5157134", "0.5155931", "0.5148322", "0.5142356", "0.51401734", "0.5132168", "0.51274085", "0.5126461", "0.5120404", "0.51021814", "0.50942576", "0.5077593", "0.50705504", "0.5065996", "0.5053784", "0.50537676", "0.5051752", "0.50456315", "0.50414276", "0.5035732", "0.5032683", "0.5024133", "0.50207955", "0.5017323", "0.5016241", "0.5016241", "0.5016241", "0.500708", "0.50049895", "0.50029147", "0.500045", "0.49907675", "0.49798888", "0.4970421", "0.49650297", "0.49650297", "0.4955665", "0.4951223", "0.49490866", "0.49450558", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.49418643", "0.4940219", "0.4938085", "0.4932184", "0.4928319", "0.4925518", "0.4921308", "0.49172458", "0.49147436", "0.4914491", "0.49129137", "0.4902098", "0.4902098", "0.4902098", "0.4902098", "0.4902098", "0.4902098", "0.4902098", "0.4902098", "0.49019465", "0.48970166", "0.48940912", "0.48901874", "0.4883808", "0.48821893", "0.48821893", "0.48819873" ]
0.6819796
0
If the tutorial is visible, makes it invisible. Otherwise, makes it visible
private void toggleTutorial(){ final RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); if(relLayoutTutorial.getVisibility() == View.VISIBLE){ relLayoutTutorial.setVisibility(View.GONE); }else{ relLayoutTutorial.setVisibility(View.VISIBLE); } Button btnCloseTutorial = (Button) view.findViewById(R.id.btn_close_tutorial); btnCloseTutorial.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { relLayoutTutorial.setVisibility(View.GONE); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n toggleTutorial();\n }", "@Override\n public void makeHidden(Player viewer) {\n \n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "public void setIsVisible(boolean isVisible);", "public void setVisible(Boolean isVisible);", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "public void setVisible(Boolean visible);", "@Override\r\n\tpublic boolean isVisible() {\n\t\treturn false;\r\n\t}", "boolean hasTutorial();", "public void setVisible(boolean visible);", "public boolean isTargetVisible() {\n return getDouble(\"tv\") == 1;\n }", "public void setVisible(boolean b) {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "public boolean isTutorialMode() {\n\t\treturn (this.tutorial != null);\n\t}", "public void setVisible()\n\t{\n\t\tMainController.getInstance().setVisible(name, true);\n\t}", "@Override\n public boolean isVisible()\n {\n return true;\n }", "@Override\n\tpublic void editTutorial() {\n\t\t\n\t}", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "public void show() {\n hidden = false;\n }", "public void setVisible(boolean val);", "void setCanSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles);", "public void show() {\n visible=true;\n }", "public boolean isVisible() {\n return true;\n }", "@Override\n public void setVisible (boolean f)\n { \n }", "boolean isVisible();", "boolean isVisible();", "public boolean isVisible(){ return visible; }", "private void videoVisible() {\n }", "public void setVisible(boolean v) {\n }", "public void setTutorialFish() {\n\t\txSpeed = 0;\n\t\tySpeed = 0;\n\t\txloc = frameWidth / 2;\n\t\tyloc = frameHeight / 2;\n\t\tisTutorial = true;\n\t}", "boolean isCanSeeFriendlyInvisibles();", "public boolean getIsVisible();", "public abstract void setVisible(boolean visible);", "public void hide() {\n hidden = true;\n }", "public boolean isVisible();", "public boolean isVisible();", "public boolean isVisible();", "public void setDisplayed(boolean show);", "public void hide() {\n visible=false;\n }", "public boolean isVisible() {\n return true;\n }", "private void hideAdvanceFeatures() {\n sourceLabel.setVisible(false);\n sourceTextField.setVisible(false);\n threadsTextField.setEnabled(false);\n adminLabel.setVisible(false);\n adminTextField.setVisible(false);\n tracerPanel.setVisible(false);\n simulateCheckBox.setVisible(false);\n useScriptCheckBox.setVisible(false);\n editScriptButton.setVisible(false);\n batchImportCheckBox.setVisible(false);\n numResourceToCopyLabel.setVisible(false);\n numResourceToCopyTextField.setVisible(false);\n recordURIComboBox.setVisible(false);\n paramsLabel.setVisible(false);\n paramsTextField.setVisible(false);\n viewRecordButton.setVisible(false);\n testRecordButton.setVisible(false);\n basicUIButton.setVisible(false);\n\n isBasicUI = true;\n }", "public void show() {\n\t\thidden = false;\n\t}", "public void setIsVisible(java.lang.Boolean isVisible);", "@VisibleForTesting\n public void setAssistantVisible(boolean z) {\n updateBiometricListeningState();\n }", "public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean isVisible() { return _visible; }", "public void showInstructionsPanel()\n {\n setWidgetAsExample(introPanel);\n }", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "public void resetIsVisible();", "public void setVisible(boolean visible)\n\t{\n\t\tshaderMaterial.setUniform(\"AMBIENT\", \"isVisible\", new UniformBool(\n\t\t\t\tvisible));\n\t}", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}", "public boolean hasTutorial() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "void setVisibleGlassPanel(Visibility visible);", "public boolean isVisible()\n {\n return visible;\n }", "public void setTurtleVisibility(boolean visibility){\n isTurtleVisible = visibility;\n }", "private void tutorialCheck() {\n SharedPreferences sp = getApplicationContext().getSharedPreferences(getApplicationContext().getString(R.string.app_name), MODE_PRIVATE);\n if (sp.contains(\"Tutorial_Complete\")) {\n if (sp.getBoolean(\"Tutorial_Complete\", false)) {\n return;\n }\n }\n Intent intent = new Intent(this, TutorialPanel.class);\n startActivity(intent);\n }", "void init() {\n setVisible(true);\n\n }", "public void setVisible(boolean value)\n\t{\n\t\tisVisible = value;\n\t\tif(!isVisible)\n\t\t{\n\t\t\tsetWorldRegion(null);\n\t\t}\n\t}", "public boolean shown();", "public void setTrailVisible(boolean visible) {\n }", "public Boolean isVisible();", "public Boolean isVisible();", "public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }", "public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}", "public boolean isHidden();", "public boolean isVisible() {\n\t\treturn true;\n\t}", "public void makeInvisible() {\n\t\t\n\t\theadShape.setVisible(false);\n\t\tspine.setVisible(false);\n\t\tleftArmLine.setVisible(false);\n\t\trightArmLine.setVisible(false);\n\t\tleftLegLine.setVisible(false);\n\t\trightLegLine.setVisible(false);\n\t\tplayAgain.setVisible(false);\n\t\trevealLabel.setVisible(false);\n\t\t\n\t\t\n\t}", "public abstract boolean isVisible();", "public abstract boolean isVisible();", "public void onVisible() {\r\n System.out.println(\"toolkit.AbstractDemo.onVisible()\");\r\n }", "public void hide() {\n\t\thidden = true;\n\t}", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }", "public void entryAdded (TudeySceneModel.Entry entry)\n {\n setVisibility(entry);\n }", "public void youHaveBeenExcommunicated(){\n youHaveBeenExcommunicatedPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> youHaveBeenExcommunicatedPane.setVisible(false) );\n delay.play();\n }", "public void setVisible( boolean v) {\r\n visible = v;\r\n }", "public java.lang.Boolean getIsVisible();", "public void hideIt(){\n this.setVisible(false);\n }", "public void showActivity() {\n setContentView(R.layout.activity_study);\n\n TextView info = (TextView) findViewById(R.id.trial_status);\n info.setText(getResources().getString(R.string.trial_status, Study.getCurrentTrialIndex(), Study.numTrials * 2));\n\n // hide demo button\n if (demosAvailable <= 0) {\n Button demo = (Button) findViewById(R.id.start_demo);\n demo.setVisibility(View.INVISIBLE);\n }\n }", "public void setVisible(boolean visible)\n {\n this.visible = visible;\n }", "public void setButtonVisibility() {\n if (MankomaniaGame.getMankomaniaGame().getLocalClientPlayer().getPlayerIndex() == MankomaniaGame.getMankomaniaGame().getGameData().getCurrentPlayerTurnIndex()) {\n cheatButton.setText(\"Cheat\");\n playerAtTurn.setVisible(true);\n playerNotAtTurn.setVisible(false);\n } else {\n cheatButton.setText(\"Assume Cheating\");\n playerAtTurn.setVisible(false);\n playerNotAtTurn.setVisible(true);\n }\n }", "@Override\r\n\tpublic boolean isVisible()\r\n\t{\n\t\treturn !getFormScreen().getMode().equals(Mode.LIST_VIEW);\r\n\t}", "public void setVisible(boolean b) {\n // Not supported for MenuComponents\n }", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "public void showInstructionsPanel() {\n\t\tsetWidgetAsExample(introPanel);\n\t}", "private void showNothing(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(false);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }", "private void showPlayerOptions() {\n playStartLinearLayout.setVisibility(View.INVISIBLE);\n timeInfoLinearLayout.setVisibility(View.INVISIBLE);\n gsOpenPlayImage.setVisibility(View.VISIBLE);\n\n\n }", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "public void partVisible(IWorkbenchPartReference partRef) {\n\t\t\t\t\n\t\t\t}", "public static void toggleVisibility ()\n\t{\n\t\tboolean isVisible = m_console.isVisible ();\n\t\tm_console.setVisible (!isVisible);\n\t}", "void hide();", "public boolean isMakeVisible()\r\n {\r\n return myMakeVisible;\r\n }", "private static void makeVisible( Component component, boolean visible ) {\n component.add( new AttributeModifier( \"style\", true, new Model<String>(\n visible ? \"\" : \"display:none\" ) ) );\n }", "private void hide() {\n\t}" ]
[ "0.67685497", "0.64766", "0.64659804", "0.63751376", "0.63751376", "0.63582265", "0.63448584", "0.633586", "0.6316332", "0.6315626", "0.6253637", "0.6249143", "0.62435216", "0.62417626", "0.6241612", "0.62415093", "0.6239908", "0.6238205", "0.6238019", "0.62127686", "0.61668783", "0.6156647", "0.61525995", "0.61352855", "0.6103626", "0.6098425", "0.60846317", "0.60846317", "0.6078004", "0.60663813", "0.6041872", "0.6026898", "0.59959036", "0.5994019", "0.5993124", "0.5990742", "0.59889776", "0.59889776", "0.59889776", "0.59867543", "0.59788036", "0.5973273", "0.5950575", "0.5950208", "0.5944393", "0.5940904", "0.5939194", "0.5935268", "0.59308344", "0.59261507", "0.59235215", "0.5903962", "0.58987874", "0.5897855", "0.5896617", "0.589445", "0.58818984", "0.58690727", "0.5867741", "0.5861251", "0.5856363", "0.5854435", "0.5851881", "0.58439577", "0.58439577", "0.58201045", "0.58172196", "0.58041173", "0.5803068", "0.57993996", "0.57956386", "0.57956386", "0.57847434", "0.57835996", "0.57798356", "0.57635725", "0.57437456", "0.57371205", "0.5734349", "0.5715816", "0.57156664", "0.56986064", "0.569671", "0.5696273", "0.569393", "0.56899226", "0.5681253", "0.56801695", "0.5672159", "0.5655994", "0.56545335", "0.5653729", "0.56530374", "0.56443924", "0.56346977", "0.5626191", "0.5625048", "0.5622798", "0.56202626", "0.5614983" ]
0.7611565
0
Sets up the map if necessary and possible
@Override /***** Sets up the map if it is possible to do so *****/ public boolean setUpMapIfNeeded() { super.setUpMapIfNeeded(); if (mMap != null) { //Shows history popover on marker clicks mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { showPopup(getContentFromMarker(marker), marker.getTitle()); return true; } }); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "@Before\n public void initialize()\n {\n map = new MapAdapter();\n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }", "private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void setUpMap() {\n Log.i(TAG, \"in setUpMap()\");\n // Set listeners for marker events. See the bottom of this class for their behavior.\n mMap.setOnMarkerClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n //just for testing\n// int uniqueId = generateMarkerId();\n// Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title(\"Marker\"));\n// markers.put(marker, uniqueId);\n //////\n // create UiSetting instance and default ui settings of the map\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(this.compassEnabled);\n mUiSettings.setRotateGesturesEnabled(this.rotateEnabled);\n mUiSettings.setScrollGesturesEnabled(this.scrollEnabled);\n mUiSettings.setZoomControlsEnabled(this.zoomControlEnabled);\n mUiSettings.setZoomGesturesEnabled(this.zoomGesturesEnabled);\n\n // after this method is called, user can add markers and change other settings.\n //TODO: Actions(Functions) that are called within MapIsReady() are not working\n MapIsReady();\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "protected void initBoatMap() {}", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "protected WumpusMap() {\n\t\t\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if ( googleMap == null) {\r\n\r\n // Try to obtain the map from the SupportMapFragment.\r\n googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.routesMap)).getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (googleMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(map!=null)\n\t\t{\n\t\t\tsetup();\n\t\t}\n\t}", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void initilizeMap() {\n\t\tif (googleMap == null) {\n\t\t\tgoogleMap = ((MapFragment) getFragmentManager().findFragmentById(\n\t\t\t\t\tR.id.map)).getMap();\n\n\t\t\tif (googleMap == null) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}", "private static void setUpMap() {\n onMapReady();\n /*mMap.setMyLocationEnabled(true);\n // For dropping a marker at a point on the Map\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));*/\n }", "public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }", "private void setUp() {\n\t\tString allLetter = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. 0123456789\";\n\t\tallChar = allLetter.toCharArray();\n\t\tshuffledChar = shuffle(allLetter.toCharArray());\n\t\tmap = new HashMap<Character, Character>();\n\t\tmapSetUp();\n\t}", "private void initializeMaps(){\n\t\t\n\t\tsteps = new HashMap<Integer, Set<PlanGraphStep>>();\n\t\tfacts = new HashMap<Integer, Set<PlanGraphLiteral>>();\n\t\tinconsistencies = new HashMap<Integer, Set<LPGInconsistency>>();\n\t\t\n\t\tfor(int i = 0; i <= maxLevel; i++) {\n\t\t\tsteps.put(i, new HashSet<PlanGraphStep>());\n\t\t\tfacts.put(i, new HashSet<PlanGraphLiteral>());\n\t\t\tinconsistencies.put(i, new HashSet<LPGInconsistency>());\n\t\t}\n\t\t\n\t\t/* This level holds only the special action end which has the goals as preconditions */\n\t\tsteps.put(maxLevel + 1, new HashSet<PlanGraphStep>());\n\t}", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "public void initMap(String path) {\n \tgameState = StateParser.makeGame(path);\n\t\tintel = gameState.getCtrlIntel();\t\n\t\tsnakes = gameState.getSnake();\n\t\tmap = gameState.getMap();\n }", "private void setUpMap() {\n //Starts map somewhat zoomed in over user location.\n float zoom = 12;\n LatLng target = new LatLng(lat, lng);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(target, zoom));\n\n // Adds the marker ( using coordinates from MainActivty).\n marker = mMap.addMarker(new MarkerOptions()\n .position(target)\n .title(\"Incident\"));\n marker.setDraggable(true);\n }", "private void ini_MapPaks()\r\n\t{\r\n\r\n\t}", "@Before\n public void setUp() throws Exception {\n labRat = (LinkedMap) makeEmptyMap();\n }", "private void setUpMap() {\n if (mGoogleMap != null && mParkingField != null) {\n LatLng latLng = new LatLng(mParkingField.getLatitude(), mParkingField.getLongitude());\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));\n mGoogleMap.addMarker(mMapFactory.createParkingFieldMakerOptions(mParkingField, getContext()));\n }\n }", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "private void setup()\n\t{\n\t\tif(values == null)\n\t\t\tvalues = new HashMap<>();\n\t\telse\n\t\t\tvalues.clear();\n\t}", "private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "private void initialize() {\n\t\tplayerMap = new HashMap<>();\n\t\ttypeMap = new HashMap<>();\n\t\tfor (ProductType type : ProductType.values()) {\n\t\t\tMap<ProductState, Map<Integer, Set<Product>>> stateMap = new HashMap<>();\n\t\t\tfor (ProductState state : ProductState.values()) {\n\t\t\t\tMap<Integer, Set<Product>> map = new HashMap<>();\n\t\t\t\tstateMap.put(state, map);\n\t\t\t}\n\t\t\ttypeMap.put(type, stateMap);\n\t\t}\n\t}", "private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }", "public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }", "private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}", "public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }", "private void initMapEngine() {\n String path = new File(m_activity.getExternalFilesDir(null), \".here-map-data\")\n .getAbsolutePath();\n // This method will throw IllegalArgumentException if provided path is not writable\n com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(path);\n\n MapEngine.getInstance().init(new ApplicationContext(m_activity), new OnEngineInitListener() {\n @Override\n public void onEngineInitializationCompleted(Error error) {\n if (error == Error.NONE) {\n /*\n * Similar to other HERE Android SDK objects, the MapLoader can only be\n * instantiated after the MapEngine has been initialized successfully.\n */\n getMapPackages();\n } else {\n Log.e(TAG, \"Failed to initialize MapEngine: \" + error);\n new AlertDialog.Builder(m_activity).setMessage(\n \"Error : \" + error.name() + \"\\n\\n\" + error.getDetails())\n .setTitle(R.string.engine_init_error)\n .setNegativeButton(android.R.string.cancel,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(\n DialogInterface dialog,\n int which) {\n m_activity.finish();\n }\n }).create().show();\n }\n }\n });\n }", "@Before\n public void setUp() {\n searchMap = SearchMap.getInstance();\n }", "@Override\n\tprotected void initializeUIMap()\n\t{\n\t\tlibManhattanCommonFunctions = new ManhattanCommonFunctions(scriptHelper);\n\t\tif (getCurrentPage(\"PackWavePage\"))\n\t\t\treport.updateTestLog(\"Pack Waves Page verification\", \"Pack Waves loaded as expected.\", Status.DONE);\n\t\telse\n\t\t\treport.updateTestLog(\"Pack Waves Page verification\", \"Pack Waves page loaded not loaded!!!!\", Status.FAIL);\n\t}", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "public abstract void createMap();", "private void setup() {\n\t\t map.setMyLocationEnabled(true);\n\t \n\t CameraPosition cameraPosition = new CameraPosition.Builder()\n\t .target(USMP_LOCATION) // Sets the center of the map to\n\t // Golden Gate Bridge\n\t .zoom(16) // Sets the zoom\n\t .bearing(90) // Sets the orientation of the camera to east\n\t .tilt(60) // Sets the tilt of the camera to 30 degrees\n\t .build(); // Creates a CameraPosition from the builder\n\t \n\t CameraUpdate cameraUpdate=CameraUpdateFactory.newCameraPosition(\n\t \t cameraPosition);\n\t\t map.animateCamera(cameraUpdate);\n\t\t \n\t map.addMarker(new MarkerOptions()\n\t .position(USMP_LOCATION)\n\t .title(\"DevFest 2013 Season 2\"));\n\t}", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "@Override\n\tprotected void initializeUIMap()\n\t{\n\t\tlibManhattanCommonFunctions = new ManhattanCommonFunctions(scriptHelper);\n\t\tif (getCurrentPage(\"WavesPage\"))\n\t\t\treport.updateTestLog(\"Waves Page verification\", \"Waves loaded as expected.\", Status.DONE);\n\t\telse\n\t\t\treport.updateTestLog(\"Waves Page verification\", \"Waves page loaded not loaded!!!!\", Status.FAIL);\n\t}", "private void placesInit()\n {\n\n for(Map.Entry<String,Place> placeEntry: placesMap.entrySet())\n {\n addPlace(placeEntry.getKey(),placeEntry.getValue());\n }\n\n }", "private static synchronized void initializeMeasureMaps() {\n\t\tintensityMeasuresList=ExerciseIntensityMeasure.getAll();\n\t\tquantityMeasuresList=ExerciseQuantityMeasure.getAll();\n\t\tintensityCodesToNamesMap=new HashMap(intensityMeasuresList.size());\n\t\tquantityCodesToNamesMap=new HashMap(quantityMeasuresList.size());\n\n\t\t// these (and the lists above) come from the db, but they can be static \n\t\t// because they change so infrequently (haven't changed in five years and\n\t\t// counting), and only manually via the db.\n\t\tfor (int i=0; i<intensityMeasuresList.size(); i++) {\n\t\t\tfinal ExerciseIntensityMeasure m=(ExerciseIntensityMeasure)intensityMeasuresList.get(i);\n\t\t\tintensityCodesToNamesMap.put(m.getCode(),m.getName());\n\t\t}\n\t\tfor (int i=0; i<quantityMeasuresList.size(); i++) {\n\t\t\tfinal ExerciseQuantityMeasure m=(ExerciseQuantityMeasure)quantityMeasuresList.get(i);\n\t\t\tquantityCodesToNamesMap.put(m.getCode(),m.getName());\n\t\t}\n\t\tmeasureMapsInitialized=true;\n\t\t\n\t}", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "private void initializePermissionsMap() {\n }", "public void initializeMaps() {\n\t\t//can use any map\n\n\t\t//left map\n\t int x = 0, y = 0;\n\t int Lvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyLeft.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tLvalue = Integer.parseInt(str);\n\t \t\t\tleftMap[x][y] = Lvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //right map\n\t x = 0;\n\t y = 0;\n\t int Rvalue;\n\t \n\t try {\n\t \t//***change to your local path for the map you want to test\n\t \t//change to map you want to test\n\t \tBufferedReader input = new BufferedReader(new FileReader(\"/Users/NeeCee/Classes/4444/MirrorUniverse/maps/g6maps/lessEasyRight.txt\"));\n\t \tString line;\n\t \twhile((line = input.readLine()) != null) {\n\t \t\tString[] vals = line.split(\" \");\n\t \t\tfor(String str : vals) {\n\t \t\t\tRvalue = Integer.parseInt(str);\n\t \t\t\trightMap[x][y] = Rvalue;\n\t \t\t\t++y;\n\t \t\t}\n\t \t\t++x;\n\t \t\ty = 0;\n\t \t}\n\t \t\n\t \tinput.close();\n\t } catch (IOException ioex) {\n\t \tSystem.out.println(\"error reading in map for testing\");\n\t }\n\t \n\t //print each map for testing\n\t for(int i = 0; i < leftMap.length; i++ )\n\t \tfor(int j = 0; j < leftMap[i].length; j++ )\n\t \t\tSystem.out.println(leftMap[i][j]);\n\t System.out.println(\"*-----------------*\");\n\t for(int i = 0; i < rightMap.length; i++ )\n\t \tfor(int j = 0; j < rightMap[i].length; j++ )\n\t \t\tSystem.out.println(rightMap[i][j]);\n\t}", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "public MapManager() {\n myList = null;\n scrabbleList = null;\n }", "public void setInstanceOfMapForTesting(){\n instanceOfMap = null;\n }", "public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}", "public Map() {\n\t\t//intially empty\n\t}", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "private void initilizeMap() {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }", "private void initMap() {\n Log.wtf(TAG, \"initMap() has been instantiated\");\n\n Log.d(TAG, \"initMap: initializing the map...\");\n try {\n MapsInitializer.initialize(getActivity().getApplicationContext());\n } catch (Exception e) {\n e.printStackTrace();\n }\n mMapView.getMapAsync(this);\n }", "@Override\r\n protected void setUpMap() {\n mMap.addMarker(new MarkerOptions()\r\n .position(BRISBANE)\r\n .title(\"Brisbane\")\r\n .snippet(\"Population: 2,074,200\")\r\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\r\n\r\n // Uses a custom icon with the info window popping out of the center of the icon.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SYDNEY)\r\n .title(\"Sydney\")\r\n .snippet(\"Population: 4,627,300\")\r\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))\r\n .infoWindowAnchor(0.5f, 0.5f));\r\n\r\n // Creates a draggable marker. Long press to drag.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(MELBOURNE)\r\n .title(\"Melbourne\")\r\n .snippet(\"Population: 4,137,400\")\r\n .draggable(true));\r\n\r\n // A few more markers for good measure.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(PERTH)\r\n .title(\"Perth\")\r\n .snippet(\"Population: 1,738,800\"));\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ADELAIDE)\r\n .title(\"Adelaide\")\r\n .snippet(\"Population: 1,213,000\"));\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(BRISBANE, 10));\r\n }", "public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "private void initLayoutReferences() {\n // Initializing views\n initViews();\n // Initializing mapView element\n initMap();\n }", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "@Before\n public void setUp() {\n IGameFactory factory = new DefaultGameFactory();\n parser = new MapParser(factory);\n }", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "void setHashMap();", "public void init() throws IllegalArgumentException {\r\n\t\tthis.listItemMapper = ListItemMapper.listitemMapper();\r\n\t\tthis.itemMapper = ItemMapper.itemMapper();\r\n\t\tthis.personMapper = PersonMapper.personMapper();\r\n\t\tthis.shoppingListMapper = ShoppingListMapper.shoppinglistMapper();\r\n\t\tthis.storeMapper = StoreMapper.storeMapper();\r\n\t\tthis.groupMapper = GroupMapper.groupMapper();\r\n\t\tthis.responsibilityMapper = ResponsibilityMapper.responsibilityMapper();\r\n\t\tthis.favoriteItemMapper = FavoriteItemMapper.favoriteItemMapper();\r\n\r\n\t}", "private void setupGoogleMap()\n {\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(45.5436018, 10.1886594), 10);\n googleMap.animateCamera(cameraUpdate);\n }", "public void init(HardwareMap ahwMap){\n init(ahwMap, true);\n }", "private void ensureInitialized() {\n if (mIncludes == null) {\n // Initialize\n if (!readSettings()) {\n // Couldn't read settings: probably the first time this code is running\n // so there is no known data about includes.\n\n // Yes, these should be multimaps! If we start using Guava replace\n // these with multimaps.\n mIncludes = new HashMap<String, List<String>>();\n mIncludedBy = new HashMap<String, List<String>>();\n\n scanProject();\n saveSettings();\n }\n }\n }", "public void initializeDictionary() {\n\t\tmyDictionary = new SLogoDictionary();\n\t}" ]
[ "0.80326766", "0.79645276", "0.7747342", "0.7603531", "0.7602365", "0.7577948", "0.754285", "0.7537578", "0.7503267", "0.7495252", "0.74233246", "0.7408984", "0.7400406", "0.7382166", "0.7359721", "0.73532736", "0.73339814", "0.731387", "0.7308024", "0.7300076", "0.72977406", "0.72977406", "0.72977406", "0.7242309", "0.72241217", "0.72195935", "0.721377", "0.7209516", "0.71950656", "0.7190986", "0.7189813", "0.71889526", "0.71875525", "0.7187457", "0.71836764", "0.7152292", "0.7123236", "0.7071909", "0.7043661", "0.6970925", "0.696986", "0.69459426", "0.69409984", "0.6938293", "0.6936243", "0.6877989", "0.6863064", "0.686241", "0.6843914", "0.683791", "0.68311316", "0.68218964", "0.67949617", "0.6786639", "0.67825335", "0.678012", "0.67783177", "0.67770517", "0.6775488", "0.6757699", "0.6753273", "0.6742818", "0.6706739", "0.6701665", "0.66986936", "0.66898125", "0.6665371", "0.6663554", "0.6626821", "0.6613375", "0.65995455", "0.6584749", "0.6584728", "0.65648603", "0.65532756", "0.65363586", "0.6533919", "0.652438", "0.6509601", "0.6503511", "0.6499861", "0.64973724", "0.64927953", "0.6488033", "0.6468994", "0.64622664", "0.64528465", "0.64470744", "0.64421713", "0.64404273", "0.6436688", "0.64286345", "0.6419019", "0.6418104", "0.6417606", "0.6402078", "0.64016217", "0.6395614", "0.63817674", "0.6378844", "0.6376869" ]
0.0
-1
Sets up the map (should only be called if mMap is null) Monitors the zoom and target of the camera and changes them if the user zooms out too much or scrolls map too far off campus.
@Override protected void setUpMap() { super.setUpMap(); // For showing a move to my location button and a blue // dot to show user's location MainActivity mainActivity = (MainActivity) getActivity(); mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "private void setUpMap() {\n Log.i(TAG, \"in setUpMap()\");\n // Set listeners for marker events. See the bottom of this class for their behavior.\n mMap.setOnMarkerClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n //just for testing\n// int uniqueId = generateMarkerId();\n// Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title(\"Marker\"));\n// markers.put(marker, uniqueId);\n //////\n // create UiSetting instance and default ui settings of the map\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(this.compassEnabled);\n mUiSettings.setRotateGesturesEnabled(this.rotateEnabled);\n mUiSettings.setScrollGesturesEnabled(this.scrollEnabled);\n mUiSettings.setZoomControlsEnabled(this.zoomControlEnabled);\n mUiSettings.setZoomGesturesEnabled(this.zoomGesturesEnabled);\n\n // after this method is called, user can add markers and change other settings.\n //TODO: Actions(Functions) that are called within MapIsReady() are not working\n MapIsReady();\n\n }", "private void setupGoogleMap()\n {\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(45.5436018, 10.1886594), 10);\n googleMap.animateCamera(cameraUpdate);\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "private void setUpMap() {\n //Starts map somewhat zoomed in over user location.\n float zoom = 12;\n LatLng target = new LatLng(lat, lng);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(target, zoom));\n\n // Adds the marker ( using coordinates from MainActivty).\n marker = mMap.addMarker(new MarkerOptions()\n .position(target)\n .title(\"Incident\"));\n marker.setDraggable(true);\n }", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "private void setUpMap() {\n if (mGoogleMap != null && mParkingField != null) {\n LatLng latLng = new LatLng(mParkingField.getLatitude(), mParkingField.getLongitude());\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16));\n mGoogleMap.addMarker(mMapFactory.createParkingFieldMakerOptions(mParkingField, getContext()));\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "private static void setUpMap() {\n onMapReady();\n /*mMap.setMyLocationEnabled(true);\n // For dropping a marker at a point on the Map\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));*/\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapLoaded() {\n mMap.animateCamera(cu);\n\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.v(TAG, \"onMapReady\");\n mMap = googleMap;\n\n //Sets zoom and compass controls\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n googleMap.getUiSettings().setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMaxZoomPreference(50);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n subscribeToUpdates();\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n myMap = googleMap;\n setMap();\n try{\n myMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lastKnown.getLatitude(), lastKnown.getLongitude()), 18.0f));\n }catch (NullPointerException e){\n\n }\n }", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMaxZoomPreference(16);\n loginToFirebase();\n }", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "private void initializeMap() {\n if (googleMap == null) {\n googleMap = ((MapFragment) getFragmentManager().findFragmentById(\n R.id.map)).getMap();\n\n // check if map is created successfully or not\n if (googleMap == null) {\n Toast.makeText(getApplicationContext(),\n \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n .show();\n }\n\n // Set Enable of My Location\n //googleMap.setMyLocationEnabled(true);\n\n // Setting a ChangeListener of my location for the Google Map\n //googleMap.setOnMyLocationChangeListener(mMLCListener);\n\n // Setting a ClickListener for the Google Map\n googleMap.setOnMapClickListener(mMCListener);\n\n // Set Enable of Zoom\n googleMap.getUiSettings().setZoomGesturesEnabled(true);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}", "@Override\n public void onMapLoaded() {\n mGoogleMap.animateCamera(cu);\n }", "private void setUpMapIfNeeded() {\n if ( googleMap == null) {\r\n\r\n // Try to obtain the map from the SupportMapFragment.\r\n googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.routesMap)).getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (googleMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getMarkers();\n\n // Add a marker in Sydney and move the camera\n LatLng penn = new LatLng(39.952290, -75.197060);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(penn, 15));\n mMap.setMyLocationEnabled(true);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng israelLatLng = new LatLng(31.2175427,34.6095679);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(israelLatLng));\n init();\n }", "public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(1));\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n\r\n /// This allows the user to zoom in and out of the map\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n mMap.getUiSettings().isMyLocationButtonEnabled();\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n\r\n }", "private void setup() {\n\t\t map.setMyLocationEnabled(true);\n\t \n\t CameraPosition cameraPosition = new CameraPosition.Builder()\n\t .target(USMP_LOCATION) // Sets the center of the map to\n\t // Golden Gate Bridge\n\t .zoom(16) // Sets the zoom\n\t .bearing(90) // Sets the orientation of the camera to east\n\t .tilt(60) // Sets the tilt of the camera to 30 degrees\n\t .build(); // Creates a CameraPosition from the builder\n\t \n\t CameraUpdate cameraUpdate=CameraUpdateFactory.newCameraPosition(\n\t \t cameraPosition);\n\t\t map.animateCamera(cameraUpdate);\n\t\t \n\t map.addMarker(new MarkerOptions()\n\t .position(USMP_LOCATION)\n\t .title(\"DevFest 2013 Season 2\"));\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "private void setCameraView() {\n double bottomBoundary = mUserPosition.getLatitude() - .1;\n double leftBoundary = mUserPosition.getLongitude() - .1;\n double topBoundary = mUserPosition.getLatitude() + .1;\n double rightBoundary = mUserPosition.getLongitude() + .1;\n\n mMapBoundary = new LatLngBounds(\n new LatLng(bottomBoundary, leftBoundary),\n new LatLng(topBoundary, rightBoundary)\n );\n\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(mMapBoundary, 500,500,1));\n }", "@Override\n public void onCameraChange(CameraPosition arg0) {\n center = map.getCameraPosition().target;\n Log.v(\"Center\", \"lattitude=\" + center.latitude + \" &longitude=\" + center.longitude);\n map.clear();\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }", "public static void onMapReady() {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n if(checkmarker.isChecked()){\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMapClickListener((GoogleMap.OnMapClickListener)this);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n\n }", "@Override\n public void onMapReady(GoogleMap mMap) {\n mMap.setOnMarkerClickListener(this);\n mapready = true;\n googleMap = mMap;\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n draw();\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "private void initilizeMap() {\n\t\tif (googleMap == null) {\n\t\t\tgoogleMap = ((MapFragment) getFragmentManager().findFragmentById(\n\t\t\t\t\tR.id.map)).getMap();\n\n\t\t\tif (googleMap == null) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}", "@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }", "public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMinZoomPreference(14);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mGeocoder = new Geocoder(this, Locale.getDefault());\n\n updateScreenLoc(movement[0]);\n\n loadCrimes(movement[0]);\n //Start MockLocationManager and inject first point\n turnOnLocationManager();\n updateLocation(movement[0]);\n updateRadiusCircle();\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n\n\n // Add a marker in Sydney and move the camera\n sydney = new LatLng(8.552161651991246, 79.94052328405958);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n\n\n //mMap.setMinZoomPreference(11);\n\n\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "@SuppressLint(\"MissingPermission\")\n @Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"MAP_FRAG\", \"MapCallback\");\n\n mMap = googleMap;\n\n Log.d(\"MAP\", mMap.toString());\n\n mMap.setPadding(0, 0, 0, 300);\n\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(Common.latitude, Common.longitude))\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_mark_red)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Common.latitude, Common.longitude), 15.0f));\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(false);\n mUiSettings.setMapToolbarEnabled(false);\n mUiSettings.setZoomControlsEnabled(false);\n mUiSettings.setScrollGesturesEnabled(false);\n mUiSettings.setTiltGesturesEnabled(false);\n mUiSettings.setRotateGesturesEnabled(false);\n\n // Add a marker in Sydney and move the camera\n final LatLng airport = new LatLng(listAirport.get(index).getLatitude(), listAirport.get(index).getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(airport));\n mMap.setMinZoomPreference(10.0f);\n mMap.setMaxZoomPreference(10.0f);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n onClick(index, MapsActivity.class);\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in DVC and move the camera\n\n LatLng DVC = new LatLng(37.9688, -122.0710); //Changed the latitude and longitude to CA, DVC (previously\n mMap.addMarker(new MarkerOptions().position(DVC).title(\"Marker in DVC, Pleasant Hill\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(DVC));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(17)); //Added this line to focus on DVC map only instead of the world map\n\n\n // mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 500));\n\n\n // public static CameraUpdate newLatLngBounds ( bounds, 500, 500, 2000);\n\n // mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, getResources().getDimensionPixelSize(R.dimen.mMap_camera_padding_new_bounds)));\n\n//37.976243, -122.073407\n//37.965902, -122.071549\n\n LatLng NorthEastBound = new LatLng(37.971363, -122.066986);\n LatLng SouthWestBound = new LatLng(37.966364, -122.074532);\n\n\n LatLngBounds DVCBounds = new LatLngBounds( SouthWestBound, NorthEastBound); //Setting up boundaries\n\n\n\n mMap.setLatLngBoundsForCameraTarget(DVCBounds);\n\n\n\n // https://gis.stackexchange.com/questions/49805/can-i-view-a-google-maps-map-by-bounding-latitude-and-longitude-coordinates\n// LatLngBounds DVCBounds = new LatLngBounds( new LatLng(37.965902, 122.071549 ), new LatLng(37.976243, -122.073407)); //Setting up boundaries\n\n\n // mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(DVCBounds.getCenter(), 50));\n // and works with this mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(DVCBounds, 50, 50, 2));\n\n\n /**\n * https://stackoverflow.com/questions/40866431/how-to-use-latlngbounds?rq=1\n * LatLng pickupLatLng = new LatLng(37.976186,122.072527);\n * LatLng destinationLatLng = new LatLng(37.965831,122.071647);\n * LatLngBounds bounds = LatLngBounds.builder().include(pickupLatLng).include(destinationLatLng).build();\n *\n * mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 500));\n */\n }", "private boolean setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n\n if (mMap == null) {\n Log.e(TAG, \"Can not find map\");\n return false;\n }\n\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n\n if (bCurrentPos!= null)\n bCurrentPos.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n goCurrentLocation(mMap);\n }\n });\n\n return true;\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(43.777365,-79.3406);\n LatLng loc22=new LatLng(43.775748,-79.336674);\n LatLng loc3=new LatLng(43.769240,-79.360010);\n LatLng loc4=new LatLng(43.769290,-79.400101);\n LatLng loc5=new LatLng(43.769552,-79.601201);\n mMap.addMarker(new MarkerOptions().position(sydney).title(values[0]));\n mMap.addMarker(new MarkerOptions().position(loc22).title(values[1]));\n mMap.addMarker(new MarkerOptions().position(loc3).title(values[2]));\n mMap.addMarker(new MarkerOptions().position(loc4).title(values[3]));\n mMap.addMarker(new MarkerOptions().position(loc5).title(values[4]));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n thisMap = googleMap;\n thisMap.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener() {\n private float currentZoom = -1;\n @Override\n public void onCameraChange(CameraPosition camera) {\n if (camera.zoom != currentZoom){\n currentZoom = camera.zoom;\n retrieveListings(googleMap);\n }\n }\n });\n\n // Add gestures\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n googleMap.getUiSettings().setScrollGesturesEnabled(true);\n googleMap.getUiSettings().setRotateGesturesEnabled(true);\n\n // Make markers clickable\n googleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n // Triggered when user click any marker on the map\n Listing listing = (Listing) marker.getTag();\n goToDetailedListingScreen(listing);\n return false;\n }\n });\n\n // Retrieve user's current location and set it on the map\n LatLng currentLocation = LocationUtils.getCoordinates(getContext(), getActivity());\n googleMap.addMarker(new MarkerOptions().position(currentLocation).title(\"Your current location\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));\n\n // Retrieve surrounding listings\n retrieveListings(googleMap);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n this.googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n this.googleMap.setIndoorEnabled(false);\n this.googleMap.setBuildingsEnabled(true);\n\n // Set boundary for Karlsruhe\n LatLngBounds karlsruhe = new LatLngBounds(\n new LatLng(48.996694, 8.378687), new LatLng(49.024639, 8.423896));\n\n // Add a marker in Karlsruhe and move the camera\n LatLng euro = new LatLng(49.009927, 8.395140);\n LatLng shotz = new LatLng(49.008477, 8.396108);\n LatLng badbrau = new LatLng(49.011877, 8.394246);\n LatLng pinte = new LatLng(49.007908, 8.389647);\n LatLng strawberry = new LatLng(49.004179, 8.409696);\n LatLng flynn = new LatLng(49.004767, 8.390939);\n LatLng scruffy = new LatLng(49.011642, 8.395445);\n LatLng aposto = new LatLng(49.008791, 8.396359);\n LatLng koffer = new LatLng(49.008314, 8.391809);\n this.googleMap.addMarker(new MarkerOptions().position(shotz).title(\"Shotz\"));\n this.googleMap.addMarker(new MarkerOptions().position(badbrau).title(\"Badisches Brauhaus\"));\n this.googleMap.addMarker(new MarkerOptions().position(aposto).title(\"Aposto\"));\n this.googleMap.addMarker(new MarkerOptions().position(koffer).title(\"Der Kofferraum\"));\n this.googleMap.addMarker(new MarkerOptions().position(pinte).title(\"Die Pinte\"));\n this.googleMap.addMarker(new MarkerOptions().position(strawberry).title(\"Erdbeermund\"));\n this.googleMap.addMarker(new MarkerOptions().position(flynn).title(\"Flynn's Inn\"));\n this.googleMap.addMarker(new MarkerOptions().position(scruffy).title(\"Scruffy's\"));\n //googleMap.setLatLngBoundsForCameraTarget(karlsruhe);\n this.googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(euro, 17));\n this.googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder(this.googleMap.getCameraPosition()).tilt(50).build()));\n\n\n /*\n if (ActivityCompat.checkSelfPermission(ctx, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // Activity#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for Activity#requestPermissions for more details.\n this.googleMap.setMyLocationEnabled(true);\n }\n */\n this.googleMap.setMyLocationEnabled(true);\n\n }", "public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng CSN = new LatLng(51.87, -8.481);\n mMap.setMapType(MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(CSN).title(\"Marker at CSN college\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CSN, 15F));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "@Override\n public void onMapViewInitialized(MapView mapView) {\n settingZoomMarkMap(mapView);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng position = new LatLng(latitude, longitude);\n\n // centre the map around the specified location\n mMap.animateCamera(CameraUpdateFactory.newLatLng(position));\n\n // add a marker at the specified location\n MarkerOptions options = new MarkerOptions();\n mMap.addMarker(options.position(position).title(locationName));\n\n // configure the map settings\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n // enable the zoom controls\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n googleMap.getUiSettings().setMapToolbarEnabled(false);\n googleMap.getUiSettings().setZoomControlsEnabled(false);\n googleMap.getUiSettings().setCompassEnabled(false);\n googleMap.setPadding(0, 0, 0, ImageCreator.dpToPx(92));\n\n mapController = new GoogleMapController(\n googleMap,\n DependencyInjection.provideSettingsStorageService());\n mapController.addListener(this);\n presenter.onViewReady();\n Log.d(TAG, \"onMapReady: \");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n\n mMap.getUiSettings().setCompassEnabled(true);\n// mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setIndoorLevelPickerEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n getDeviceLocation();\n mMap.setOnMarkerDragListener(this);\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n CameraUpdate cUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(35.68, 139.76), 12);\n //mMap.addMarker(new MarkerOptions().position(new LatLng(35.68, 139.76)).title(\"Marker in Tokyo\"));\n mMap.moveCamera(cUpdate);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n }", "private void setupGoogleMapScreenSettings(GoogleMap mMap) {\n mMap.setBuildingsEnabled(true);\n mMap.setIndoorEnabled(true);\n UiSettings mUiSettings = mMap.getUiSettings();\n mUiSettings.setZoomControlsEnabled(true);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setMyLocationButtonEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n }", "public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Set the long click listener as a way to exit the map.\n mMap.setOnMapLongClickListener(this);\n\n if (mapType == MapType.MOTOR_FOUR_POINT) {\n if (listLeg.size() == 1) {\n MotorMapUtils.drawMapWithTwoPoint(mMap, listLeg);\n } else if (listLeg.size() > 1) {\n MotorMapUtils.drawMapWithFourPoint(mMap, listLeg);\n }\n } else if (mapType == MapType.BUS_TWO_POINT) {\n mMap.clear();\n BusMapUtils.drawMapWithTwoPoint(mMap, result);\n } else if (mapType == MapType.BUS_FOUR_POINT) {\n mMap.clear();\n BusMapUtils.drawMapWithFourPoint(mMap, journey);\n }\n\n }", "@Override\n public void onMapReady(GoogleMap gMap) {\n gMap.getUiSettings().setMapToolbarEnabled(false);\n gMap.addMarker(new MarkerOptions().position(fac.getLoc()));\n gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(fac.getLoc(), 15));\n map.onResume();\n }", "void initMap() {\n mapView = (MapView) view.findViewById(R.id.map);\n mapView.onCreate(savedInstanceState);\n mapView.getMapAsync(this);\n mapView.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n\n }\n });\n // Gets to GoogleMap from the MapView and does initialization stuff\n //map = mapView.getMap();\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(),\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n // Needs to call MapsInitializer before doing any CameraUpdateFactory calls\n MapsInitializer.initialize(this.getActivity());\n\n if (mMap != null) {\n if (latitude != null && latitude.length() != 0\n && longitude != null && longitude.length() != 0) {\n LatLng sydney = new LatLng(Double.parseDouble(latitude), Double.parseDouble(longitude));\n //add lat long object to add marker\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Location\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 15.5f));\n } else {\n\n }\n }if (mMap1 != null) {\n if (latitude != null && latitude.length() != 0\n && longitude != null && longitude.length() != 0) {\n LatLng sydney = new LatLng(Double.parseDouble(latitude), Double.parseDouble(longitude));\n //add lat long object to add marker\n mMap1.clear();\n mMap1.addMarker(new MarkerOptions().position(sydney).title(\"Your Location\"));\n mMap1.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 15.5f));\n } else {\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }", "@Override\n public void onMapLoaded() {\n mMapStatus = new MapStatus.Builder().zoom(9).build();\n mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(mMapStatus));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }", "protected void updateCameraPosition() {\n if (!mIsMapStatic && mMap != null && mMapConfiguration != null && mIsMapLoaded) {\n updateCameraPosition(mMapConfiguration.getCameraPosition());\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n mMap2 = googleMap;\n mMap3 = googleMap;\n mMap4 = googleMap;\n mMap5 = googleMap;\n mMap6 = googleMap;\n mMap7 = googleMap;\n mMap8 = googleMap;\n\n\n configuracion =mMap.getUiSettings();\n configuracion.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n LatLng med = new LatLng(5.5986029, -75.8189893);\n LatLng med2 = new LatLng(5.5963072,-75.8130777);\n LatLng med3 = new LatLng(5.5936377, -75.8126003);\n LatLng med4 = new LatLng(5.5749407, -75.7907993);\n LatLng med5 = new LatLng(5.5646469, -75.7912391);\n LatLng med6 = new LatLng(5.5457995, -75.7945168);\n LatLng med7 = new LatLng(5.5391573, -75.8043015);\n LatLng med8 = new LatLng(5.5305395, -75.8031642);\n\n\n final Marker medellin = mMap.addMarker(new MarkerOptions().position(med).title(getString(R.string.ventanas1)));\n final Marker medellin2 = mMap2.addMarker(new MarkerOptions().position(med2).title(getString(R.string.ventanas2)));\n final Marker medellin3 = mMap3.addMarker(new MarkerOptions().position(med3).title(getString(R.string.ventanas3)));\n final Marker medellin4 = mMap4.addMarker(new MarkerOptions().position(med4).title(getString(R.string.ventanas4)));\n final Marker medellin5 = mMap5.addMarker(new MarkerOptions().position(med5).title(getString(R.string.ventanas5)));\n final Marker medellin6 = mMap6.addMarker(new MarkerOptions().position(med6).title(getString(R.string.ventanas6)));\n final Marker medellin7 = mMap7.addMarker(new MarkerOptions().position(med7).title(getString(R.string.ventanas7)));\n final Marker medellin8 = mMap8.addMarker(new MarkerOptions().position(med8).title(getString(R.string.ventanas8)));\n\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(med, 12));\n mMap2.moveCamera(CameraUpdateFactory.newLatLngZoom(med2, 12));\n mMap3.moveCamera(CameraUpdateFactory.newLatLngZoom(med3, 12));\n mMap4.moveCamera(CameraUpdateFactory.newLatLngZoom(med4, 12));\n mMap5.moveCamera(CameraUpdateFactory.newLatLngZoom(med5, 12));\n mMap6.moveCamera(CameraUpdateFactory.newLatLngZoom(med6, 12));\n mMap7.moveCamera(CameraUpdateFactory.newLatLngZoom(med7, 12));\n mMap8.moveCamera(CameraUpdateFactory.newLatLngZoom(med8, 12));\n mMap.addPolyline(new PolylineOptions().geodesic(true)\n .add(new LatLng( 5.5985815 , -75.8189195 ))\n .add(new LatLng( 5.5975885 , -75.8166182 ))\n .add(new LatLng( 5.5960936 , -75.8130026 ))\n .add(new LatLng( 5.5957733 , -75.8127344 ))\n .add(new LatLng( 5.5937338 , -75.8126485 ))\n .add(new LatLng( 5.5927835 , -75.8132172 ))\n .add(new LatLng( 5.5918866 , -75.8127987 ))\n .add(new LatLng( 5.5912352 , -75.8127666 ))\n .add(new LatLng( 5.5893986 , -75.8110714 ))\n .add(new LatLng( 5.5885231 , -75.8110070 ))\n .add(new LatLng( 5.5888861 , -75.8095479 ))\n .add(new LatLng( 5.5902956 , -75.8079815 ))\n .add(new LatLng( 5.5909149 , -75.8080673 ))\n .add(new LatLng( 5.5915128 , -75.8073592 ))\n .add(new LatLng( 5.5918545 , -75.8078313 ))\n .add(new LatLng( 5.5923030 , -75.8079815 ))\n .add(new LatLng( 5.5923244 , -75.8068013 ))\n .add(new LatLng( 5.5926020 , -75.8059430 ))\n .add(new LatLng( 5.5915342 , -75.8057284 ))\n .add(new LatLng( 5.5906159 , -75.8050203 ))\n .add(new LatLng( 5.5903596 , -75.8037329 ))\n .add(new LatLng( 5.5898471 , -75.8031428 ))\n .add(new LatLng( 5.5896336 , -75.8027136 ))\n .add(new LatLng( 5.5879785 , -75.8015442 ))\n .add(new LatLng( 5.5874019 , -75.8011794 ))\n .add(new LatLng( 5.5868360 , -75.7985830 ))\n .add(new LatLng( 5.5854051 , -75.7966733 ))\n .add(new LatLng( 5.5851702 , -75.7962441 ))\n .add(new LatLng( 5.5847217 , -75.7942271 ))\n .add(new LatLng( 5.5847644 , -75.7931542 ))\n .add(new LatLng( 5.5843800 , -75.7911801 ))\n .add(new LatLng( 5.5845509 , -75.7902789 ))\n .add(new LatLng( 5.5842305 , -75.7894850 ))\n .add(new LatLng( 5.5835045 , -75.7887983 ))\n .add(new LatLng( 5.5825434 , -75.7871032 ))\n .add(new LatLng( 5.5823299 , -75.7861590 ))\n .add(new LatLng( 5.5821590 , -75.7850862 ))\n .add(new LatLng( 5.5813689 , -75.7821250 ))\n .add(new LatLng( 5.5813475 , -75.7805371 ))\n .add(new LatLng( 5.5813048 , -75.7790565 ))\n .add(new LatLng( 5.5813475 , -75.7774687 ))\n .add(new LatLng( 5.5807922 , -75.7771468 ))\n .add(new LatLng( 5.5801943 , -75.7785416 ))\n .add(new LatLng( 5.5789770 , -75.7780051 ))\n .add(new LatLng( 5.5781014 , -75.7763529 ))\n .add(new LatLng( 5.5773112 , -75.7762671 ))\n .add(new LatLng( 5.5766492 , -75.7756662 ))\n .add(new LatLng( 5.5760085 , -75.7753444 ))\n .add(new LatLng( 5.5745670 , -75.7738262 ))\n .add(new LatLng( 5.5729546 , -75.7729304 ))\n .add(new LatLng( 5.5729332 , -75.7734239 ))\n .add(new LatLng( 5.5728478 , -75.7743251 ))\n .add(new LatLng( 5.5735419 , -75.7747972 ))\n .add(new LatLng( 5.5737875 , -75.7752693 ))\n .add(new LatLng( 5.5738729 , -75.7764816 ))\n .add(new LatLng( 5.5744708 , -75.7764173 ))\n .add(new LatLng( 5.5746631 , -75.7779086 ))\n .add(new LatLng( 5.5753358 , -75.7794267 ))\n .add(new LatLng( 5.5761793 , -75.7801294 ))\n .add(new LatLng( 5.5760298 , -75.7809448 ))\n .add(new LatLng( 5.5761153 , -75.7816315 ))\n .add(new LatLng( 5.5759444 , -75.7829189 ))\n .add(new LatLng( 5.5764143 , -75.7844424 ))\n .add(new LatLng( 5.5754959 , -75.7865667 ))\n .add(new LatLng( 5.5748553 , -75.7888842 ))\n .add(new LatLng( 5.5749941 , -75.7906866 ))\n .add(new LatLng( 5.5720576 , -75.7914162 ))\n .add(new LatLng( 5.5712888 , -75.7906222 ))\n .add(new LatLng( 5.5705413 , -75.7906866 ))\n .add(new LatLng( 5.5700074 , -75.7903647 ))\n .add(new LatLng( 5.5687687 , -75.7913518 ))\n .add(new LatLng( 5.5677650 , -75.7907295 ))\n .add(new LatLng( 5.5668253 , -75.7910728 ))\n .add(new LatLng( 5.5664409 , -75.7907295 ))\n .add(new LatLng( 5.5656293 , -75.7911587 ))\n .add(new LatLng( 5.5646896 , -75.7910299 ))\n .add(new LatLng( 5.5659283 , -75.7927036 ))\n .add(new LatLng( 5.5660992 , -75.7936478 ))\n .add(new LatLng( 5.5655012 , -75.7942915 ))\n .add(new LatLng( 5.5647323 , -75.7943344 ))\n .add(new LatLng( 5.5619133 , -75.7972527 ))\n .add(new LatLng( 5.5614434 , -75.7990551 ))\n .add(new LatLng( 5.5608454 , -75.7991409 ))\n .add(new LatLng( 5.5602902 , -75.7984972 ))\n .add(new LatLng( 5.5588806 , -75.7975531 ))\n .add(new LatLng( 5.5561469 , -75.7968664 ))\n .add(new LatLng( 5.5561469 , -75.7953644 ))\n .add(new LatLng( 5.5536268 , -75.7944202 ))\n .add(new LatLng( 5.5514911 , -75.7936478 ))\n .add(new LatLng( 5.5500816 , -75.7948065 ))\n .add(new LatLng( 5.5493981 , -75.7944202 ))\n .add(new LatLng( 5.5457674 , -75.7934332 ))\n .add(new LatLng( 5.5453403 , -75.7951498 ))\n .add(new LatLng( 5.5457674 , -75.7961369 ))\n .add(new LatLng( 5.5460451 , -75.7968235 ))\n .add(new LatLng( 5.5468139 , -75.7983255 ))\n .add(new LatLng( 5.5453616 , -75.7986689 ))\n .add(new LatLng( 5.5455966 , -75.7996988 ))\n .add(new LatLng( 5.5464081 , -75.8006215 ))\n .add(new LatLng( 5.5458956 , -75.8013296 ))\n .add(new LatLng( 5.5463227 , -75.8022308 ))\n .add(new LatLng( 5.5451053 , -75.8032823 ))\n .add(new LatLng( 5.5449345 , -75.8037865 ))\n .add(new LatLng( 5.5445501 , -75.8039045 ))\n .add(new LatLng( 5.5443792 , -75.8036900 ))\n .add(new LatLng( 5.5449345 , -75.8028531 ))\n .add(new LatLng( 5.5452121 , -75.8025956 ))\n .add(new LatLng( 5.5449986 , -75.8023596 ))\n .add(new LatLng( 5.5448918 , -75.8023596 ))\n .add(new LatLng( 5.5445073 , -75.8025956 ))\n .add(new LatLng( 5.5431298 , -75.8041513 ))\n .add(new LatLng( 5.5423930 , -75.8043337 ))\n .add(new LatLng( 5.5426493 , -75.8036685 ))\n .add(new LatLng( 5.5430123 , -75.8031321 ))\n .add(new LatLng( 5.5436744 , -75.8024669 ))\n .add(new LatLng( 5.5428628 , -75.8022952 ))\n .add(new LatLng( 5.5419712 , -75.8028370 ))\n .add(new LatLng( 5.5408232 , -75.8030784 ))\n .add(new LatLng( 5.5403427 , -75.8016300 ))\n .add(new LatLng( 5.5402359 , -75.8005357 ))\n .add(new LatLng( 5.5402572 , -75.7992053 ))\n .add(new LatLng( 5.5403640 , -75.7983899 ))\n .add(new LatLng( 5.5400223 , -75.7985616 ))\n .add(new LatLng( 5.5399155 , -75.7995915 ))\n .add(new LatLng( 5.5400437 , -75.8032823 ))\n .add(new LatLng( 5.5394136 , -75.8042479 ))\n .add(new LatLng( 5.5382283 , -75.8037114 ))\n .add(new LatLng( 5.5381215 , -75.8027458 ))\n .add(new LatLng( 5.5374808 , -75.8024025 ))\n .add(new LatLng( 5.5358149 , -75.8037758 ))\n .add(new LatLng( 5.5349606 , -75.8032179 ))\n .add(new LatLng( 5.5340849 , -75.8039474 ))\n .add(new LatLng( 5.5337005 , -75.8036900 ))\n .add(new LatLng( 5.5340208 , -75.8031750 ))\n .add(new LatLng( 5.5336791 , -75.8025098 ))\n .add(new LatLng( 5.5323976 , -75.8024883 ))\n .add(new LatLng( 5.5324350 , -75.8019519 ))\n .add(new LatLng( 5.5320960 , -75.8018446 ))\n .add(new LatLng( 5.5317569 , -75.8020806 ))\n .add(new LatLng( 5.5317356 , -75.8029604 ))\n .add(new LatLng( 5.5314579 , -75.8030999 ))\n .add(new LatLng( 5.5310414 , -75.8026814 ))\n .add(new LatLng( 5.5304968 , -75.8027995 ))\n .color(Color.BLUE)\n .width(5)\n\n );\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n\n\n }", "@Override\n\tpublic void onMapReady(GoogleMap googleMap) {\n\t\tmMap = googleMap;\n\t\tmMap.getUiSettings().setZoomControlsEnabled(true);\n\t\tif (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\t\t\t// TODO: Consider calling\n\t\t\t// ActivityCompat#requestPermissions\n\t\t\t// here to request the missing permissions, and then overriding\n\t\t\t// public void onRequestPermissionsResult(int requestCode, String[] permissions,\n\t\t\t// int[] grantResults)\n\t\t\t// to handle the case where the user grants the permission. See the documentation\n\t\t\t// for ActivityCompat#requestPermissions for more details.\n\t\t\treturn;\n\t\t}\n\t\tmMap.setMyLocationEnabled(true);\n\t\tsetMarker();\n\t\tmMap.setOnMarkerClickListener(marker -> {\n//\t\t\tmarker.setTitle(markers.get(marker).getTitle());\n\t\t\tIntent intent = new Intent(context, ImageExtraActivity.class);\n\t\t\tintent.putExtra(\"pic\", markers.get(marker));\n\t\t\tcontext.startActivity(intent);\n\t\t\treturn false;\n\t\t});\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng barcelona = new LatLng(41.3887901, 2.1589899);\n LatLng marcador1 = new LatLng(41.379564, 2.167203);\n LatLng marcador2 = new LatLng(41.394327, 2.191843);\n LatLng marcador3 = new LatLng(41.398121, 2.199290);\n LatLng marcador4 = new LatLng(41.386235, 2.146300);\n LatLng marcador5 = new LatLng(41.395933, 2.136832);\n LatLng marcador6 = new LatLng(41.441696, 2.237285);\n LatLng marcador7 = new LatLng(41.457493, 2.255982);\n LatLng marcador8 = new LatLng(41.316202, 2.028248);\n LatLng marcador9 = new LatLng(41.333813, 2.035098);\n LatLng marcador10 = new LatLng(41.357954, 2.061158);\n\n\n mMap.addMarker(new MarkerOptions().position(marcador1).title(\"Los amigos\"));\n mMap.addMarker(new MarkerOptions().position(marcador2).title(\"El dorado\"));\n mMap.addMarker(new MarkerOptions().position(marcador3).title(\"Juan y Luca\"));\n mMap.addMarker(new MarkerOptions().position(marcador4).title(\"Durums\"));\n mMap.addMarker(new MarkerOptions().position(marcador5).title(\"Restaurante Jose Fina\"));\n mMap.addMarker(new MarkerOptions().position(marcador6).title(\"Los Hermanos\"));\n mMap.addMarker(new MarkerOptions().position(marcador7).title(\"Paella para todos\"));\n mMap.addMarker(new MarkerOptions().position(marcador8).title(\"Señor Pollo\"));\n mMap.addMarker(new MarkerOptions().position(marcador9).title(\"Restaurante Boliviano\"));\n mMap.addMarker(new MarkerOptions().position(marcador10).title(\"Laguna Alalay\"));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(barcelona,12), 4000,null);\n mMap.setMaxZoomPreference(1000);\n }" ]
[ "0.74766177", "0.7335512", "0.72934926", "0.72813785", "0.72737455", "0.7257498", "0.7254318", "0.72446555", "0.7224824", "0.72100985", "0.7166344", "0.7165808", "0.713955", "0.7085555", "0.70812017", "0.70377433", "0.70377433", "0.70377433", "0.7026566", "0.7025553", "0.70238143", "0.7007111", "0.70012724", "0.6997777", "0.69654363", "0.6965286", "0.69461274", "0.6945677", "0.6912594", "0.69079846", "0.69056624", "0.69040877", "0.68997955", "0.68937886", "0.68898", "0.6878613", "0.68712014", "0.68424344", "0.68151385", "0.6811688", "0.67953044", "0.6795056", "0.6783096", "0.6771809", "0.6764171", "0.6760891", "0.6731639", "0.6716007", "0.6702786", "0.66884375", "0.66742843", "0.6670667", "0.6664756", "0.66627467", "0.6651455", "0.6589455", "0.65794426", "0.65774184", "0.6552161", "0.6540923", "0.6536517", "0.65340227", "0.6529808", "0.65239114", "0.6518912", "0.65145487", "0.64987344", "0.6490669", "0.64837664", "0.64755225", "0.6472673", "0.64559025", "0.6448435", "0.64428145", "0.64414686", "0.64410704", "0.6438352", "0.64340746", "0.64274997", "0.6398153", "0.63924503", "0.63921374", "0.6391044", "0.6387489", "0.6387424", "0.6382473", "0.6380849", "0.6376753", "0.63747805", "0.63727754", "0.6367194", "0.6364425", "0.6363218", "0.6353766", "0.63498104", "0.63445044", "0.63422304", "0.6342186", "0.6324055", "0.6322445" ]
0.69066256
30
Lifecycle method overridden to set up the map and check for internet connectivity when the fragment comes into focus. If fragment is not already monitoring geofences, begins monitoring geofences
@Override public void onResume() { super.onResume(); MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity.isConnectedToNetwork()) { setUpMapIfNeeded(); } if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) { //starts the mainActivity monitoring geofences mainActivity.getGeofenceMonitor().startGeofenceMonitoring(); isMonitoringGeofences = true; } mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled()); if(needToCallUpdateGeofences) { updateGeofences(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onResume() {\n super.onResume();\n if (mMap != null) {\n requestLocation();\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(map!=null)\n\t\t{\n\t\t\tsetup();\n\t\t}\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tnearby_mapview.onResume();\n\t}", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if ( googleMap == null) {\r\n\r\n // Try to obtain the map from the SupportMapFragment.\r\n googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.routesMap)).getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (googleMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "public void initMapFragment (){\n // Thay doi tieu de\n tabTourMapBinding.actionBar.actionBarTitle.setText(R.string.tour_map);\n // Khoi tao ban do\n SupportMapFragment mapFragment = null;\n for (int i = 0; i < getSupportFragmentManager().getFragments().size(); i++) {\n mapFragment = (SupportMapFragment) getSupportFragmentManager().getFragments().get(i).getChildFragmentManager().findFragmentById(R.id.tour_map);\n if (mapFragment != null) {\n break;\n }\n }\n// (SupportMapFragment)(((PagerAdapter)ActivityManager.getInstance().activityTourTabsBinding.viewpager.getAdapter()).getFragment(0).getActivity().getSupportFragmentManager().findFragmentById(R.id.tour_map));\n// SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.tour_map);\n mapFragment.getMapAsync(this);\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n LocationListener mLocationListener = new LocationListener() {\n // TODO: Duoc goi khi thay doi vi tri\n @Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onStatusChanged(String provider, int status, Bundle extras) {\n// ActivityManager.getInstance().makeLongToast(\"onStatusChanged\");\n }\n\n @Override\n public void onProviderEnabled(String provider) {\n// ActivityManager.getInstance().makeLongToast(\"onProviderEnabled\");\n }\n\n @Override\n public void onProviderDisabled(String provider) {\n// ActivityManager.getInstance().makeLongToast(\"onProviderDisabled\");\n }\n };\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n // Cu 5s thi kiem tra su thay doi vi tri 1 lan\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 10, mLocationListener);\n }\n // Kiem tra thong tin vi tri\n GPSStatus();\n }", "private void initMap() {\n Log.wtf(TAG, \"initMap() has been instantiated\");\n\n Log.d(TAG, \"initMap: initializing the map...\");\n try {\n MapsInitializer.initialize(getActivity().getApplicationContext());\n } catch (Exception e) {\n e.printStackTrace();\n }\n mMapView.getMapAsync(this);\n }", "private void intializeMap() {\n\n if (googleMap == null) {\n\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n\n // getPlacesMarkers();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings.setZoomControlsEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n mUiSettings.setCompassEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n search(address);\n //checking if appropriate permissions are granted\n if(ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.mapstyle_day);\n mMap.setMapStyle(style);\n\n if (locationProvider != null) {\n enableLocationBullet();\n if (lastpos != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(lastpos));\n }\n }\n // Start clustermanager and add markers\n setUpClusterManager();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapReady = true;\n if (searchedRestaurants != null) {\n addRestaurants(searchedRestaurants, false);\n }\n\n Location loc = locationProvider.getLastLocation();\n if (!init) {\n zoomMapToPosition(loc, MY_LOCATION_ZOOM);\n init = true;\n }\n\n }\n });\n\n }", "private void initilizeMap() \n {\n \tmContext = getApplicationContext();\n \ttry \n \t{\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n \n // Getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // Getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n if (!isGPSEnabled && !isNetworkEnabled) \n {\n // No network provider is enabled\n } \n else \n {\n this.canGetLocation = true;\n if (isNetworkEnabled) \n {\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);\n Log.d(\"Network\", \"Network\");\n if (locationManager != null)\n {\n// Criteria criteria = new Criteria();\n// provider = locationManager.getBestProvider(criteria, false);\n location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (location != null) \n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n // If GPS enabled, get latitude/longitude using GPS Services\n if (isGPSEnabled) \n {\n if (location == null) \n {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);\n Log.d(\"GPS Enabled\", \"GPS Enabled\");\n if (locationManager != null) \n {\n location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null)\n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n myLocation = new LatLng(latitude,longitude);\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n// \n// // check if map is created successfully or not\n// if (gMap == null) \n// {\n// Toast.makeText(getApplicationContext(),\n// \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n// .show();\n// }\n gMap.setMyLocationEnabled(true);\n// Marker TP = gMap.addMarker(new MarkerOptions().position(myLocation).title(\"Estoy aca\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET)));\n\n// lstLatLngs = new ArrayList<LatLng>();\n gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() \n {\n \t@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t// TODO Auto-generated method stub\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}\n });\n \n// HttpRequestFactory httpRequestFactory = createRequestFactory(transport);\n// HttpRequest request = httpRequestFactory.buildGetRequest(new GenericUrl(PLACES_SEARCH_URL));\n// request.url.put(\"key\", \"\");\n// request.url.put(\"location\", latitude + \",\" + longitude);\n// request.url.put(\"radius\", 500);\n// request.url.put(\"sensor\", \"false\");\n// infowindow = new google.maps.InfoWindow();\n \n// var service = new google.maps.places.PlacesService(gMap);\n// service.nearbySearch(request, callback);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_home, container, false);\n //Declaration\n\n mapFragment = (MapFragment) getChildFragmentManager().findFragmentById(R.id.map);\n\n\n locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n\n return v;\n }\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME, MIN_DISTANCE, this);\n\n\n autocompleteFragment = (PlaceAutocompleteFragment)\n getChildFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n autocompleteFragment.setHint(\"Location\");\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n // TODO: Get info about the selected place.\n Log.i(\"Place: \", place.getAddress().toString());\n if (mybound != null) {\n if (mybound.contains(place.getLatLng())) {\n zoomToSearchedLocation(place);\n }\n }\n// zoomToSearchedLocation(place);\n bolFlag = true;\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n\n if (InternetUtils.isNetworkConnected(getActivity())) {\n\n\n try {\n MapsInitializer.initialize(getActivity().getApplicationContext());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n mapFragment.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap mMap) {\n googleMap = mMap;\n\n // For showing a move to my location button\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n googleMap.setMyLocationEnabled(true);\n getLocation();\n\n }\n });\n\n } else {\n Toast.makeText(getActivity(), \"No Internet Connection\", Toast.LENGTH_SHORT).show();\n }\n\n return v;\n }", "@Override\n public void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mGeocoder = new Geocoder(this, Locale.getDefault());\n\n updateScreenLoc(movement[0]);\n\n loadCrimes(movement[0]);\n //Start MockLocationManager and inject first point\n turnOnLocationManager();\n updateLocation(movement[0]);\n updateRadiusCircle();\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n //Enable interactions with the google map\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n if(!partnerLocs) {\n Log.d(\"GO TO INTI :\", \"!!!!\");\n init(); //initialize components\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n }\n mMap.setOnMarkerClickListener(this);\n\n if(showMyLoc || partnerLocs){\n loadMarkers();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(markerClicked.getPosition(), ZOOMLV));\n markerClicked.showInfoWindow();\n }\n else{\n loadMarkers(); //change to loadPartnerMarkers() later\n// mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(markerClicked.getPosition(), ZOOMLV));\n// markerClicked.showInfoWindow();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "public void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.farmMap)).getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n setUpMap();\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n Log.v(\"contourrrr\", \"\" + contour);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n if (mandiArray.size() < 1) {\n if (mMap != null) {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 12.0f));\n }\n }\n\n\n ArrayAdapter<String> chooseYourFarmSpiner = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, allFarmsArray);\n chooseYourFarmSpiner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n farmSpinner.setAdapter(chooseYourFarmSpiner);\n\n farmSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n if (i > 0) {\n String conto = allFarmsContour.get(i - 1);\n if (conto != null) {\n if (mMap != null) {\n mMap.clear();\n\n }\n points = new ArrayList<LatLng>();\n List<String> l_List = Arrays.asList(conto.split(\"-\"));\n Double lat1 = null;\n Double lon1 =null;\n\n /* Double lat1 = Double.valueOf(l_List.get(0));\n Double lon1 = Double.valueOf(l_List.get(l_List.size() - 1));\n points.add(new LatLng(lat1, lon1));*/\n\n for (int j = 0; j < l_List.size(); j++) {\n String currentString = l_List.get(j);\n if (currentString != null) {\n String[] separated = currentString.split(\",\");\n if (separated.length>1) {\n String la = separated[0];\n String lo = separated[1];\n\n lat1=Double.parseDouble(la);\n lon1=Double.parseDouble(lo);\n\n points.add(new LatLng(Double.valueOf(la), Double.valueOf(lo)));\n\n Log.v(\"points\",la+\",\"+lo);\n }\n }\n }\n\n if (lat1 != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat1, lon1), 19.0f));\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",lat1+\"\");\n ed.putString(\"lon\",lon1+\"\");\n ed.apply();\n\n } else {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Double.valueOf(latitude), Double.valueOf(longitude)), 13.0f));\n Log.v(\"latlon2\", lat1 + \"---\" + lon1);\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",latitude+\"\");\n ed.putString(\"lon\",longitude+\"\");\n ed.apply();\n }\n if (mMap != null) {\n mMap.clear();\n setUpMap();\n }\n }\n } else {\n\n if (mMap != null) {\n mMap.clear();\n\n }\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n\n // Setting a custom info window adapter for the google map\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n // Use default InfoWindow frame\n @Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n // Defines the contents of the InfoWindow\n @Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }\n });\n\n\n }\n });\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n\n }\n }\n }", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\r\n\t@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.full_screen_map_fragment);\r\n\t\tgMap = ((SupportMapFragment) getSupportFragmentManager()\r\n\t\t\t\t.findFragmentById(R.id.map)).getMap();\r\n\t\tfinal GoogleMap gmap = gMap;\r\n\t\tmapFragment = (MeMapFragment) getSupportFragmentManager()\r\n\t\t\t\t.findFragmentById(R.id.map_fragment);\r\n\t\tshowDialog(0);\r\n\r\n\t\ttry {\r\n\t\t\ttask = new AsyncTask<ArrayList<Integer>, Integer, ArrayList<LatLng>>() {\r\n\t\t\t\tprotected ArrayList<LatLng> doInBackground(\r\n\t\t\t\t\t\tArrayList<Integer>... loc) {\r\n\t\t\t\t\tArrayList<LatLng> result = new ArrayList<LatLng>();\r\n\t\t\t\t\tArrayList<Integer> coordinates = loc[0];\r\n\t\t\t\t\tclearBounds();\r\n\t\t\t\t\tfor (int i = 0; i < coordinates.size() - 1; i += 2) {\r\n\t\t\t\t\t\tint x = coordinates.get(i);\r\n\t\t\t\t\t\tint y = coordinates.get(i + 1);\r\n\t\t\t\t\t\tOSRef or = new OSRef(x, 1000000 - y);\r\n\t\t\t\t\t\tuk.me.jstott.jcoord.LatLng ll = or.toLatLng();\r\n\t\t\t\t\t\tll.toWGS84();\r\n\t\t\t\t\t\tLatLng lln = new LatLng(ll.getLat(), ll.getLng());\r\n\t\t\t\t\t\tresult.add(lln);\r\n\t\t\t\t\t\taddPointInBounds(lln);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType.containsKey(i)) {\r\n\t\t\t\t\t\t\t//this is a marker\r\n\t\t\t\t\t\t\t//TODO find station codes for departures.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprotected void onProgressUpdate(Integer... progress) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprotected void onPostExecute(ArrayList<LatLng> result) {\r\n\t\t\t\t\tif (result.size() < 2) {\r\n\t\t\t\t\t\twait_dialog.cancel();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint color = Color.BLUE;\r\n\t\t\t\t\tint icon = 0;\r\n\t\t\t\t\t// First the route\r\n\t\t\t\t\tPolylineOptions line = new PolylineOptions().width(9);\r\n\t\t\t\t\tfor (int i = 0; i < result.size(); i++) {\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType.containsKey(i)) {\r\n\t\t\t\t\t\t\tif (i != 0) {\r\n\t\t\t\t\t\t\t\tgmap.addPolyline(line);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tline = new PolylineOptions().width(9);\r\n\t\t\t\t\t\t\tArrayList<Object> array = RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t\t.get(i);\r\n\t\t\t\t\t\t\tcolor = (Integer) array.get(0);\r\n\t\t\t\t\t\t\tif (color == Color.WHITE)\r\n\t\t\t\t\t\t\t\tcolor = Color.BLACK;\r\n\t\t\t\t\t\t\tline.color(color);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tline.add(result.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (line.getPoints().size() > 1)\r\n\t\t\t\t\t\tgmap.addPolyline(line);\r\n\r\n\t\t\t\t\t// And then the pushpins\r\n\t\t\t\t\tfinal ArrayList<Marker> markers = new ArrayList<Marker>();\r\n\t\t\t\t\tfor (int i = 1; i < result.size(); i++) {\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t.containsKey(i - 1)) {\r\n\t\t\t\t\t\t\tArrayList<Object> array = RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t\t.get(i - 1);\r\n\t\t\t\t\t\t\ticon = (Integer) array.get(1);\r\n\t\t\t\t\t\t\tif (icon == R.drawable.walk)\r\n\t\t\t\t\t\t\t\ticon = R.drawable.walk_black;\r\n\r\n\t\t\t\t\t\t\tMarkerOptions opt = new MarkerOptions();\r\n\t\t\t\t\t\t\topt.position(result.get(i - 1));\r\n\t\t\t\t\t\t\tLog.d(\"Point\", result.get(i-1).toString());\r\n\t\t\t\t\t\t\topt.icon(BitmapDescriptorFactory.fromResource(icon));\r\n\t\t\t\t\t\t\topt.title(\"Change\");\r\n\t\t\t\t\t\t\topt.snippet((String) array.get(2));\r\n\t\t\t\t\t\t\tmarkers.add(gmap.addMarker(opt));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_dialog.cancel();\r\n\t\t\t\t\tmapFragment.getView().post(new Runnable() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tResources r = getResources();\r\n\t\t\t\t\t\t\tfloat px = TypedValue.applyDimension(\r\n\t\t\t\t\t\t\t\t\tTypedValue.COMPLEX_UNIT_DIP, 40,\r\n\t\t\t\t\t\t\t\t\tr.getDisplayMetrics());\r\n\t\t\t\t\t\t\tgMap.animateCamera(CameraUpdateFactory\r\n\t\t\t\t\t\t\t\t\t.newLatLngBounds(getBounds(), (int) px));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\ttask.execute(RouteResultsActivity.coordinates);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "@Override\n public void onResume() {\n super.onResume();\n mMapView.onResume();\n if (mLocationClient != null) {\n mLocationClient.startLocation();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n thisMap = googleMap;\n thisMap.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener() {\n private float currentZoom = -1;\n @Override\n public void onCameraChange(CameraPosition camera) {\n if (camera.zoom != currentZoom){\n currentZoom = camera.zoom;\n retrieveListings(googleMap);\n }\n }\n });\n\n // Add gestures\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n googleMap.getUiSettings().setScrollGesturesEnabled(true);\n googleMap.getUiSettings().setRotateGesturesEnabled(true);\n\n // Make markers clickable\n googleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n // Triggered when user click any marker on the map\n Listing listing = (Listing) marker.getTag();\n goToDetailedListingScreen(listing);\n return false;\n }\n });\n\n // Retrieve user's current location and set it on the map\n LatLng currentLocation = LocationUtils.getCoordinates(getContext(), getActivity());\n googleMap.addMarker(new MarkerOptions().position(currentLocation).title(\"Your current location\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));\n\n // Retrieve surrounding listings\n retrieveListings(googleMap);\n }", "@Override\n protected void onResume() {\n mapView.onResume();\n super.onResume();\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n mapView.onResume();\n }", "private void initilizeMap() {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "@Override\n @SuppressWarnings(\"MissingPermission\")\n public void onStart() {\n super.onStart();\n if(locationEngine != null){\n locationEngine.requestLocationUpdates();\n }\n if(locationLayerPlugin != null){\n locationLayerPlugin.onStart();\n }\n mapView.onStart();\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void init(){\n //drawer layers, used to show the info of location\n layout_drawer = (DrawerLayout)findViewById(R.id.map_drawer);\n //lock the drawer first, so empty drawer wont be dragged out\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n\n //views in the info layer\n et_drawer_name = (EditText)findViewById(R.id.drawer_et_name);\n\n //used to get current location\n locMan = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);\n locProv = LocationManager.GPS_PROVIDER;\n\n //check user permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n //if do not have getLocation permission, request\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 100);\n return;\n }else if(mMap != null) {\n //get current location\n Location current = locMan.getLastKnownLocation(locProv);\n mMap.setMyLocationEnabled(true); //my location button\n\n if(current != null){\n //go to current location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(current.getLatitude(), current.getLongitude()),\n ZOOMLV));\n }\n\n }\n\n //initialize search bar\n PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.map_search);\n\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n location = new cLocation(place);\n\n //move camera to searched place and zoom in\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(place.getLatLng(), ZOOMLV));\n\n //show the dialog for user to add\n openAddDialog();\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"startMap\");\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n mMap = googleMap;\n requestLocationPermision();\n requestMarkers();\n Log.d(TAG, \"Map listo\");\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private boolean initMap(Bundle savedInstanceState) {\n // setContentView(R.layout.activity_map);\n Log.v(TAG, \"Map Activated\");\n LayoutInflater inflater = LayoutInflater.from(GeoCollectMapActivity.this);\n inflater.inflate(R.layout.activity_map, (FrameLayout)findViewById(R.id.content_frame));\n \n this.mapView = (AdvancedMapView) findViewById(R.id.advancedMapView);\n\n mapView.setClickable(true);\n mapView.setBuiltInZoomControls(true);\n\n // mapView.setDebugSettings(new DebugSettings(true, true, false));\n\n mapView.getMapZoomControls().setZoomLevelMax((byte) 24);\n mapView.getMapZoomControls().setZoomLevelMin((byte) 1);\n\n final String filePath = PreferenceManager.getDefaultSharedPreferences(this).getString(\n MapView.MAPSFORGE_BACKGROUND_FILEPATH, null);\n final int type = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(this).getString(\n MapView.MAPSFORGE_BACKGROUND_RENDERER_TYPE, \"0\"));\n File mapfile = null;\n\n // if the map file was edited in the preferences\n if (filePath != null && type == 0) {\n mapfile = new File(filePath);\n }\n\n if (mapfile != null && mapfile.exists()) {\n // use it\n mapView.setMapFile(new File(filePath));\n\n } else if (MAP_FILE != null) {\n\n Log.i(TAG, \"setting background file\");\n mapView.setMapFile(MAP_FILE);\n loadPersistencePreferences();\n\n } else {\n Log.i(TAG, \"unable to set background file\");\n // return false;\n }\n\n return true;\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "private void initializeMap() {\n if (googleMap == null) {\n googleMap = ((MapFragment) getFragmentManager().findFragmentById(\n R.id.map)).getMap();\n\n // check if map is created successfully or not\n if (googleMap == null) {\n Toast.makeText(getApplicationContext(),\n \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n .show();\n }\n\n // Set Enable of My Location\n //googleMap.setMyLocationEnabled(true);\n\n // Setting a ChangeListener of my location for the Google Map\n //googleMap.setOnMyLocationChangeListener(mMLCListener);\n\n // Setting a ClickListener for the Google Map\n googleMap.setOnMapClickListener(mMCListener);\n\n // Set Enable of Zoom\n googleMap.getUiSettings().setZoomGesturesEnabled(true);\n }\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n initGoogleApi(googleMap);\n initWindow();\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n mapView.onResume();\r\n }", "public final void onResume() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onResume()\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onResume();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onResume()\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onResume();\n }\n }", "@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapLoaded = true;\n waitForMapPlease();\n }\n });\n }", "@Override\n public void onCreate() {\n super.onCreate();\n // Check if Google Map API Services is Available\n if (servicesOK()) {\n Log.d(Constants.SERVICE_STARTED, Constants.GOOGLE_MAP_ONLINE);\n // build google map client and connect\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TAG\", \"onMapReady: map is ready\");\n mMap = googleMap;\n getDeviceLocation();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng point) {\n if (currentMarker != null) {\n currentMarker.remove();\n }\n latitude = point.latitude;\n longitude = point.longitude;\n currentMarker = mMap.addMarker(new MarkerOptions().position(point));\n latLng = new com.google.maps.model.LatLng(latitude, longitude);\n\n\n }\n });\n select.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.show();\n\n GetBackgroundInfo backgroundInfo = new GetBackgroundInfo();\n backgroundInfo.execute();\n\n }\n });\n hideSoftKeyboard();\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void initMap(){\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n }", "@Override\n public void onResume() {\n super.onResume();\n MaintenanceMapView.onResume();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n TripTabFragment.getInstance().setGoogleMap(googleMap);\n TripTabFragment.getInstance().setTv_trip_distance(tv_trip_distance);\n TripTabFragment.getInstance().setTv_trip_deduction(tv_trip_deduction);\n getLocations();\n if (PermissionUtil.checkLocationPermission(tripTabFragment.getMainActivity())) {\n googleMap.setMyLocationEnabled(true);\n googleMap.getUiSettings().setAllGesturesEnabled(false);\n\n //Set Zoom right when the map is showed\n try {\n LocationManager locationManager = (LocationManager) tripTabFragment.getContext().getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n\n Location location = locationManager.getLastKnownLocation(locationManager\n .getBestProvider(criteria, false));\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(location.getLatitude(), location.getLongitude()))\n .zoom(15)\n .build();\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n } catch (NullPointerException e) {\n e.printStackTrace();\n Timber.e(e, \"method=onMapReady error=Error when setting map zoom\");\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getCases();\n mMap.setMyLocationEnabled(true);\n mMap.setOnMarkerClickListener(this);\n }", "public final void onStart() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onStart()\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onStart();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onStart()\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onStart();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n //Get our mapManager singleton and give it the context\n mapManager = new MapManager(getActivity(), mMap);\n /*mapManager.drawAllTrainLines();\n mapManager.setMap(mMap);*/\n\n //Set up gpsManager with context\n gpsManager = GPSManager.getInstance();\n //Get the location manager service\n locationManager = (LocationManager) getActivity().getSystemService(getActivity().LOCATION_SERVICE);\n\n //Get the permissions for the location service if needed\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PermissionConstants.LOCATION_TrackerFragment.getValue());\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, gpsManager);\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, gpsManager);\n gpsManager.InitLocationManager(getActivity(), locationManager, mapManager);\n Log.v(\"Tracker\", \"No Permissions Required, hooked up gpsManager\");\n\n }\n mapManager.moveCameraToMe();\n new LoadMapLines(mMap, mapManager).execute();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (servicesOK() /*&& initMap()*/) {\n try {\n\n /*MarkerOptions options = new MarkerOptions()\n .title(getString(R.string.landon_hotel) + \", \" + city)\n .position(new LatLng(lat, lng));\n mMap.addMarker(options);*/\n //onMapReady(mMap);\n\n\n LatLng zoom = new LatLng(-2.982996, 104.732918);\n\n// mMap.addMarker(new MarkerOptions().position(zoom).title(\"Marker in Palembang\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n mMap.getUiSettings().setRotateGesturesEnabled(false);\n mMap.getUiSettings().setTiltGesturesEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n//\n mMap.setTrafficEnabled(true);\n\n Log.i(\"CEKDATA\",\"BEGINNING\");\n mMap.moveCamera(CameraUpdateFactory.newLatLng(zoom));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(14), 2000, null);\n Log.i(\"CEKDATA\",\"Finishing\");\n\n } /*catch (IOException e) {\n Toast.makeText(this, getString(R.string.error_finding_hotel), Toast.LENGTH_SHORT).show();\n }*/ catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n Log.d(\"Check this->\", e.getMessage());\n }\n\n\n api.bukan_parkir(googleMap, this);\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n enableMyLocation();\n buildGoogleApiClient();\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Log.i(TAG, \"map is ready\");\r\n mMap = googleMap;\r\n\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(this);\r\n mMap.setOnMyLocationClickListener(this);\r\n\r\n startLocationUpdates();\r\n }", "@Override\n public void onMapReady(MapboxMap mapboxMap) {\n map = mapboxMap;\n map.addOnMapClickListener(this);\n enableLocation();\n //LatLng point = null;\n //setRoute(point);\n\n }", "@Override protected void onResume() {\n super.onResume();\n locationClient.connect();\n }", "@Override\n// public void onMapReady(GoogleMap googleMap) {\n public void onMapReady(GoogleMap googleMap) { // Declared final because LiveData Observer onChanged()\n mMap = googleMap;\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n\n // If you have added a MapFragment (or MapView) programmatically, then you can configure its\n // initial state by passing in a GoogleMapOptions object with your options specified.\n // The options available to you are exactly the same as those available via XML.\n // To apply these options when you are creating a map, do one of the following:\n //\n //If you are using a MapFragment, use the MapFragment.newInstance(GoogleMapOptions options)\n // static factory method to construct the fragment and pass in your custom configured options.\n //If you are using a MapView, use the MapView(Context, GoogleMapOptions) constructor and pass\n // in your custom configured options.\n // Todo: Should the GoogleMapOptions object be passed to the MapView constructor?\n GoogleMapOptions options = new GoogleMapOptions();\n options.ambientEnabled(true);\n\n if (mIsFirstInstantiation) {\n // Update Google Maps to display current location when first loaded\n if (mLocationPermissionGranted) {\n mIsFirstInstantiation = false;\n getDeviceLocation();\n }\n } else {\n // Restore CameraPosition from how it was before\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));\n }\n\n mSpotViewModel.getAllSpots().observe(this, new Observer<List<Spot>>() {\n @Override\n public void onChanged(@Nullable List<Spot> spots) {\n for (Spot spot : spots) {\n mSpotList = spots;\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(spot.getLatLng().latitude, spot.getLatLng().longitude))\n .title(spot.getName())\n .snippet(spot.getDescription()));\n\n }\n }\n });\n\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\n public void onResume() {\n mMapView.onResume();\n super.onResume();\n }", "private void initilizeMap() {\n\t\tif (googleMap == null) {\n\t\t\tgoogleMap = ((MapFragment) getFragmentManager().findFragmentById(\n\t\t\t\t\tR.id.map)).getMap();\n\n\t\t\tif (googleMap == null) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\n\t\tnearby_baidumap.setMyLocationEnabled(true); // 开启图层定位\n\t\tif (!N_locationclient.isStarted()) {\n\t\t\tN_locationclient.start();// 开始定位\n\t\t}\n\t\t// 开启方向传感器\n\t\tmyOrientationListener.start();\n\t}", "private void inflateMap() {\n\n // Alter the visibiliity\n waitLayout.setVisibility(View.GONE);\n mapWearFrame.setVisibility(View.VISIBLE);\n\n // Set up fragment manager\n fm = getFragmentManager();\n\n // Set up map fragment\n mapFragment = (MapFragment) fm.findFragmentByTag(TAG_FRAG_MAP);\n if (mapFragment == null) {\n // Initialize map options\n GoogleMapOptions mapOptions = new GoogleMapOptions();\n mapOptions.mapType(GoogleMap.MAP_TYPE_NORMAL)\n .compassEnabled(true)\n .rotateGesturesEnabled(true)\n .tiltGesturesEnabled(true);\n mapFragment = MapFragment.newInstance(mapOptions);\n }\n mapFragment.getMapAsync(this);\n\n // Add map to DismissOverlayView\n fm.beginTransaction().add(R.id.mapWearFrame, mapFragment).commit();\n }", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n listener.onMapSuccess(mMap);\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n System.out.println(\"Perm Loc\" + mLocationPermissionGranted);\n createLocationRequest();\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n getCurrentPlace();\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n if(mvTencentMapView != null) {\n mvTencentMapView.onResume();\n }\n if(!isfist) {\n\n// tencentMap.clearAllOverlays();\n for(Marker item:markerListArticle){\n// item.remove();\n item.setVisible(false);\n }\n for(Marker item:markerListApplyVillage){\n// item.remove();\n item.setVisible(false);\n }\n for(Marker item:markerListBooth){\n// item.remove();\n item.setVisible(false);\n }\n// markerListArticle.clear();\n// markerListApplyVillage.clear();\n// markerListBooth.clear();\n// province1 = null;\n getMapArticle(1);\n initCollectVillageRV();\n// bindListener();\n// initLocation();\n\n\n }\n isfist = false;\n\n\n// getApplyVillage();\n }", "@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(getContext());\n mMap = googleMap;\n mMap.setMinZoomPreference(13.0f);\n mMap.setMaxZoomPreference(20.0f);\n mMap.setOnMapClickListener(this);\n mMap.setInfoWindowAdapter(this);\n mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.\n ACCESS_FINE_LOCATION}, 1);\n } else {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n mMap.setMyLocationEnabled(true);\n\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}", "private void initMap() {\n setContentView(R.layout.map_activity);\n MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.mapFragment);\n if (mapFragment == null)\n Log.e(\"Hi\", \"Couldn't find mapFragment\");\n else {\n Log.d(\"Hi\", \"Found mapFragment\");\n mapFragment.getMapAsync(this);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (mPresenter.isReady()) {\n mPresenter.displayMarkers();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n googleMap.clear();\n mMap = googleMap;\n\n //create markers using database\n Calendar c = Calendar.getInstance();\n int hour = c.get(Calendar.HOUR_OF_DAY);\n int dayofweek = c.get(Calendar.DAY_OF_WEEK);\n\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n String userPermitType = settings.getString(\"uvaParkingPermitType\", \"\");\n Log.d(\"onMapReady\",\"Permit type: \" + userPermitType);\n\n if (parkingMarkers != null) {\n for (Marker m : parkingMarkers)\n m.remove();\n parkingMarkers.clear();\n } else {\n parkingMarkers = new ArrayList<Marker>();\n }\n ArrayList<MarkerOptions> parkingMarkerOptions = mDbHelper.getParkSpotLists(hour, dayofweek, userPermitType, theMonitor.isRaining());\n for (MarkerOptions m : parkingMarkerOptions ){\n parkingMarkers.add(googleMap.addMarker(m));\n }\n\n // add home address marker\n if (homeAddressLat != 0 && homeAddressLong != 0) {\n if (homeMarker != null) homeMarker.remove();\n homeMarker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(homeAddressLat, homeAddressLong))\n .title(\"Home\")\n .draggable(false)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n }\n\n //center on UVa\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(38.03639, -78.50754), 14));\n\n // enable MyLocationLayer\n enableMyLocation();\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n this.googleMap = googleMap;\n this.googleMap.getUiSettings().setZoomControlsEnabled(true);\n this.googleMap.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener() {\n @Override\n public void onCameraChange(CameraPosition cameraPosition) {\n boolean markersVisibility = false;\n if(cameraPosition.zoom>minZoomLevel){\n// googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(cameraPosition.target, minZoomLevel));\n markersVisibility = true;\n }\n for(Marker marker : mapMarkers){\n marker.setVisible(markersVisibility);\n }\n }\n });\n this.googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(25.0449695d, 121.5087531d), minZoomLevel));\n// this.mapItemClusterManager = new ClusterManager<>(this,this.googleMap);\n// this.googleMap.setOnCameraChangeListener(this.mapItemClusterManager);\n// this.googleMap.setOnMarkerClickListener(this.mapItemClusterManager);\n// this.googleMap.setOnInfoWindowClickListener(this.mapItemClusterManager);\n// this.mapItemClusterManager.setRenderer(new DefaultClusterRenderer<ClusterItem>(this,this.googleMap,this.mapItemClusterManager){\n// @Override\n// protected boolean shouldRenderAsCluster(Cluster<ClusterItem> cluster) {\n// return cluster.getSize()>20;\n// }\n// });\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n assetReadHandler.sendEmptyMessage(0);\n BufferedReader busInfoFileBufferReader = new BufferedReader(new InputStreamReader(getAssets().open(\"GetStopLocation.json\")));\n JSONObject busInfoRawJsonObject = new JSONObject(busInfoFileBufferReader.readLine());\n Message message = new Message();\n message.obj = busInfoRawJsonObject;\n assetReadHandler.sendEmptyMessage(1);\n busStateJJsonArrayHandler.sendMessage(message);\n } catch (JSONException e){\n Log.e(\"y3k\", e.getMessage());\n e.printStackTrace();\n } catch (IOException e1){\n Log.e(\"y3k\", e1.getMessage());\n e1.printStackTrace();\n }\n }\n }).start();\n\n// LatLng sydney = new LatLng(-34, 151);\n// googleMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_map, container, false);\n ((MainActivity) getActivity()).setToolbarBottomVisible(true);\n LocationManager lm = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);\n\n try {\n gps_enabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);\n } catch (Exception ex) {\n }\n\n try {\n network_enabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n } catch (Exception ex) {\n }\n\n if (!gps_enabled && !network_enabled) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setMessage(\"gps network nao abilitado\");\n dialog.setPositiveButton(\"habilitar localizacao\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface paramDialogInterface, int paramInt) {\n Intent myIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n getActivity().startActivity(myIntent);\n }\n });\n dialog.setNegativeButton(\"Cancelar\", null);\n dialog.show();\n }\n\n\n mapFragment = (SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.map);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n mapFragment.getMapAsync(this);\n\n\n mAuth = FirebaseAuth.getInstance();\n\n mLogout = (FloatingActionButton) v.findViewById(R.id.fab_map_logout);\n mLogout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n finishGeoFIre();\n mGoogleApliClient.disconnect();\n mMap.clear();\n mMap.stopAnimation();\n\n mAuth.signOut();\n getFragmentManager().beginTransaction().replace(R.id.rl_content_main, new LoginFragment()).addToBackStack(null).commit();\n\n }\n });\n\n }\n return v;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n }", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }" ]
[ "0.6839269", "0.6742001", "0.6609197", "0.6577383", "0.64237255", "0.642361", "0.6394509", "0.63915294", "0.6358422", "0.62973565", "0.62841034", "0.62802714", "0.6280141", "0.626438", "0.6222661", "0.6206513", "0.6204807", "0.6203376", "0.6200348", "0.6200348", "0.6199764", "0.6186684", "0.61848974", "0.61627865", "0.61625123", "0.61612904", "0.6159947", "0.614285", "0.6141745", "0.61313516", "0.61297756", "0.61100715", "0.6106318", "0.6102489", "0.609475", "0.6085006", "0.60808706", "0.6080409", "0.6079818", "0.60776633", "0.6075594", "0.6068472", "0.6062342", "0.60616225", "0.60586154", "0.6058141", "0.6053348", "0.6052268", "0.60445917", "0.6039001", "0.6038532", "0.60333705", "0.60183805", "0.6018299", "0.60117364", "0.6007957", "0.5997273", "0.5997273", "0.5997273", "0.59953517", "0.59766513", "0.5974546", "0.597052", "0.5970406", "0.5967954", "0.59670687", "0.59669954", "0.5950669", "0.59505594", "0.5944727", "0.5936039", "0.59303", "0.59256184", "0.59212077", "0.5920599", "0.5913981", "0.5913526", "0.5908383", "0.5892783", "0.58867043", "0.5880287", "0.5872641", "0.586779", "0.58663166", "0.58647984", "0.5849205", "0.5845224", "0.5840185", "0.58349687", "0.5833686", "0.5827529", "0.5818051", "0.5816931", "0.58122706", "0.5805774", "0.57948995", "0.5793816", "0.57825935", "0.5778225", "0.5777976" ]
0.72428364
0
Adds a marker to the map for each item in geofenceToAdd
private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){ System.gc(); MainActivity mainActivity = (MainActivity) getActivity(); for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){ if(!currentGeofencesInfoMap.containsKey(e.getKey())) { currentGeofencesInfoMap.put(e.getKey(), e.getValue()); geofenceNamesBeingQueriedForInfo.remove(e.getKey()); String curGeofenceName = e.getKey(); GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName); Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker); LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng()); BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon); MarkerOptions geofenceMarkerOptions = new MarkerOptions() .position(position) .title(curGeofenceName) .icon(icon); Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions); currentGeofenceMarkers.add(curGeofenceMarker); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addMarkers() {\n\n Map<String, ProductDetailsCartItem> restaurantGeolocations = new HashMap<>();\n for (UserProductsItem userProductsItem : userProductsItemList) {\n for (ProductDetailsCartItem productDetailsCartItem : userProductsItem.getCartDetails()) {\n ProductDetailsCartItem restaurantDetails = new ProductDetailsCartItem(productDetailsCartItem.getRestaurantGeolocation(), productDetailsCartItem.getRestaurantAddress());\n restaurantGeolocations.put(productDetailsCartItem.getRestaurantName(), restaurantDetails);\n\n }\n }\n restaurantListServices.removeElements();\n LatLng position = new LatLng(0, 0);\n String address = \"\";\n int restaurantPosition = 0;\n for (HashMap.Entry<String, ProductDetailsCartItem> restaurantDetails : restaurantGeolocations.entrySet()) {\n try {\n String geolocation = restaurantDetails.getValue().getRestaurantGeolocation();\n address = restaurantDetails.getValue().getRestaurantAddress();\n String[] lat_long = geolocation.split(\",\");\n\n double lat = Double.parseDouble(lat_long[0]);\n double lng = Double.parseDouble(lat_long[1]);\n position = new LatLng(lat, lng);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n } finally {\n MarkerOptions mo = new MarkerOptions().position(position).title(restaurantDetails.getKey());\n mo.visible(true);\n // mo.flat(true);\n mo.snippet(address);\n\n Marker marker = googleMap.addMarker(mo);\n marker.showInfoWindow();\n // polylineOptions.add(position);\n RestaurantMapItem restaurantMapItem = new RestaurantMapItem(restaurantDetails.getKey(), restaurantDetails.getValue().getRestaurantAddress(), ++restaurantPosition, position, marker);\n restaurantListServices.addRestaurant(restaurantMapItem);\n\n }\n }\n\n UiSettings settings = googleMap.getUiSettings();\n settings.setMapToolbarEnabled(true);\n settings.setMyLocationButtonEnabled(true);\n settings.setCompassEnabled(true);\n googleMap.setContentDescription(\"restaurants\");\n googleMap.setTrafficEnabled(true);\n\n\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, 12));\n\n googleMap.setOnMyLocationButtonClickListener(this);\n googleMap.setOnMyLocationClickListener(this);\n\n checkPermissions();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n\n restaurantListViewAdapter.notifyDataSetChanged();\n /*if (mMutablePolyline != null) {\n mMutablePolyline.remove();\n }\n mMutablePolyline = googleMap.addPolyline(polylineOptions);\n*/\n }", "private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void addMarkers() {\n\n for (MarkerPropio m : listMarkers) {\n LatLng posicion = new LatLng(m.getLatitud(), m.getLogitud());\n final MarkerOptions marker = new MarkerOptions()\n .position(posicion)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1))\n .title(m.getTitulo())\n .snippet(m.getDescripcion());\n switch (m.getNumImages()){\n case 1:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n break;\n case 2:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker2));\n break;\n case 3:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker3));\n break;\n case 4:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker4));\n break;\n case 5:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker5));\n break;\n case 6:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker6));\n break;\n\n }\n mMap.addMarker(marker);\n hashMarker.put(posicion, m.getId());\n mMap.setOnInfoWindowClickListener(this);\n }\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "private void addMarker() {\n /** Make sure that the map has been initialised **/\n LatLng lt = new LatLng(58.722599, -103.798828);\n float focus = 1f;\n if (null != mMap) {\n ArrayList<EarthQuake> earthQuakes = (ArrayList<EarthQuake>) getIntent().getSerializableExtra(\"quakeArrayList\");\n getIntent().removeExtra(\"quakeArrayList\");\n int position = getIntent().getIntExtra(\"position\", 0);\n if (earthQuakes != null) {\n if(position==0) {\n for (int i = 0; i < earthQuakes.size(); i++) {\n mMap.addMarker(\n new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(i).getDateTime() + \"\\n\" + earthQuakes.get(i).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(i).getLat(), earthQuakes.get(i).getLon()))\n );\n }\n }else if(position>0){\n lt=new LatLng(earthQuakes.get(position).getLat(),earthQuakes.get(position).getLon());\n mMap.addMarker( new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(position).getDateTime() + \"\\n\" + earthQuakes.get(position).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(position).getLat(), earthQuakes.get(position).getLon())));\n focus=4f;\n\n }\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lt, focus));\n\n }\n }", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "public void addMarkers(View view) {\n if (null == hMap) {\n return;\n }\n if (isAdded) {\n Toast.makeText(this, \"Markers has already added.\", Toast.LENGTH_LONG).show();\n return;\n }\n InputStream inputStream = getResources().openRawResource(R.raw.marker_200);\n List<MarkerOptions> markerOptionsList = null;\n try {\n markerOptionsList = new MyItemReader().read(inputStream);\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException.\");\n }\n if (markerOptionsList == null) {\n return;\n }\n for (MarkerOptions item : markerOptionsList) {\n hMap.addMarker(item);\n }\n isAdded = true;\n }", "private void addItems() {\n for (int i = 0; i < 10; i++) {\n double offset = i/60d;\n mClusterManager.addItem(new CrumbClusterItem(new Crumb(new LatLng(5,-5 + offset))));\n }\n Log.d(TAG, \"All items added to map\");\n }", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n for(int i=0; i<coordinatesStringList.length; i+=2){\n pont = new LatLng(Double.parseDouble(coordinatesStringList[i]), Double.parseDouble(coordinatesStringList[i+1]));\n latLngList.add(pont);\n MarkerOptions markerOptions=new MarkerOptions();\n mMap.addMarker(new MarkerOptions().position(pont).title(\"Marker in Sydney\").icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)));\n\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n// Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n// ArrayList<String> addresses = geocoder.getFromLocation(marker.getPosition().latitude(), marker.getPosition().longitude(), 1); //1 num of possible location returned\n// String address = addresses.get(0).getAddressLine(0); //0 to obtain first possible address\n// String city = addresses.get(0).getLocality();\n// String state = addresses.get(0).getAdminArea();\n// String country = addresses.get(0).getCountryName();\n// String postalCode = addresses.get(0).getPostalCode();\n// //create your custom title\n// String title = address +\"-\"+city+\"-\"+state;\n// marker.setTitle(title);\n// marker.showInfoWindow();\n// return true;\n// }\n// });\n }\n\n\n PolylineOptions polylineOptions = new PolylineOptions();\n\n// Create polyline options with existing LatLng ArrayList\n polylineOptions.addAll(latLngList);\n polylineOptions\n .width(5)\n .color(Color.RED);\n\n// Adding multiple points in map using polyline and arraylist\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.addPolyline(polylineOptions);\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "public void initMapMarkers() {\n\t\tmyMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder myLocMarkerBuilder = new MapMarkerBuilder();\n\t\tmyLocMarkerBuilder.setMarkerId(MARKER_ID_MY_LOCATION);\n\t\tmyLocMarkerBuilder.setIsAccuracyCircleSupported(true);\n\t\tmyLocMarkerBuilder.setAccuracyCircleBaseColor(new FColorRGB(32/255f, 173/255f, 229/255f));\n\t\tmyLocMarkerBuilder.setBaseOrder(-206000);\n\t\tmyLocMarkerBuilder.setIsHidden(true);\n\t\tBitmap myLocationBitmap = OsmandResources.getBitmap(\"map_pedestrian_location\");\n\t\tif (myLocationBitmap != null) {\n\t\t\tmyLocMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tmyLocationBitmap.getWidth(), myLocationBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(myLocationBitmap)));\n\t\t}\n\t\tmyLocationMarker = myLocMarkerBuilder.buildAndAddToCollection(myMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(myMarkersCollection);\n\n\t\t// Create context pin marker\n\t\tcontextPinMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder contextMarkerBuilder = new MapMarkerBuilder();\n\t\tcontextMarkerBuilder.setMarkerId(MARKER_ID_CONTEXT_PIN);\n\t\tcontextMarkerBuilder.setIsAccuracyCircleSupported(false);\n\t\tcontextMarkerBuilder.setBaseOrder(-210000);\n\t\tcontextMarkerBuilder.setIsHidden(true);\n\t\tBitmap pinBitmap = OsmandResources.getBitmap(\"map_pin_context_menu\");\n\t\tif (pinBitmap != null) {\n\t\t\tcontextMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tpinBitmap.getWidth(), pinBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(pinBitmap)));\n\t\t\tcontextMarkerBuilder.setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.Top);\n\t\t\tcontextMarkerBuilder.setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal);\n\t\t}\n\t\tcontextPinMarker = contextMarkerBuilder.buildAndAddToCollection(contextPinMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(contextPinMarkersCollection);\n\t}", "private void plottingMarkers(){\r\n if (nameList.size()==0) {\r\n }\r\n else {\r\n for (int i = 0; i < nameList.size(); i++) {\r\n Loc2LatLng = new LatLng(Double.parseDouble(latList.get(i)), Double.parseDouble(lngList.get(i)));\r\n MarkerOptions markerSavedLocations = new MarkerOptions();\r\n markerSavedLocations.title(nameList.get(i));\r\n markerSavedLocations.position(Loc2LatLng);\r\n map.addMarker(markerSavedLocations);\r\n }\r\n }\r\n }", "private void setupMarkers() {\n \t\tGPSFilterPolygon polygon = this.area.getPolygon();\n \n \t\tif ( polygon != null ) {\n \t\t\tfinal LatLngBounds.Builder builder = LatLngBounds.builder();\n \n \t\t\t// Put markers for each edge.\n \t\t\tfor ( GPSLatLng pos : polygon.getPoints() ) {\n \t\t\t\tLatLng point = this.convertLatLng( pos );\n \n \t\t\t\tbuilder.include( point );\n \n \t\t\t\tthis.addMarker( point );\n \t\t\t}\n \n \t\t\t// Add listener that moves camera so that all markers are in users view.\n \t\t\tthis.googleMap.setOnCameraChangeListener( new OnCameraChangeListener() {\n \t\t\t\t@Override\n \t\t\t\tpublic void onCameraChange( CameraPosition arg0 ) {\n \t\t\t\t\t// Move camera.\n \t\t\t\t\tmoveCameraToPolygon( builder, false );\n \n \t\t\t\t\t// Remove listener to prevent position reset on camera move.\n \t\t\t\t\tgoogleMap.setOnCameraChangeListener( null );\n \t\t\t\t}\n \t\t\t} );\n \n \t\t\tthis.updateGuiPolygon();\n \t\t}\n \t}", "private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }", "public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }", "private HashMap<String, Marker> loadNMarkers(){\n HashMap<String, Marker> map = new HashMap<String, Marker>();\n if (googleMap != null) {\n googleMap.clear();\n }\n float alpha = (float) 0.5;\n if (main.state.getBookingState() != State.RESERVE_BIKE_SELECTION_STATE && main.state.getBookingState() != State.RESERVE_DOCK_SELECTION_STATE){\n alpha = 1;\n }\n for (Station station : stationList) {\n float fillLevel = station.getFillLevel(); // change the marker colors depending on the station fill levels\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)).alpha(alpha));\n marker.setTag(station.getId()); // set tag to reference markers later\n map.put(station.getId(), marker);\n }\n return map;\n }", "public void addMarkerToMap(LatLng latLng) {\n Marker marker = googleMap.addMarker(new MarkerOptions().position(latLng)\n .visible(false));\n markers.add(marker);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n gmap = googleMap;\n\n for (Earthquake earthquake: earthquakeList){\n // Create a new coordinates based on the earthquakes geo latitude and geo longitude\n LatLng latLng = new LatLng(earthquake.getGeoLat(), earthquake.getGeoLong());\n // Add the location of the earthquake as a marker on GoogleMaps based on its coordinates\n if (earthquake.getMagnitude() <= 1){\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n }\n else if (earthquake.getMagnitude() <= 2) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_CYAN));\n }\n else if (earthquake.getMagnitude() <= 3) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n else if (earthquake.getMagnitude() <= 4) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n }\n else if (earthquake.getMagnitude() <= 5) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET));\n }\n else if (earthquake.getMagnitude() <= 6) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));\n }\n else if (earthquake.getMagnitude() <= 7) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE));\n }\n else if (earthquake.getMagnitude() <= 8) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n }\n else if (earthquake.getMagnitude() <= 9) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n }\n else {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n }\n\n }\n // Coordinates for London\n LatLng london = new LatLng(51.509865, -0.118092);\n // Moves the camera to the location of London\n // This is to just focus the camera on the UK\n gmap.moveCamera(CameraUpdateFactory.newLatLng(london));\n // Displays the Zoom in and out controls on the Map UI\n gmap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void addRouteMArkers()\n {\n //routeMarker.add(new MarkerOptions().position(new LatLng(geo1Dub,geo2Dub)));\n\n }", "@Override\n public void onMapClick(LatLng latLng) {\n map.addMarker(new MarkerOptions().position(latLng));\n }", "private void addGreenMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\r\n markerOptions.position(latLng);\r\n //markerOptions.title(dt.format(newDate));\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n mMap.addMarker(markerOptions);\r\n }", "public void generateMarkers() {\n\t\tgooglemap.clear();\n\t\tgooglemap.setMyLocationEnabled(true);\n\t\t//generateRouteLine();\n\t\tdouble itinerary_latitude;\n\t\tdouble itinerary_longitude;\n\t\tString itinerary_name;\n\n\t\tLatLng latlng;\n\t\tmarkers = new ArrayList<Marker>();\n\n\t\t//zoom out to make sure all markers are displayed in screen\n\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder(); \n\t\tbuilder.include(new LatLng(parentActivity.getUserLat(),parentActivity.getUserLon()));\n\n\n\t\tfor( int x=parentActivity.getItinerary().itin.size(); x > 0; x-- ){\n\t\t\tEntity obj = parentActivity.getItinerary().itin.get(x-1);\n\t\t\titinerary_latitude = Double.parseDouble( obj.getLatitude() );\n\t\t\titinerary_longitude = Double.parseDouble( obj.getLongitude() );\n\t\t\titinerary_name = obj.getName();\n\t\t\tlatlng = new LatLng(itinerary_latitude, itinerary_longitude);\n\n\t\t\tint markerImage = supportClassObj.chooseMarkerImage(x);\n\t\t\t\n\t\t\tMarker marker = googlemap.addMarker(new MarkerOptions()\n\t\t\t\t.position(latlng)\n\t\t\t\t.snippet(\"Navigate\")\n\t\t\t\t.title(itinerary_name)\n\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(markerImage)));\n\t\t\t\n\t\t\tmarker.showInfoWindow();\n\t\t\tmarker.hideInfoWindow();\n\n\t\t\tmarkers.add(marker);\n\n\t\t\t//setting bounds for googlemap\n\t\t\tbuilder.include(latlng); \n\t\t}\n\t\t\n\t\tgooglemap.setOnMarkerClickListener(new OnMarkerClickListener(){\n\t\t\t@Override\n\t\t\tpublic boolean onMarkerClick(Marker marker) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor( String leg : parentActivity.getItinerary().getPolyline() ){\n\t\t\thandleGetDirectionsResult(decodePoly(leg));\n\t\t}\n\t\t\n\t\t// multipliers for height based off percentage of screen size map will use\n\t\tint width = this.getResources().getDisplayMetrics().widthPixels;\n\t\tint padding = (int) (width * .145);\n\t\tgooglemap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), \n width, \n (int)(this.getResources().getDisplayMetrics().heightPixels * 0.8 * 0.6 * 0.8), padding));\n\t\t\n\t}", "private void addMakerToMap() {\n if (mapboxMap != null) {\r\n mapboxMap.removeAnnotations();\r\n if (res.getData().size() > 0) {\r\n for (UserBasicInfo info : res.getData()) {\r\n if (info.getRole().equalsIgnoreCase(\"student\")) {\r\n if (isStudentSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n if (info.getRole().equalsIgnoreCase(\"teacher\")) {\r\n if (isTeacherSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n }\r\n } else {\r\n getMvpView().noRecordFound();\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng daegu = new LatLng(35.888836, 128.6102997);\n\n for(int i =0; i < items.size();i++){\n Item item = items.get(i);\n double latitude = item.getLatitude();\n double longitude = item.getLongitude();\n //Log.d(\"MYGOOGLEMAP\",\"\"+latitude+\" \"+longitude);\n googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(latitude, longitude))\n .anchor(0.5f, 0.5f)\n .title(item.getItem_name())\n .snippet(item.getItem_price_per_day()+\" won per a day\")\n //.flat(true)\n //.alpha(0.7f)//투명도\n //.icon(BitmapDescriptorFactory.fromBitmap(resizeMapIcons(item.getItem_image(),100,100)))\n );\n\n }\n// gmap.moveCamera(CameraUpdateFactory.newLatLngZoom(startingPoint,16));\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(daegu,14));\n }", "private int addMarkerToMap(Double lat, Double lng, int id, float hue, String title,\n String snippet, boolean draggable) {\n // what if there are too many markers on Google Map ?\n // TODO: https://code.google.com/p/android-maps-extensions/\n Log.i(TAG, \"@addMarkerToMap\");\n LatLng latlng = new LatLng(lat, lng);\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(latlng)\n .icon(BitmapDescriptorFactory.defaultMarker(hue)));\n\n if (!title.isEmpty()){\n marker.setTitle(title);\n }\n if (!snippet.isEmpty()){\n marker.setSnippet(snippet);\n }\n marker.setDraggable(draggable);\n\n markers.put(marker, id);\n return id;\n }", "private void addMarker(MapboxMap mapboxMap) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n IconFactory iconFactory = IconFactory.getInstance(LocateDoctorActivity.this);\n Icon icon = iconFactory.fromResource(R.drawable.mapquest_icon);\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat), Double.parseDouble(selectedLong)));\n markerOptions.snippet(\"Selected Location\");\n markerOptions.setIcon(icon);\n mapboxMap.addMarker(markerOptions);\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 14.0f));\n mMap.addMarker(new MarkerOptions().position(center).title(title));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 14.0f));\n//\n Log.i(\"tag\", otherPoints.size() + \"\");\n for (LatLng p : otherPoints) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.baseline_album_black_18);\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(p.latitude, p.longitude))\n .title(\"\")\n .icon(icon));\n }\n }", "private void addMarker( LatLng point ) {\n \t\tthis.markers.add( this.googleMap.addMarker( this.makeMarkerAt( point ) ) );\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 }", "private void addDoctorsMarkers(MapboxMap mapboxMap, List<HashMap<String, String>> nearbyDoctorsData) {\n\n for (int i = 0; i < nearbyDoctorsData.size(); i++) {\n\n MarkerOptions markerOptions = new MarkerOptions();\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(\n Double.parseDouble(nearbyDoctorsData.get(i).get(\"lat\")),\n Double.parseDouble(nearbyDoctorsData.get(i).get(\"lng\")))\n );\n markerOptions.snippet(nearbyDoctorsData.get(i).get(\"name\"));\n mapboxMap.addMarker(markerOptions);\n\n }\n\n }", "private void addCurrentMarker(double lat, double lon) {\n mLatLng = new LatLng(lat, lon);\n marker_inter = map.addMarker(new MarkerViewOptions()\n .position(mLatLng)\n .title(\"Intervention\")\n .snippet(\"Desc inter\")\n .icon(iconUsr));\n run = 1;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n List<Marker> markerList = new ArrayList<>();\n\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// This displays the different map type styles\n// mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n// mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n\n mBoston = mMap.addMarker(new MarkerOptions()\n .position(BOSTON).title(\"Boston\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mBoston.setTag(0);\n markerList.add(mBoston);\n\n mDallas = mMap.addMarker(new MarkerOptions()\n .position(DALLAS).title(\"Dallas\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n mBoston.setTag(0);\n markerList.add(mDallas);\n\n mNYC = mMap.addMarker(new MarkerOptions()\n .position(NYC).title(\"NYC\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mBoston.setTag(0);\n markerList.add(mNYC);\n\n mMap.setOnMarkerClickListener(this);\n\n for(Marker m : markerList){\n LatLng latLng = new LatLng(m.getPosition().latitude, m.getPosition().longitude);\n mMap.addMarker(new MarkerOptions().position(latLng));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n }\n\n\n\n // Add a marker in Sydney and move the camera\n LatLng boston = new LatLng(42.3140089, -71.2504676);\n mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\"));\n// To change the marker color\n// mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\")\n// .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(boston));\n// To enter the Zoom on the map\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(boston, 20));\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n\n eventListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n String lat = postSnapshot.child(\"lat\").getValue(Double.class) + \"\";\n String lon = postSnapshot.child(\"lon\").getValue(Double.class) + \"\";\n String data = postSnapshot.child(\"val\").getValue(Integer.class) + \"\";\n list.add(new Item(lat, lon, data));\n Log.e(\"TAG\",lat + lon + data);\n map.addMarker(new MarkerOptions().position(new LatLng(Double.valueOf(lat), Double.valueOf(lon))).title(data));\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n\n myRef.addValueEventListener(eventListener);\n\n for (Item e : list) {\n Log.e(\"TAG\",\"Add\");\n }\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "private void createMarkers(Bundle savedInstanceState) {\n List<MarkerDTO> markerDTOs = null;\n // add the OverlayItem to the ArrayItemizedOverlay\n ArrayList<DescribedMarker> markers = null;\n if (savedInstanceState != null) {\n markerDTOs = savedInstanceState.getParcelableArrayList(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n } else {\n markerDTOs = getIntent().getParcelableArrayListExtra(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n // retrieve geopoint if missing\n if (getIntent().getExtras() == null) {\n return;\n }\n featureIdField = getIntent().getExtras().getString(PARAMETERS.FEATURE_ID_FIELD);\n if (featureIdField == null) {\n featureIdField = FEATURE_DEFAULT_ID;\n }\n if (!MarkerUtils.assignFeaturesFromDb(markers, featureIdField)) {\n Toast.makeText(this, R.string.error_unable_getfeature_db, Toast.LENGTH_LONG).show();\n canConfirm = false;\n // TODO dialog : download features for this area?\n }\n }\n // create an ItemizedOverlay with the default marker\n overlayManager.getMarkerOverlay().getOverlayItems().addAll(markers);\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "public boolean createMarker(ArrayList<LocationsData>datas) {\n\n boolean isNotEmpty= true;\n if (isNotEmpty) {\n placesMarker= placesMap.addMarker(new MarkerOptions()\n .position(new LatLng(datas.get(0).locationLatitude,datas.get(0).locationLongitude))\n .title(datas.get(0).locationName));\n placesMarker.showInfoWindow();\n placesMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"Places Marker\",marker.getTitle()+\"\\n\"+places.toString());\n\n LocationsData data= new LocationsData();\n data.set_id(places.get(0).get_id());\n data.setImage_path(places.get(0).getImage_path());\n data.setLocationName(places.get(0).getLocationName());\n data.setLocationLatitude(places.get(0).getLocationLatitude());\n data.setLocationLongitude(places.get(0).getLocationLongitude());\n data.setLocationProducts(places.get(0).getLocationProducts());\n\n Intent i= new Intent(MainActivity.this,PlaceDetailsActivity.class);\n i.putExtra(\"places\",data);\n startActivity(i);\n\n Log.i(\"Intent\",i.toString());\n Log.i(\"onMarkerClick\",\"Successfull, Title: \"+marker.getTitle());\n Log.i(\"Getting Item Id\",String.valueOf(places.get(0).get_id()));\n return false;\n }\n });\n }else {\n isNotEmpty=false;\n }\n return isNotEmpty;\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String newLocation = null;\n Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(latLng.latitude, latLng.longitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n newLocation = addresses.get(0).getLocality();\n }\n\n // Set new marker attributes\n MapLocation newMarker = new MapLocation();\n newMarker.setLocation(newLocation);\n newMarker.setLatitude(latLng.latitude);\n newMarker.setLongitude(latLng.longitude);\n\n // Add to firebase\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = database.getReference();\n DatabaseReference newRef = dbRef.push();\n newRef.setValue(newMarker);\n }", "private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }", "private void addPlaceLocationMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n mMap.clear();\n markerOptions.title(\"Current Position\");\n markerOptions.getPosition();\n markerOptions.title(locationName);\n mMap.addMarker(markerOptions);\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String markerName = mTextField.getText().toString();\n\n // check if a marker name is set\n if(markerName.isEmpty()) {\n markerName = \"Marker\" + Integer.toString(numberOfMarkers);\n }\n\n // add marker\n Marker marker = mMap.addMarker(\n new MarkerOptions()\n .position(latLng)\n .title(markerName)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED))\n );\n\n // add halo\n Circle halo = mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(100.0)\n .strokeColor(Color.RED)\n .visible(false)\n );\n\n // add marker and halo to tracked markers\n mMarkerHalos.put(marker, halo);\n\n // lat and long to separate values\n double markerLat = latLng.latitude;\n double markerLong = latLng.longitude;\n\n // save marker to shared preferences\n Set<String> positionSet = new HashSet<String>();\n positionSet.add(Double.toString(markerLat));\n positionSet.add(Double.toString(markerLong));\n mPrefEditor.putStringSet(markerName, positionSet);\n mPrefEditor.apply();\n\n // clear text field\n mTextField.setText(\"\");\n\n // increase marker counter\n ++numberOfMarkers;\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "private void updateMyMarkers(List<MarkerOptions> markers) {\n if(myGoogleMap == null) return;\n\n myGoogleMap.clear();\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (MarkerOptions m : markers) {\n myGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(m.getPosition(), 15), 1000, null);\n myGoogleMap.addMarker(new MarkerOptions()\n .position(m.getPosition())\n .title(m.getTitle())/*.snippet(m.getSnippet())*/.icon(m.getIcon()));\n builder.include(m.getPosition());\n }\n\n LatLngBounds bounds = builder.build();\n int padding = 0; // offset from edges of the map in pixels\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);\n myGoogleMap.animateCamera(cu);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n // Add a marker in Sydney and move the camera\n\n for( JSONObject jo : this.ubicaciones )\n {\n try{\n Log.i(\"ubicacion\",\n \" lat : \" + jo.get(\"lat\")\n + \" lon : \" + jo.get(\"lon\")\n + \" alt : \" + jo.get(\"alt\")\n );\n LatLng marca = new LatLng( jo.getDouble(\"lat\"), jo.getDouble(\"lon\") );\n\n mMap.addMarker(\n new MarkerOptions()\n .position(marca)\n .icon(\n BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_BLUE)\n )\n );\n// .title(\"Marker in Sydney\"));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(marca));\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "public void updateMarkers() {\n\t\tArrayList<Parking> items = getMarkersForLocation();\n\t\tfor (Parking item : items) {\n\t\t\tint id = item.getParkingId();\n\t\t\tParking inHashItem = parkingsArray.get(id);\n\t\t\tparkingsArray.delete(id);\n\t\t\t// if the item already exists, update the position\n\t\t\tif (inHashItem != null) {\n\t\t\t\tLog.d(\"Markers\", \"An old item\");\n\t\t\t\tparkingsArray.put(id, inHashItem); // put it at the end\n\t\t\t} else {\n\t\t\t\tLog.d(\"Markers\", \"A new item\");\n\t\t\t\titem.addMarkerToMap(map);\n\t\t\t\tparkingsArray.put(id, item);\n\t\t\t}\n\t\t}\n\n\t\t// remove extras\n\t\tremoveOldMarkers();\n\t}", "private void addMarker(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .setIcon(icon)\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "public void add(GeometricalObject object);", "@Override\n\tpublic void addMarkers(World world, Random random, ICoords coords) {\n\t\treturn;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n List<Marker> markerList= new ArrayList<>();\n\n //list\n mIpoh = mMap.addMarker(new MarkerOptions()\n .position(Ipoh).title(\"Ipoh\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\n mIpoh.setTag(0);\n markerList.add(mIpoh);\n\n mJohor = mMap.addMarker(new MarkerOptions()\n .position(Johor).title(\"Johor\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mJohor.setTag(0);\n markerList.add(mJohor);\n\n mSingapore = mMap.addMarker(new MarkerOptions()\n .position(Singapore).title(\"Singapore\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET)));\n mSingapore.setTag(0);\n markerList.add(mSingapore);\n\n mPulauPinang = mMap.addMarker(new MarkerOptions()\n .position(PulauPinang).title(\"Pulau Pinang\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE)));\n mPulauPinang.setTag(0);\n markerList.add(mPulauPinang);\n\n mKualaLumpur = mMap.addMarker(new MarkerOptions()\n .position(KualaLumpur).title(\"Kuala Lumpur\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n mKualaLumpur.setTag(0);\n markerList.add(mKualaLumpur);\n\n //用for loop来加进去\n for (Marker m : markerList){\n LatLng latLng = new LatLng(m.getPosition().latitude, m.getPosition().longitude);\n mMap.addMarker(new MarkerOptions().position(latLng));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 2));\n //Log.d(\"Marker:\", m.getTitle());\n }\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @Override\n public void onLocationChanged(@NonNull Location location) {\n// mMap.clear();\n//\n// // Add a marker in Sydney and move the camera\n// LatLng newLocation = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addMarker(new MarkerOptions().position(newLocation).title(\"New Location\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(newLocation));\n }\n };\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n\n }else{\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n }\n\n\n }", "private void addMarkers(List<LatLng> path) {\n MarkerOptions startMarker = new MarkerOptions()\n .title(getString(R.string.session_marker_start))\n .position(path.get(0))\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n MarkerOptions endMarker = new MarkerOptions()\n .title(getString(R.string.session_marker_end))\n .position(path.get(path.size() - 1))\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n mGoogleMap.addMarker(startMarker);\n mGoogleMap.addMarker(endMarker);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n for (int i = 0; i < virtualLoc.size(); i++) {\n mMap.addMarker(new MarkerOptions().position(virtualLoc.get(i)).title(names.get(i)));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(20.0f));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(virtualLoc.get(i)));\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(virtualLoc.get(0),15));\n\n /*for (int i = 0; i < names.size(); i++) {\n //LatLng location = new LatLng(locations.get(i).latitude, locations.get(i).longitude);\n googleMap.addMarker(new MarkerOptions()\n .position(locations.get(i))\n .title(names.get(i)));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(locations.get(i)));\n }*/\n }", "private void addMarkersToMap(DirectionsResult results, GoogleMap mMap) {\n //Adds a marker based on the origin based on the route\n mMap.addMarker(new MarkerOptions().position(new LatLng(results.routes[overview].legs[overview].startLocation.lat,results.routes[overview].legs[overview].startLocation.lng)).title(results.routes[overview].legs[overview].startAddress));\n //Adds a marker based on the destination based on the route\n mMap.addMarker(new MarkerOptions().position(new LatLng(results.routes[overview].legs[overview].endLocation.lat,results.routes[overview].legs[overview].endLocation.lng)).title(results.routes[overview].legs[overview].startAddress).snippet(getEndLocationTitle(results)));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n databaseReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n trackingLocationsList.clear();\n Iterable<DataSnapshot> tracks = dataSnapshot.child(id).getChildren();\n for (DataSnapshot info : tracks) {\n LatLong latLong = info.getValue(LatLong.class);\n trackingLocationsList.add(latLong);\n }\n int i=0;\n LatLng previous,next = null;\n for(LatLong value : trackingLocationsList){\n if(i==0){\n previous = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(previous).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(previous));\n }\n else{\n previous=next;\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(next).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(next));\n }\n mMap.addPolyline(new PolylineOptions()\n .add(previous,next)\n .width(5)\n .color(Color.RED));\n }\n }\n\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "public void loadPlaces() {\n\n if (getActivity() == null || !isAdded())\n return;\n\n //clear markers\n markers.clear();\n map.clear();\n\n //add new markers\n for (int i = 0; i < places.size(); i++) {\n LatLng coordinate = new LatLng(places.get(i).gpslat, places.get(i).gpslng);\n\n //add marker with no icon\n Marker marker;\n\n marker = map.addMarker(new MarkerOptions().position(coordinate).icon(BitmapDescriptorFactory.fromBitmap(resizeMapIcons(\"pin\", 100))));\n marker.setTag(i);\n markers.add(marker);\n\n //load icon from server using the picasso library\n places.get(i).loadPinBitmap(context, i, new Place.PinLoadedListener() {\n @Override\n public void onLoaded(Bitmap bitmap, Place place, int i) {\n markers.get(i).setIcon(BitmapDescriptorFactory.fromBitmap(bitmap));\n }\n\n @Override\n public void onFailed(Place place, int i) {\n\n }\n });\n }\n\n //create list\n mAdapter = new MapPlaceAdapter(places, new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n //open ad. If ad not open attempt to open rate\n if (!((MainActivity) getActivity()).loadInterstitial()) {\n if (!AskRate()) {\n System.out.println(\"click: \" + places.get(i).id + \" \" + places.get(i).name);\n Intent intent = new Intent(context, SinglePlaceActivity.class);\n intent.putExtra(ITEM_KEY, places.get(i).id);\n startActivity(intent);\n }\n }\n }\n }, context);\n mRecyclerView.swapAdapter(mAdapter, false);\n scrollListener.resetState();\n\n //set marker to first item\n if (places.size() > 0) {\n Place p = places.get(0);\n gotoMap(p.gpslat, p.gpslng);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng korea = new LatLng(0,0);\n LatLng busan = new LatLng(ListOfLat[0], ListOfLong[0]);\n mMap.addMarker(new MarkerOptions().position(busan).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"Point : 1\"));\n for(int i=1; i<=size; i++){\n korea = new LatLng(ListOfLat[i-1], ListOfLong[i-1]);\n busan = new LatLng(ListOfLat[i], ListOfLong[i]);\n PolylineOptions aa = new PolylineOptions().add(korea).add(busan);\n mMap.addMarker(new MarkerOptions().position(busan).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"Point : \"+(i+1)));\n mMap.addPolyline(aa);\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(busan));\n }", "private void setExtraMapElements() {\n \t\tif (mGoogleMap == null && mLocationsList == null) {\n \t\t\treturn;\n \t\t}\n \t\tfor (int i = 0; i < mLocationsList.size(); i++) {\n \t\t\tMarkerOptions marker = new MarkerOptions().position(mLocationsList\n \t\t\t\t\t.get(i).mPosition);\n \t\t\tif (mLocationsList.get(i).mIcono != 0) {\n \t\t\t\tmarker.icon(BitmapDescriptorFactory.fromResource(mLocationsList\n \t\t\t\t\t\t.get(i).mIcono));\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mNombre != null) {\n \t\t\t\tmarker.title(mLocationsList.get(i).mContenido.mNombre);\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mSnippet != null) {\n \t\t\t\tmarker.snippet(mLocationsList.get(i).mContenido.mSnippet);\n \t\t\t}\n \n \t\t\tmGoogleMap.addMarker(marker);\n \t\t}\n \t\tmGoogleMap.setInfoWindowAdapter(new MarkerAdapter());\n \t}", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "private Marker createMarker(final int a, final String id1, String lat, String lng, final String title) {\n\n mMarkerMap.put(marker, a);\n mMarkerMap1.put(marker, title);\n\n Log.e(\"Data\", \"\" + lat + \"-->>>>\" + lng + \"--->>\" + title);\n\n if (a == 999999999) {\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title)\n .anchor(0.5f, 0.5f));\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Hospitals\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.hosp);\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Fire_stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.fire11515);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Police Stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.police55);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n }\n\n marker.showInfoWindow();\n\n return marker;\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n // Add polylines to the map.\n // Polylines are useful to show a route or some other connection between points.\n Polyline polyline1;\n// polyline1 = googleMap.addPolyline(new PolylineOptions()\n// .clickable(true)\n// .add(\n// new LatLng(5.7070, 6.7909),\n// new LatLng(5.7360, 6.8834),\n// new LatLng(6.1111, 6.5421)\n// ));\n PolylineOptions polylineOptions = new PolylineOptions();\n// for (po : init){\n polylineOptions.add(new LatLng(6.572997708, 3.319332056)).clickable(true);\n// polylineOptions.add(new LatLng(5.7070, 6.7909)).clickable(true);\n// polylineOptions.add(new LatLng(5.7360, 6.8834)).clickable(true);\n// polylineOptions.add(new LatLng(6.1111, 6.5421)).clickable(true);\n polylineOptions.add(new LatLng(4.9690, 8.3470)).clickable(true);\n\n// }\n\n polyline1 = googleMap.addPolyline(polylineOptions);\n\n// List<String> ll = new ArrayList<>();\n// ll.add(\"5.7070, 6.7909\");\n// ll.add(\"5.7360, 6.8834\");\n// ll.add(\"6.1111, 6.5421\");\n// mSydney = mMap.addMarker(new MarkerOptions()\n// .position(SYDNEY)\n// .title(\"Sydney\");\n\n // Store a data object with the polyline, used here to indicate an arbitrary type.\n polyline1.setTag(\"A\");\n\n MarkerOptions options = new MarkerOptions();\n// options.position(new LatLng(5.7070, 6.7909));\n// options.position(new LatLng(5.7360, 6.8834));\n// options.position(new LatLng(6.1111, 6.5421));\n\n googleMap.addMarker(options.position(new LatLng(5.7070, 6.7909)));\n googleMap.addMarker(options.position(new LatLng(5.7360, 6.8834)));\n googleMap.addMarker(options.position(new LatLng(6.1111, 6.5421)));\n // Style the polyline.\n stylePolyline(polyline1);\n\n// Polyline polyline2 = googleMap.addPolyline(new PolylineOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-29.501, 119.700),\n// new LatLng(-27.456, 119.672),\n// new LatLng(-25.971, 124.187),\n// new LatLng(-28.081, 126.555),\n// new LatLng(-28.848, 124.229),\n// new LatLng(-28.215, 123.938)));\n// polyline2.setTag(\"B\");\n// stylePolyline(polyline2);\n\n // Add polygons to indicate areas on the map.\n// Polygon polygon1 = googleMap.addPolygon(new PolygonOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-27.457, 153.040),\n// new LatLng(-33.852, 151.211),\n// new LatLng(-37.813, 144.962),\n// new LatLng(-34.928, 138.599)));\n // Store a data object with the polygon, used here to indicate an arbitrary type.\n// polygon1.setTag(\"alpha\");\n // Style the polygon.\n// stylePolygon(polygon1);\n\n// Polygon polygon2 = googleMap.addPolygon(new PolygonOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-31.673, 128.892),\n// new LatLng(-31.952, 115.857),\n// new LatLng(-17.785, 122.258),\n// new LatLng(-12.4258, 130.7932)));\n// polygon2.setTag(\"beta\");\n// stylePolygon(polygon2);\n\n // Position the map's camera near Alice Springs in the center of Australia,\n // and set the zoom factor so most of Australia shows on the screen.\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(5.7070, 6.7909), 4));\n\n // Set listeners for click events.\n googleMap.setOnPolylineClickListener(this);\n googleMap.setOnPolygonClickListener(this);\n\n // Set a listener for marker click.\n googleMap.setOnMarkerClickListener(this);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n if (!multi) {\n LatLng localEntrega = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(localEntrega).title(\"Local de Entrega\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localEntrega, 14));\n } else {\n myapp = (EntregasApp)getApplicationContext();\n manager = new Manager(myapp);\n LatLng primeiraEntrega;\n\n primeiraEntrega = new LatLng(0,0);\n\n int i = 0;\n List<Documento> documentos = manager.findDocumentoByDataRomaneio(myapp.getDate());\n\n for (Documento documento : documentos ){\n LatLng localEntrega;\n if (documento.getDestinatario().getLatitude()!=null){\n i = i + 1;\n latitude = Double.valueOf(documento.getDestinatario().getLatitude());\n longitude = Double.valueOf(documento.getDestinatario().getLongitude());\n\n localEntrega = new LatLng(latitude, longitude);\n\n if(i==1){\n primeiraEntrega = new LatLng(latitude,longitude);\n }\n\n mMap.addMarker(new MarkerOptions().position(localEntrega)\n .title(documento.getDestinatario().getNome()));\n }\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(primeiraEntrega, 10));\n\n // Check if we were successful in obtaining the map.\n /*\n if (mMap != null) {\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location arg0) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.truck);\n mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"Minha Localização\").icon(icon));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(arg0.getLatitude(), arg0.getLongitude()), 6));\n }\n });\n\n\n }\n\n */\n\n }\n\n }", "private void ShowNearbyPlaces(List<HashMap<String, String>> nearbyPlacesList) {\n for (int i = 0; i < nearbyPlacesList.size(); i++) {\n Log.d(\"onPostExecute\",\"Entered into showing locations\");\n MarkerOptions markerOptions = new MarkerOptions();\n HashMap<String, String> googlePlace = nearbyPlacesList.get(i);\n double lat = Double.parseDouble(googlePlace.get(\"lat\"));\n double lng = Double.parseDouble(googlePlace.get(\"lng\"));\n String placeName = googlePlace.get(\"place_name\");\n String vicinity = googlePlace.get(\"vicinity\");\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.snippet(vicinity);\n\n if (this.mKind == \"police\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n else if (this.mKind == \"hospital\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n mMap.addMarker(markerOptions);\n }\n mMap.animateCamera(CameraUpdateFactory.zoomTo(12));\n }", "private void addCrimeMarker(Crime c){\n LatLng coor = new LatLng(c.Lat, c.Long);\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"weee gotta nulllll marker!!!!\");\n }\n c.setVisable(true);\n Log.i(TAG, \"MockCrime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }", "void add(GeometricalObject object);", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "public void addMap(GridMap map){\n mapsList.add(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "public static void setMarker() {\n\t\tfor (Picture p : pictures) {\n\t\t\tif (p.getLon() < 200 && p.getLat() < 200) {\n\t\t\t\tMarker myMarker = mMap.addMarker(\n\t\t\t\t\t\tnew MarkerOptions()\n\t\t\t\t\t\t\t\t.position(new LatLng(p.getLat(), p.getLon()))\n\t\t\t\t\t\t\t\t.visible(true)\n\t\t\t\t\t\t//.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_brightness_1_black_24dp))\n\t\t\t\t);\n\t\t\t\tmarkers.put(myMarker, p);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add LatLng values for all the points of interest on the map.\n LatLng center = new LatLng(53.411068, -2.982297);\n LatLng james = new LatLng(53.412226, -2.981376);\n LatLng tom = new LatLng(53.413403, -2.980732);\n LatLng marybone = new LatLng(53.411238, -2.987441);\n LatLng library = new LatLng(53.411137, -2.988401);\n LatLng henry = new LatLng(53.410551, -2.984382);\n LatLng cherie = new LatLng(53.412666, -2.981698);\n LatLng tower = new LatLng(53.410537, -2.974883);\n LatLng peter = new LatLng(53.412086, -2.980728);\n LatLng kingsway = new LatLng(53.409686, -2.985622);\n\n // Add properties for the camera positioning.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 15));\n\n\n // Add markers for each point on the map.\n mMap.addMarker(new MarkerOptions().position(james).title(\"James Parson's Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tom).title(\"Tom Reilly Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(marybone).title(\"Marybone Lecture Theatre\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(library).title(\"Avril Robarts LRC\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(henry).title(\"Henry Cotton Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(cherie).title(\"Cherie Booth Lecture Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tower).title(\"LJMU Tower\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(peter).title(\"Peter Jost Enterprise Center\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(kingsway).title(\"Kingsway House\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n }", "public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }", "private void drawMarkers () {\n // Danh dau chang chua di qua\n boolean danhDauChangChuaDiQua = false;\n // Ve tat ca cac vi tri chang tren ban do\n for (int i = 0; i < OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().size(); i++) {\n\n TourTimesheet timesheet = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().get(i);\n // Khoi tao vi tri chang\n LatLng position = new LatLng(timesheet.getmBuildingLocation().latitude, timesheet.getmBuildingLocation().longitude);\n // Thay doi icon vi tri chang\n MapNumberMarkerLayoutBinding markerLayoutBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.map_number_marker_layout, null, false);\n // Thay doi so thu tu timesheet\n markerLayoutBinding.number.setText(String.valueOf(i + 1));\n // Thay doi trang thai markup\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, thay doi mau sac markup thanh xam\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n } else if (dateEqual == 1) {\n // Tour chua dien ra, thay doi mau sac markup thanh vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\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(timesheet.getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheet.getmEndTime());\n if(srcStartEqual == 1){\n // Chang chua di qua\n if (danhDauChangChuaDiQua == true) {\n // Neu la chang sau chang sap toi thi chuyen thanh mau mau vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Neu la chang ke tiep thi giu nguyen mau do\n danhDauChangChuaDiQua = true;\n }\n } else if(srcStartEqual == -1 && srcEndEqual == 1){\n // Chang dang di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);\n } else{\n // Chang da di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n }\n }\n // Marker google map\n View markerView = markerLayoutBinding.getRoot();\n // Khoi tao marker\n MarkerOptions markerOptions = new MarkerOptions()\n .draggable(false)\n .title(timesheet.getmBuildingName() + '-' + timesheet.getmClassroomName())\n .position(position)\n .icon(BitmapDescriptorFactory.fromBitmap(getMarkerBitmapFromView(markerView)));\n if (timesheet.getmClassroomNote() != null && !timesheet.getmClassroomNote().equals(\"\") && !timesheet.getmClassroomNote().equals(\"null\")) {\n markerOptions.snippet(timesheet.getmClassroomNote());\n }\n mMap.addMarker(markerOptions);\n // add marker to the array list to display on AR Camera\n markerList.add(markerOptions);\n // Goi su kien khi nhan vao tieu de marker\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n // TODO: Chuyen sang man hinh thong tin chang khi nhan vao tieu de chang\n openTimesheetInfo(marker.getTitle());\n }\n });\n }\n }", "@Override\n public void onMapLoaded() {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13.3f));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n }", "private void getMarkers() {\n\n // Read from the database\n databaseRef.addValueEventListener(new ValueEventListener() {\n /**\n * listener to get data of vendors from firebase db\n * @param dataSnapshot\n */\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n HashMap<String, Object> values = (HashMap<String, Object>) dataSnapshot.getValue();\n for (String UserId : values.keySet()) {\n HashMap<String, Object> userInfo = (HashMap<String, Object>) values.get(UserId);\n\n if (userInfo.get(\"Type\").equals(\"Vendor\")\n && userInfo.containsKey(\"Location\")\n && userInfo.containsKey(\"Name Of Food Truck\")\n && userInfo.containsKey(\"Type Of Food\")\n && userInfo.containsKey(\"Active\")) {\n\n // get info from vendor\n String vendorName = (String) userInfo.get(\"Name Of Food Truck\");\n String foodType = (String) userInfo.get(\"Type Of Food\");\n String coords = (String) userInfo.get(\"Location\");\n String uniqueID = (String) userInfo.get(\"UniqueID\");\n boolean isActive = (boolean)userInfo.get(\"Active\");\n Location l = new Location(coords);\n\n // make green marker if active\n if (isActive) {\n // add marker to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(l.getLat(), l.getLng()))\n .snippet(foodType)\n .title(vendorName)\n .icon(BitmapDescriptorFactory.defaultMarker(\n BitmapDescriptorFactory.HUE_GREEN)))\n .setTag(uniqueID);\n }\n else {\n // add marker to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(l.getLat(), l.getLng()))\n .snippet(foodType)\n .title(vendorName))\n .setTag(uniqueID);\n }\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Log.d(\"markerOnClick\", \"marker clicked\");\n String uniqueID = (String) marker.getTag();\n Intent i = new Intent(MapsActivity.this, VendorProfileForCustomerActivity.class);\n i.putExtra(\"vendorUniqueID\", uniqueID);\n startActivity(i);\n }\n });\n\n }\n }\n\n }\n\n /**\n * handles error from db\n * @param error\n */\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n Drawable firstDrawable = getResources().getDrawable(R.drawable.chile_flag);\n BitmapDescriptor firstBitmap = getMarkerIconFromDrawable(firstDrawable);\n LatLng chile = new LatLng(31.761, -71.318);\n mMap.addMarker(new MarkerOptions().position(chile).title(\"Marker in Chile\")).setIcon(firstBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(chile));\n\n Drawable secondDrawable = getResources().getDrawable(R.drawable.sydney_icon);\n BitmapDescriptor secondBitmap = getMarkerIconFromDrawable(secondDrawable);\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")).setIcon(secondBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n Drawable thirdDrawable = getResources().getDrawable(R.drawable.home_icon);\n BitmapDescriptor thirdBitmap = getMarkerIconFromDrawable(thirdDrawable);\n LatLng home = new LatLng(40.685, -73.714);\n mMap.addMarker(new MarkerOptions().position(home).title(\"Marker at Home\")).setIcon(thirdBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(home));\n\n Drawable fourthDrawable = getResources().getDrawable(R.drawable.rollercoaster_icon);\n BitmapDescriptor fourthBitmap = getMarkerIconFromDrawable(fourthDrawable);\n LatLng sixflags = new LatLng(40.137, -74.440);\n mMap.addMarker(new MarkerOptions().position(sixflags).title(\"Marker at SixFlags\")).setIcon(fourthBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sixflags));\n\n Drawable fifthDrawable = getResources().getDrawable(R.drawable.malawi_icon);\n BitmapDescriptor fifthBitmap = getMarkerIconFromDrawable(fifthDrawable);\n LatLng malawi = new LatLng(-13.268, 33.930);\n mMap.addMarker(new MarkerOptions().position(malawi).title(\"Marker in Malawi\")).setIcon(fifthBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(malawi));\n\n Drawable sixthDrawable = getResources().getDrawable(R.drawable.nicaragua_icon);\n BitmapDescriptor sixthBitmap = getMarkerIconFromDrawable(sixthDrawable);\n LatLng nicaragua = new LatLng(12.146, -86.273);\n mMap.addMarker(new MarkerOptions().position(nicaragua).title(\"Marker in Nicaragua\")).setIcon(sixthBitmap);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(nicaragua));\n\n\n\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setMyLocationButtonEnabled(true);\n\n Geocoder coder = new Geocoder(getApplicationContext());\n List<Address> address;\n LatLng p1 = null;\n\n try {\n // May throw an IOException\n address = coder.getFromLocationName(\"3650 E. Olympic Blvd, Los Angeles, CA 90023\", 5);\n if (address != null) {\n Address location = address.get(0);\n p1 = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(p1).title(\"Marker at JungleBoys\"));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, 1020);\n } else{\n mMap.setMyLocationEnabled(true);\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker at current Location\"));\n // mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker in NYC\").icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher_round)));\n }\n }\n });\n }\n }", "public void addToMapsArrayContainsThisPlaceOfInterest(Map map)\r\n\t{\r\n\t\tthis._mapsArrayContainsThisPlaceOfInterest.add(map);\r\n\t}", "public void onMapSearch(View view) {\n\n EditText locationSearch = (EditText) findViewById(R.id.arrival);\n String location = locationSearch.getText().toString();\n List<Address>addressList = null;\n\n if (location != null || !location.equals(\"\")) {\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n\n } catch (IOException e) {\n Toast.makeText(this,\"Destination not found\",Toast.LENGTH_SHORT).show();\n\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n MarkerPoints.add(latLng);\n Toast.makeText(MapsActivity.this,\"added position 2 \"+MarkerPoints.size(),Toast.LENGTH_SHORT).show();\n\n mMap.addMarker(new MarkerOptions().position(latLng).draggable(true).title(location+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\").icon(BitmapDescriptorFactory.fromResource(R.drawable.flag)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n //listClients.add(new Client(R.drawable.flag,\"Nasser\",\"client2 requesting cab\",100,address.getLatitude(), address.getLongitude()));\n //Toast.makeText(MapsActivity.this,\"client attended at \"+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\",Toast.LENGTH_SHORT).show();\n\n\n\n /* if (MarkerPoints.size() > 2) {\n // MarkerPoints.clear();\n mMap.clear();\n }*/\n\n\n // Checks, whether start and end locations are captured\n if (MarkerPoints.size() >= 2) {\n LatLng origin = MarkerPoints.get(0);\n LatLng dest = MarkerPoints.get(MarkerPoints.size()-1);\n\n // Getting URL to the Google Directions API\n String url = getUrl(origin, dest);\n Log.d(\"onMapClick\", url.toString());\n FetchUrl FetchUrl = new FetchUrl();\n\n // Start downloading json data from Google Directions API\n FetchUrl.execute(url);\n //move map camera\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(origin));\n //mMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n build_retrofit_and_get_response(\"driving\");\n\n final View mapView = getSupportFragmentManager().findFragmentById(R.id.map).getView();\n if (mapView.getViewTreeObserver().isAlive()) {\n mapView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @SuppressLint(\"NewApi\")\n @Override\n public void onGlobalLayout() {\n LatLngBounds.Builder bld = new LatLngBounds.Builder();\n for (int i = 0; i < MarkerPoints.size(); i++) {\n LatLng ll = new LatLng(MarkerPoints.get(i).latitude, MarkerPoints.get(i).longitude);\n bld.include(ll);\n }\n LatLngBounds bounds = bld.build();\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 70));\n mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n\n }\n });\n }\n }\n\n }\n }", "public MapObject addMarker(EncodedImage icon, Coord location, String text, String longText, ActionListener onClick) {\n if(internalNative != null) {\n byte[] iconData = null;\n if(icon != null) {\n iconData = icon.getImageData();\n }\n long key = internalNative.addMarker(iconData, location.getLatitude(), location.getLongitude(), text, longText, onClick != null);\n MapObject o = new MapObject();\n o.mapKey = key;\n o.callback = onClick;\n markers.add(o);\n return o;\n } else {\n if(internalLightweightCmp != null) {\n PointLayer pl = new PointLayer(location, text, icon);\n if(points == null) {\n points = new PointsLayer();\n internalLightweightCmp.addLayer(points);\n points.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n PointLayer point = (PointLayer)evt.getSource();\n for(MapObject o : markers) {\n if(o.point == point) {\n if(o.callback != null) {\n o.callback.actionPerformed(new ActionEvent(o));\n }\n return;\n }\n }\n }\n });\n points.addPoint(pl);\n MapObject o = new MapObject();\n o.point = pl;\n o.callback = onClick;\n markers.add(o);\n return o;\n } \n } else {\n // TODO: Browser component\n }\n }\n return null;\n }", "private void agregarMarcador(double lat, double lon, Meteo maMeteo) {\n if(mMap != null){\n if(marker != null){\n marker.setPosition(new LatLng(lat, lon));\n marker.setTag(maMeteo);\n }else{\n marker = mMap.addMarker(new MarkerOptions().position(new LatLng(lat,lon)));\n marker.setTag(maMeteo);\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(lat, lon)));\n }\n }", "private void addPoint( LatLng point ) {\n \t\tthis.addMarker( point );\n \t\tthis.commitPolygon();\n \t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n try {\n Thread.sleep(1500);\n } catch(InterruptedException e) {\n }\n for(int i = 0; i < crimes.size(); i++) {\n LatLng currentCrime = new LatLng(crimes.get(i).getY(),crimes.get(i).getX());\n mMap.addMarker(new MarkerOptions().position(currentCrime).title(crimes.get(i).getOffense()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentCrime));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentCrime, zoomLevel));\n }\n\n }", "public void addPlace(String key, Place place)\n {\n if(mMap!=null) {\n Double lon, lat;\n lat = Double.parseDouble(place.getLat());\n lon = Double.parseDouble(place.getLon());\n String name = place.getName();\n String type = place.getType();\n LatLng placeLatLng = new LatLng(lat, lon);\n\n if (placesMarkers.containsKey(key)) {\n //Already Marker is present,\n\n //Just update the marker\n placesMarkers.get(key).setPosition(placeLatLng);\n placesMarkers.get(key).setTitle(name);\n\n\n } else {\n //Adding marker first time\n\n //Create marker with necessary variables\n placesMarkers.put(key, mMap.addMarker(new MarkerOptions().position(placeLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))));\n }\n\n //Set the icon of marker based on type\n\n if (type.equals(\"home\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_home)\n );\n } else if (type.equals(\"date\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_dating)\n );\n } else if (type.equals(\"education\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_education)\n );\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(mContext);\n gMap = googleMap;\n\n //you can move map here to item specific 'location'\n int pos = getAdapterPosition();\n\n LatLng latLng = new LatLng(6.42788, 3.4274513);\n LatLng NIGERIA = new LatLng(9.0611017, 4.1763482);\n\n gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n gMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(false)\n .flat(true)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n }", "public void markerCreator(List<Employee>employeeArray) {\n\n employeeArrayforData= employeeArray;\n List<MarkerOptions> markers = new ArrayList<MarkerOptions>();\n for (int i = 0; i < employeeArray.size(); i++) {\n if(employeeArray.get(i).lastLocation.isEmpty())\n continue;\n// markers.add((new MarkerOptions()\n// .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation.replace(\": (\",\":(\")),\n// LatLong.getLongt(employeeArray.get(i).lastLocation.replace(\": (\",\":(\"))))\n// .title(employeeArray.get(i).name)));\n// updateMyMarkers(markers);\n Log.i(\"****\",employeeArray.get(i).lastLocation);\n Log.i(\"****\",\"hi\");\n if (employeeArray.get(i).online)\n\n {\n markers.add((new MarkerOptions()\n .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation),\n LatLong.getLongt(employeeArray.get(i).lastLocation)))\n .title(i+\":\"+employeeArray.get(i).name))\n .snippet((\"Rate = \"+employeeArray.get(i).rate+\",\"+employeeArray.get(i).email\n )).alpha(0.9f).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_picker_green)));\n\n }\n else{\n markers.add((new MarkerOptions()\n .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation),\n LatLong.getLongt(employeeArray.get(i).lastLocation)))\n .title(i+\":\"+employeeArray.get(i).name))\n .snippet((\"Rate = \"+employeeArray.get(i).rate+\"\"+employeeArray.get(i).email\n )).alpha(0.1f).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_picker_red)));\n }\n\n updateMyMarkers(markers);\n }\n }", "public void addOverlays() {\n\n\t\t// TODO: why clearing them?\n\t\tmapOverlays = mapView.getOverlays();\n\t\tmapOverlays.clear();\n\n\t\t// TODO: check!\n\t\tif (currentPos.size() != 0)\n\t\t\tmapOverlays.add(currentPos);\n\n\t\tif (lastSearch.size() != 0)\n\t\t\tmapOverlays.add(lastSearch);\n\t\t\n\t\tif(routeOverlays.size() != 0) {\n\t\t\tIterator<MyOverLay> it = routeOverlays.iterator();\n\t\t\twhile (it.hasNext()){\n\t\t\t\tmapOverlays.add(it.next());\n\t\t\t}\n\t\t}\n\n\t\tfor (Category cat : allCategories) {\n\t\t\tif (cat.getLinkedOverlay().size() > 0 && cat.isActive()) {\n\t\t\t\tUtil.l(\"Adding overlay \" + cat.getName()\n\t\t\t\t\t\t+ \" to map: ADDED (size is: \"\n\t\t\t\t\t\t+ cat.getLinkedOverlay().size() + \")\");\n\t\t\t\tmapOverlays.add(cat.getLinkedOverlay());\n\t\t\t} else {\n\t\t\t\tUtil.l(\"Adding overlay \" + cat.getName()\n\t\t\t\t\t\t+ \" to map: NOT ADDED (zero size OR noActive)\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\tString coordinates[] = { \"\" + location.getLatitude(),\n\t\t\t\t\t\"\" + location.getLongitude() };\n\t\t\tdouble lat = Double.parseDouble(coordinates[0]);\n\t\t\tdouble lng = Double.parseDouble(coordinates[1]);\n\n\t\t\tGeoPoint p = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6));\n\n\t\t\tMyMapOverlays marker = new MyMapOverlays(p, MapDataActivity.this);\n\t\t\tList listOfOverLays = myMap.getOverlays();\n\t\t\tlistOfOverLays.clear();\n\t\t\tlistOfOverLays.add(marker);\n\n\t\t\tmyMap.invalidate();\n\t\t\t// Toast.makeText(MapDataActivity.this,\n\t\t\t// \"lat \"+location.getLatitude()+\"long \"+location.getLongitude(),\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t}", "public void updateMap(List<MapItem> items) {\n if (!mIsMapStatic && mMap != null && items != null) {\n\n mBoundsToFitMap = null;\n\n for (MapItem mapItem : items) {\n\n Marker marker = mMap.addMarker(new MarkerOptions().position(mapItem.getLocation()).title(mapItem.getName())\n .snippet(mapItem.getDescription()));\n\n // Saving the marker\n mMarkerIdMapItem.put(marker.getId(), mapItem);\n\n // Icon configuration\n if (mapItem.getMapIconConfiguration() != null) {\n\n if (mapItem.getMapIconConfiguration().getIcon() != null) {\n marker.setIcon(BitmapDescriptorFactory.fromBitmap(mapItem.getMapIconConfiguration().getIcon()));\n } else if (mapItem.getMapIconConfiguration().getIconResId() != -1) {\n BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromResource(mapItem.getMapIconConfiguration()\n .getIconResId());\n\n try {\n // TODO - BAD CATCH - Check why we have a nullpointer exception if we reference an icon from the google-play-services lib\n marker.setIcon(bitmapDescriptor);\n } catch (Exception e) {\n Log.e(TAG, \"\");\n }\n } else if (mapItem.getMapIconConfiguration().getHueColor() != -1) {\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(mapItem.getMapIconConfiguration().getHueColor()));\n }\n\n if (mapItem.getMapIconConfiguration().getOpacity() != -1) {\n marker.setAlpha(mapItem.getMapIconConfiguration().getOpacity());\n }\n\n }\n\n mMapItemIdMarker.put(mapItem.getId(), marker);\n }\n\n // We construct the list of bounds\n if (!mMapItemIdMarker.isEmpty()) {\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n\n // We construct the bounds\n for (Marker marker : mMapItemIdMarker.values()) {\n builder.include(marker.getPosition());\n }\n\n mBoundsToFitMap = builder.build();\n }\n\n // Update the position of the camera\n updateCameraPosition();\n\n }\n }", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "protected abstract void setMarkers();", "void addHasLatitude(Object newHasLatitude);", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MarkerOptions m= new MarkerOptions().position(new LatLng(28.7041,77.1025)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"tap to get the alerts\");\n n= mMap.addMarker(m);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n\n if (!lati.equals(\"false\") && !longi.equals(\"false\")) {\n Double la = Double.parseDouble(lati);\n Double lo = Double.parseDouble(longi);\n // Add a marker in Sydney and move the camera\n n.setPosition(new LatLng(la,lo));\n n.setTitle(level);\n if(level.equals(\"hard\")){\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));}\n else\n {\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));}\n LatLng posi = new LatLng(la, lo);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(posi));\n }\n\n\n }\n });\n\n\n\n }", "private void addItemsToClusterManager() {\n if (mClusterManager != null) {\n mClusterManager.clearItems();\n for (Restaurant restaurant : restaurantProvider.getRestaurants()) {\n mClusterManager.addItem(new RestaurantMapItem(restaurant));\n }\n mClusterManager.cluster();\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }" ]
[ "0.69940007", "0.680524", "0.6769225", "0.6711899", "0.6628256", "0.6602882", "0.65937304", "0.64027655", "0.63583404", "0.6335168", "0.62552905", "0.62250954", "0.61199206", "0.61186486", "0.6050456", "0.603629", "0.60235924", "0.6020985", "0.60167444", "0.5995514", "0.5953192", "0.5946903", "0.5930038", "0.58791167", "0.58764726", "0.5868261", "0.58471817", "0.5830971", "0.5828746", "0.582475", "0.5812034", "0.58017397", "0.5778321", "0.5769405", "0.5769299", "0.57626635", "0.5758019", "0.5720724", "0.571865", "0.5718006", "0.57176334", "0.5706524", "0.57045484", "0.56983286", "0.5694365", "0.56881416", "0.5680231", "0.5678625", "0.5664527", "0.56610894", "0.5655677", "0.5633746", "0.56306136", "0.5621418", "0.5612173", "0.5606403", "0.55956846", "0.559535", "0.5590114", "0.5562129", "0.5553266", "0.5549304", "0.5537715", "0.5530928", "0.5528288", "0.55220556", "0.5520071", "0.5492084", "0.54851615", "0.54642373", "0.54469293", "0.54391664", "0.5426103", "0.54231244", "0.54191494", "0.54181963", "0.5417025", "0.54145473", "0.54128176", "0.54115474", "0.5398119", "0.5389585", "0.53873706", "0.5383425", "0.53758407", "0.53727126", "0.5370592", "0.536356", "0.53626305", "0.5360049", "0.5353614", "0.5351188", "0.53419274", "0.53279376", "0.5327745", "0.5307633", "0.5304096", "0.52975845", "0.5296897", "0.52920914" ]
0.80823714
0
Displays text stating which geofences the user is currently in. Used only in debug mode
private void displayGeofenceInfo(){ TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info); locationView.setVisibility(View.VISIBLE); MainActivity mainActivity = (MainActivity) getActivity(); String displayString = getResources().getString(R.string.currently_in_geofences_for); boolean showString = false; if(mainActivity.getGeofenceMonitor().curGeofences == null){ return; } for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){ displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + " "; showString = true; } if(showString) { locationView.setText(displayString); } else { locationView.setText(getResources().getString(R.string.no_items)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "String getLocationLabel();", "public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }", "@Override\n public String getDisplayString(String[] arg0) {\n return new String(\"geo_points\");\n }", "private void getUsersGeolocalisation(User user) {\n System.out.println(\"##########Getting \".concat(user.getScreenName()).concat(\" Location ##########\"));\n String[] place = user.getLocation().split(\",\");\n if (place != null && place.length != 0) {\n\n addEdgesToGraph(user.getScreenName(), place);\n }\n\n\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "public void printInfo() {\n String s = \"\";\n if (map.isEmpty()) {\n s += \"not keeping any entries\\n\";\n } else {\n s += \"This Node stores a range of \" + map.size() + \" keys :\\n from:\" + map.firstKey() + \" up to: \" + map.lastKey() + \"\\n\";\n }\n s += \"node key:\\t\" + nodeKey + \"\\n\";\n s += \"previous key:\\t\" + predKey + \"\\n\";\n\n window.getKeysInfoText().setText(s);\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void displayLocation() {\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (mLastLocation != null) {\n double latitude = mLastLocation.getLatitude();\n double longitude = mLastLocation.getLongitude();\n\n\n String add = getAddressString(latitude, longitude);\n\n //Check in\n student_checkin chkIn = new student_checkin(getActivity(), sessionId, \"Lat: \" + latitude + \" Long: \" + longitude);\n chkIn.execute();\n lblLocation.setText(latitude + \", \" + longitude);\n cords.setText(add);\n\n\n\n } else {\n\n lblLocation\n .setText(\"(Couldn't get the location. Make sure location is enabled on the device)\");\n }\n }", "private String getCurrentState(double lat, double longitude) {\n String currentState = \"\";\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(lat,longitude,1);\n currentState = addresses.get(0).getAdminArea();\n } catch(IOException e){\n e.printStackTrace();\n }\n return currentState;\n }", "private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn getLocation();\r\n\t}", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "private static String printInfo(GeoLocation object) {\n\t\treturn(object.toString());\n\t}", "private String getLocationForPrint(double latitude, double longitude) {\n int latDegree = (new Double(Math.floor(latitude))).intValue();\n int longDegree = (new Double(Math.floor(longitude))).intValue();\n String latEnd = getString(R.string.latitude_south);\n String longEnd = getString(R.string.longitude_west);\n if (latDegree > 0) {\n latEnd = getString(R.string.latitude_north);\n\n }\n if (longDegree > 0) {\n longEnd = getString(R.string.longitude_east);\n }\n double latSecond = (latitude - latDegree) * 100;\n double latMinDouble = (latSecond * 3d / 5d);\n int latMinute = new Double(Math.floor(latMinDouble)).intValue();\n\n double longSecond = (longitude - longDegree) * 100;\n double longMinDouble = (longSecond * 3d / 5d);\n int longMinute = new Double(Math.floor(longMinDouble)).intValue();\n// return String.format(getString(R.string.geo_location_info), latDegree,\n// latMinute, latEnd, longDegree, longMinute, longEnd);\n return getString(R.string.geo_location_info);\n\n }", "@Override\n\tpublic void office_location() {\n\t\tSystem.out.println(\"Office location is Gurgaon\");\n\t}", "public String toString(){\r\n return \"Local : \"+ idLocal + \" sigle : \"+ sigle +\" places : \"+ places + \" description : \"+ description;\r\n }", "private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering Geofence\";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting Geofence\";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }", "void displayDebugInformation() {\n\t\tmyParent.text(\"X\", X.x + 10, X.y + 5);\n\t\tmyParent.text(\"Y\", Y.x + 10, Y.y + 5);\n\t\tmyParent.text(\"Z\", Z.x + 10, Z.y + 5);\n\t\tmyParent.text(\"Q\", Q.x + 10, Q.y + 5);\n\t\tmyParent.fill(255);\n\n\t\tString pointFocuses = \"\";\n\t\tString stickedPoints = \"\";\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpointFocuses += point[i].isFocusedOnThePoint() + \" \";\n\t\t\tstickedPoints += point[i].sticked + \" \";\n\n\t\t\t// fill(200);\n\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5);\n\t\t}\n\n\t\tmyParent.text(\"state: \" + state + \"\\nfocused on line: \" + selectedLine + \"\\nfocused on point: \" + selectedPoint\n\t\t\t\t+ \"\\nmouseLockedToLine: \" + mouseLockedToLine + \"\\npointFocuses: \" + pointFocuses + \"\\nstickedPoints: \"\n\t\t\t\t+ stickedPoints + \"\\ndragLock: \" + dragLock + \"\\ndiagonal scale factor: \" + diagonalScaleFactor\n\t\t\t\t+ \"\\npress D to hide debug\", 40, myParent.height - 160);\n\n\t\t// diplayNeighborPoints();\n\t}", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "boolean getGeotaggingPref();", "public void print () {\r\n System.out.println(\"Place \"+name+\": lat \"+lat+\" lon \"+lon+\r\n \" elevation \"+ele);\r\n }", "public static void show_local() {\n\n\t}", "public String diagnostic() {\n\t\tString output = \"\";\n\t\tString stateString = \"\";\n\t\tif (this.getState() == Player.HUMAN)\n\t\t\tstateString = \"is selected by the player\";\n\t\telse if (this.getState() == Player.COMPUTER)\n\t\t\tstateString = \"is selected by the computer\";\n\t\telse\n\t\t\tstateString = \"is not selected\";\n\t\t\t\n\t\toutput += \"The point \" + this.toString() + \" \" + stateString +\n\t\t\t\t\t\" and is associated with the rows:\\n\";\n\t\tfor (Row r : containingRows) {\n\t\t\toutput += r + \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "private void PrintFineMap() {\n\t\tif (fineMap.isEmpty()) {\n\t\t\tviolationProcess.CalculateFinesPerCapita(populationReader.getPopulationMap());\n\t\t\tfineMap = violationProcess.getFineMap();\n\t\t}\n\t\tSystem.out.println(fineMap);\n\t}", "String getLocation();", "String getLocation();", "String getLocation();", "public void printCoordinates ()\n\t{\n\t\tfor (int a = 0; a < object.size(); a++)\n\t\t{\n\t\t\tSystem.out.println(\"Polygon \" + (a+1) + \":\");\n\t\t\tobject.get(a).detailedPrint();\n\t\t\tSystem.out.println(\"**********\");\n\t\t}\n\t}", "public static void displayTextCountries(){\n for (Country country : countryList){\n System.out.println(country.getCountryName() + \",\" + country.getIndicator(1) + \",\" + country.getIndicator(2) + \",\" + country.getIndicator(3) + \",\" + country.getIndicator(4) + \",\" + country.getIndicator(5) + \",\" + country.getIndicator(6) + \",\" + country.getIndicator(7) + \",\" + country.getIndicator(8));\n }\n }", "public String globalInfo() {\n\n return \"Nearest-neighbor-like algorithm using non-nested generalized exemplars \"\n + \"(which are hyperrectangles that can be viewed as if-then rules). For more \"\n + \"information, see \\n\\n\"\n + getTechnicalInformation().toString();\n }", "@Override\r\n\tpublic String getInfo() {\n\t\treturn \"Grass... stay away from it when a fire is near.\";\r\n\t}", "private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "private String getCords() {\n return current.getLocString();\n\n }", "public String toString() {\n\t\treturn String.format(\"%-28s%-16f%-17f\", city,location.getLat(),location.getLng());\n\t}", "void gaInfo(String text);", "public void drawDebugInfo() {\n\n\t\t// Draw our home position.\n\t\tbwapi.drawText(new Point(5,0), \"Our home position: \"+String.valueOf(homePositionX)+\",\"+String.valueOf(homePositionY), true);\n\t\t\n\t\t// Draw circles over workers (blue if they're gathering minerals, green if gas, white if inactive)\n\t\tfor (Unit u : bwapi.getMyUnits()) {\n\t\t\tif (u.isGatheringMinerals()) \n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.BLUE, false, false);\n\t\t\telse if (u.isGatheringGas())\n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.GREEN, false, false);\n\t\t\telse if (u.getTypeID() == UnitTypes.Protoss_Probe.ordinal() && u.isIdle())\n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.WHITE, false, false);\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "private String getGeofenceTrasitionDetails(int geoFenceTransition, List<Geofence> triggeringGeofences) {\n ArrayList<String> triggeringGeofencesList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesList.add(geofence.getRequestId());\n }\n\n String status = null;\n if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER)\n status = \"Entering \";\n else if (geoFenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT)\n status = \"Exiting \";\n return status + TextUtils.join(\", \", triggeringGeofencesList);\n }", "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }", "public void printFlagPositions()\n {\n for (Integer[] flagLocation: flagLocations)\n {\n System.out.printf(\"{%d, %d}\\n\", flagLocation[0], flagLocation[1]);\n }\n }", "public void showLiaisonByClick()\t{\r\n \tSystem.out.print(\"Cliquez votre route: \");\r\n \tif (dessin.waitClick()) {\r\n \t float lon = dessin.getClickLon() ;\r\n \t float lat = dessin.getClickLat() ;\r\n \t \r\n \t float minDist = Float.MAX_VALUE ;\r\n \t Liaison chosen = null;\r\n \t \r\n \t for(Liaison liaison: this.routes)\t{\r\n \t \tfloat londiff = liaison.getLongitude() - lon;\r\n \t \tfloat latdiff = liaison.getLatitude() - lat;\r\n \t \tfloat dist = londiff*londiff + latdiff*latdiff ;\r\n \t \tif(dist < minDist)\t{\r\n \t \t\tchosen = liaison;\r\n \t \t\tminDist = dist;\r\n \t \t}\r\n \t }\r\n \t \r\n\t \tchosen.dessiner(dessin, this.numzone, Color.red);\r\n\t \tthis.dessin.putText(chosen.getLongitude(), chosen.getLatitude(), chosen.toString());\r\n\t \tSystem.out.println(chosen);\r\n\r\n \t}\r\n }", "public static String globalInfo() {\n return \"This is a GA individual suited to optimize binary values.\";\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "@Override\n public String toString() {\n return getCounty();\n }", "String getLocation(boolean detail);", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public void displayEllis(TextView selectedCoord, MarkerOptions markerOptions, DecimalFormat formater) {\n selectedCoord.setText(\"Selected Park: 41.8453° N, -70.5413° W\");\n locationImage.setImageResource(R.drawable.ellisville);\n markerOptions\n .position(arrayList.get(1))\n .title(\"Ellisville Harbor State Park:\\n\" + formater.format(arrayList.get(1).latitude) + \"° N\" + \", \" + formater.format(arrayList.get(1).longitude) + \"° W\");\n //Zoom the Marker\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(arrayList.get(1), 15));\n //Add Marker On Map\n gMap.addMarker(markerOptions);\n }", "@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}", "boolean hasGeographicView();", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "public void printGS(){\r\n\t\tLogger.append(\" ITANet locations:\t\");\r\n\t\tfor (int i = 0; i < this.locVec.length; i++)\r\n\t\t\tLogger.append(this.locVec[i] + \" \");\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Interruption vector:\t\");\r\n\t\tfor(int i = 0; i < this.interVec.length; i++){\r\n\t\t\tif(this.interVec[i] == true)\r\n\t\t\t\tLogger.append(\"true \");\r\n\t\t\telse\r\n\t\t\t\tLogger.append(\"false \");\r\n\t\t}\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" CPUStack:\t\");\r\n\t\tthis.stack.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\r\n\t\tLogger.append(\" Control variable:\t\");\r\n\t\tthis.cvMap.printAllEle();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t\t\r\n\t\tLogger.append(\" IRQSwitch: \");\r\n\t\tthis.switches.print();\r\n\t\tLogger.append(\"\\r\\n\");\r\n\t}", "public void display(){\r\n \r\n System.out.println(\"\\n\\nHigh Population City\");\r\n highPop.display();\r\n System.out.println(\"Capital City\");\r\n capital.display();\r\n System.out.print(\"State Name: \" + stateName + \"\\nState Population: \" + statePop + \"\\n------------\");\r\n }", "protected void showLoginChooser() {\n if (mFenceClient != null && Constants.WPI_AREA_LANDMARKS.size() > 0) {\n FenceUpdateRequest.Builder builder = new FenceUpdateRequest.Builder();\n for (Map.Entry<String, LatLng> entry : Constants.WPI_AREA_LANDMARKS.entrySet()) {\n builder.removeFence(entry.getKey() + \"-dwell\");\n builder.removeFence(entry.getKey() + \"-exiting\");\n }\n\n mFenceClient.updateFences(builder.build())\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n close();\n }\n });\n } else {\n close();\n }\n }", "private void printMap() {\n\t\tfor(Integer key: location.keySet()){\n\t\t\tString val= location.get(key).toString();\n\t\t\tSystem.out.println(\"(\" + key.toString() + \", \" + val+ \")\");\n\t\t}\n\t}", "private String getGeofenceTransitionDetails(\n int geofenceTransition,\n List<Geofence> triggeringGeofences) {\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n // Get the Ids of each geofence that was triggered.\n ArrayList<String> triggeringGeofencesIdsList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesIdsList.add(geofence.getRequestId());\n }\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofencesIdsList);\n Log.i(\"logos\",\"jnj\");\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }", "java.lang.String getLocation();", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }", "public String getLocationString() {\n return getCenter().toString();\n }", "public String getDisplay() {\n\t\tString output;\n\t\tStringBuilder tempout = new StringBuilder();\n\t\tfor(Entry<String, ParkingSpace> entry:hashmap.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tVehicle temp = entry.getValue().getVehicle();\n\t\t\ttempout.append(\"Plate# \" + key + \" \" + temp.toString() + \"\\n\");\n\t\t}\n\t\toutput = tempout.toString();\n\t\treturn output;\n\t}", "private void showPoints() {\n if (currentPoints !=0) {\n tVcurrentPoints.setText(getString(R.string.youHaveReached) + currentPoints + getString(R.string.reachedPoints));\n }\n }", "public static void printAreas(String information) {\r\n //String information = stage + \"_\" + day + \"_\" + startTime;\r\n boolean bool = false;\r\n for (int i = 0; i <= 2976; i ++) {\r\n opCount++;\r\n if (LSItemsArray[i].getInformation().equals(information)){\r\n System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n bool = true;\r\n break;\r\n }\r\n\r\n }\r\n if (bool == false)\r\n System.out.println(\"Areas not found\");\r\n }", "void beginGeoField();", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t}", "public String toString()\n {\n return super.toString() + \":\\n\" + getMap();\n }", "public static void displayWorld() {\n\t//First row\n\t\tSystem.out.print(\"+\");\n\t\tfor (int i = 0; i < Params.world_width; i++) {\n\t\t\tSystem.out.print(\"-\");\n\t\t}\n\t\tSystem.out.println(\"+\");\n\t//Grid\n\t\tfor (int row = 0; row < Params.world_height; row++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tList<Critter> crittersInRow = new java.util.ArrayList<Critter>();\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif (c.y_coord == row) {\n\t\t\t\t\tcrittersInRow.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int col = 0; col < Params.world_width; col++) {\n\t\t\t\tboolean critterExists = false;\t\t\t//Becomes true if we find critter in the location\n\t\t\t\tfor (Critter c2: crittersInRow) {\n\t\t\t\t\tif (c2.x_coord == col) {\n\t\t\t\t\t\tif (!critterExists) {\t\t\t//Solves problem of more than 1 critter in location after adding but before stepping\n\t\t\t\t\t\t\tSystem.out.print(c2.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcritterExists = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!critterExists) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t//Last row\n\t\tSystem.out.print(\"+\");\n\t\tfor (int i = 0; i < Params.world_width; i++) {\n\t\t\tSystem.out.print(\"-\");\n\t\t}\n\t\tSystem.out.println(\"+\");\n\t}", "public void display(){\n\t\tfor (Entry<String, Map<String, Integer>> entry : collocationMap.entrySet()){\n\t\t for (Entry<String, Integer> subEntry : entry.getValue().entrySet()){\n\t\t\t System.out.println(entry.getKey() + \" \" + subEntry.getKey() + \": \" + subEntry.getValue());\n\t\t }\n\t\t}\n\t}", "public void display_round_start_text() {\n }", "public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }", "public void info() {\n\t\tSystem.out.println(\"중심 좌표 [ \" + getX() + \", \" + getY() + \" ]\");\n\t\txyInfo(); // Coord클래스의 메서드 호출\n\t\tSystem.out.println(\"반지름 : \" + radius);\n\t}", "public String showContextChosen() {\n String s = \"\";\n\n for (Context c : surveyContext.values()) {\n s = s.concat(c.getContextName() + \":\\n\" +\n c.showActivitiesChosen() +\n \"\\n\\n\");\n }\n return s;\n }", "private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}", "public String toString()\n {\n return this.getGeoEvent().toString();\n }", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t\n \t\t\t\t\t}", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "private void showInfo() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Guess a letter:\\n\" + this.word);\n\t\tSystem.out.println(\"You have made \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t\tSystem.out.println(\"You will lose the game if you make more than \"\n\t\t\t\t+ this.allowance + \" wrong guesses.\");\n\t\tSystem.out.println(\"The already guessed wrong letters are:\");\n\t\tSystem.out.println(this.wrongLetters);\n\t\tSystem.out.println(\"-----------------------------\");\n\t}", "public String toString() {\n\t\treturn geoCoordinate.toString() + \" | \" + name + \" | \" + description;\n\t}", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "static void displayMessage() {\n\n System.out.println(\"\\nA total of \" + graphVisited.size() + \" vertices visited\");\n\n System.out.println(\"Found \" + silhouetteAnalyzer(numberOfVertices)\n + \" silhouettes\");\n }", "public void getLoco(double lat, double lon){\n cords.setText(lat + \" \"+lon);\n\n // String dress = getCompleteAddressString(lat,lon);\n\n // latt = lat;\n // longg = lon;\n\n //Toast.makeText(getContext(), add, Toast.LENGTH_SHORT).show();\n\n //LocationAddress locationAddress = new LocationAddress();\n //locationAddress.getAddressFromLocation(38.898748, -77.037684\n // , getContext(), new GeocoderHandler());\n\n //String add = getAddressString(lat,lon);\n //Toast.makeText(getContext(), add, Toast.LENGTH_LONG);\n //info.setText(add);\n\n check.setVisibility(View.VISIBLE);\n\n\n\n\n\n\n\n }", "static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }", "public String toString()\n\t{\n\t\treturn \"Current Floor: \" + currentFloor +\" Total passangers on board: \" + totalPassengers + \" Direction: \" + currentDirection;\n\t}", "public String toString(){\n return \"Available information for this student: \" + fname + \" \" + lname + \", \" + college + \", \"\n + major + \" major, GPA: \" + gpa;\n }", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public String toString()\n\t{\n\t\treturn Double.toString(latitude)+\", \"+Double.toString(longitude);\n\t}", "@Override\r\n\tpublic void showClassmate() {\n\t\tSystem.out.println(\"你的同学有: \"+classmateRelations);\r\n\t}", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\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 static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }", "public static void printAvailableMaps() {\n \tFile folder = new File(\"./examples/\");\n \tFile[] listOfFiles = folder.listFiles();\n \tSystem.out.println(\"Available maps (choose one and start game with command 'game map_name' ) : \");\n\n \t for (int i = 0; i < listOfFiles.length; i++) {\n \t if (listOfFiles[i].isFile()) {\n \t System.out.println(\"\\t\"+listOfFiles[i].getName());\n \t } \n \t }\n }", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "@Override\n public String toString() {\n StringBuilder output = new StringBuilder();\n\n output.append(\"Currently \" + _passengersOnboard + \" Passengers Onboard\\r\\n\");\n output.append(\"On Floor : \" + _currentFloor + \"\\r\\n\");\n return output.toString();\n\n }", "public void info(){\r\n System.out.println(\"Title : \" + title);\r\n System.out.println(\"Author . \" + author);\r\n System.out.println(\"Location : \" + location);\r\n if (isAvailable){\r\n System.out.println(\"Available\");\r\n }\r\n else {\r\n System.out.println(\"Not available\");\r\n }\r\n\r\n }" ]
[ "0.6071204", "0.59258527", "0.58099604", "0.57975274", "0.5791252", "0.57669216", "0.5764866", "0.56921315", "0.5665048", "0.5628926", "0.5612298", "0.5590993", "0.5586894", "0.5583601", "0.55816734", "0.5579155", "0.555908", "0.5558378", "0.5450082", "0.544656", "0.5404191", "0.5400725", "0.5398099", "0.5390608", "0.5379215", "0.5366436", "0.5364306", "0.53630555", "0.53556085", "0.53556085", "0.53556085", "0.53497887", "0.5348821", "0.5346369", "0.5339908", "0.5331946", "0.53311604", "0.5329439", "0.53252786", "0.5315568", "0.53136176", "0.5307807", "0.5302215", "0.5300179", "0.52951944", "0.5289701", "0.5287571", "0.5279043", "0.5268292", "0.52624583", "0.52594113", "0.52558964", "0.5254381", "0.52308035", "0.52242965", "0.5224032", "0.52126694", "0.5206868", "0.52047473", "0.5204564", "0.52042603", "0.5202408", "0.5195698", "0.5190172", "0.5178104", "0.5175028", "0.51741993", "0.5173871", "0.5163585", "0.51564425", "0.51557463", "0.51547056", "0.51501757", "0.51493967", "0.5145526", "0.5145064", "0.5143435", "0.514285", "0.5138718", "0.5137363", "0.51338005", "0.5133572", "0.51334167", "0.5127284", "0.51205856", "0.5117769", "0.51147974", "0.51118696", "0.5111703", "0.51104605", "0.5108315", "0.51051706", "0.5104929", "0.51043236", "0.5104307", "0.51035905", "0.5100819", "0.50893646", "0.50777906", "0.5074145" ]
0.80681247
0
Handles the result of a query for information about a geofence.
@Override public void handleResult(GeofenceInfoObject result) { super.handleResult(result); /*This is a call from the VolleyRequester, so this check prevents the app from crashing if the user leaves the tab while the app is trying to get quests from the server */ if(this.isResumed()) { MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity != null) { final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info); final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); if(result == null){ if(currentGeofences != null){ if(currentGeofences.size() != 0){ //If the result is null and it shouldn't be, displays error and allows user to request //information again btnRequestInfo.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved)); txtRequestGeofences.setVisibility(View.VISIBLE); btnRequestInfo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info)); btnRequestInfo.setVisibility(View.GONE); handleGeofenceChange(currentGeofences); } }); } } } if (result != null) { try { Log.i(logMessages.GEOFENCE_MONITORING, "handleResult: result length is: " + result.getContent().size()); Log.i(logMessages.GEOFENCE_MONITORING, "handleResult: result is: " + result.getContent().toString()); btnRequestInfo.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); if(debugMode) { displayGeofenceInfo(); } addMarker(result.getContent()); } catch (NullPointerException e) { e.printStackTrace(); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "@Override\n\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "@Override\n public void onGetGeoCodeResult(GeoCodeResult arg0) {\n\n }", "public void onSuccess(GGeocodeResult result);", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private void handleGeofenceError(Context context, Intent intent) {\n String msg = intent.getStringExtra(GeofenceUtils.EXTRA_GEOFENCE_STATUS);\n Log.e(GeofenceUtils.APPTAG, msg);\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@RequestMapping(value = \"/adressensuche\", method = RequestMethod.GET)\n @ResponseBody\n public void adressensuche(\n @RequestParam(value = \"query\", required = false) String query,\n HttpServletResponse response) throws IOException {\n\n try {\n sendOk(response, geoService.searchAddress(query));\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(BackendController.class.getName()).log(Level.SEVERE, null, ex);\n sendError(response, ex);\n }\n }", "@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult geocode) {\n\t\t\t\tif (geocode.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\t\tString coordType = \"bd09ll\";\n\t\t\t\t\tString address = geocode.getAddress();\n\t\t\t\t\tLatLng latLng = geocode.getLocation();\n\t\t\t\t\tString geoCode_F = \"{\" +\n\t\t\t\t\t\t\t\"long:%f\" +\n\t\t\t\t\t\t\t\",lat:%f\" +\n\t\t\t\t\t\t\t\",addr:'%s'\" +\n\t\t\t\t\t\t\t\",type:'%s'\" +\n\t\t\t\t\t\t\t\"}\";\n\t\t\t\t\tString geoCode = String.format(Locale.ENGLISH, geoCode_F, latLng.longitude, latLng.latitude, address, coordType);\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, geoCode, JSUtil.OK, true, false);\n\t\t\t\t} else if (geocode.error == SearchResult.ERRORNO.NETWORK_ERROR) { // 网络错误\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_NETWORK_ERROR, DOMException.toString(geocode.error.toString(),\"Maps百度地图\", DOMException.MSG_NETWORK_ERROR, BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t} else {\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_BUSINESS_INTERNAL_ERROR, DOMException.toString(geocode.error.toString(),\"Maps百度地图\", geocode.error.toString(), BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t}\n\t\t\t}", "@Override\n protected void onHandleIntent(@Nullable Intent intent) {\n GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);\n\n // Handling errors\n if (geofencingEvent != null && geofencingEvent.hasError()) {\n String errorMsg = getErrorString(geofencingEvent.getErrorCode());\n Log.e(TAG, errorMsg);\n return;\n }\n // Retrieve GeofenceTransition\n if (geofencingEvent != null) {\n int geoFenceTransition = geofencingEvent.getGeofenceTransition();\n\n switch (geoFenceTransition) {\n case Geofence.GEOFENCE_TRANSITION_ENTER:\n break;\n case Geofence.GEOFENCE_TRANSITION_EXIT:\n // Get the geofence that were triggered\n List<Geofence> triggeringGeofences = geofencingEvent.getTriggeringGeofences();\n\n String geofenceTransitionDetails = getGeofenceTrasitionDetails(geoFenceTransition, triggeringGeofences);\n Intent lbcIntent = new Intent(Constants.BroadCastReceiver.sBroadCastName); //Send to any reciever listening for this\n LocalBroadcastManager.getInstance(this).sendBroadcast(lbcIntent);\n break;\n }\n\n }\n }", "void fetchCountryInformation();", "@Override\n protected void onHandleIntent(Intent intent) {\n GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);\n if (geofencingEvent.hasError()) {\n Log.d(TAG, \"geofencing event error.\");\n return;\n }\n\n // Get the transition type.\n int geofenceTransition = geofencingEvent.getGeofenceTransition();\n\n // Test that the reported transition was of interest.\n if (geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER) {\n\n // Get the geofences that were triggered. A single event can trigger\n // multiple geofences.\n List<Geofence> triggeringGeofences = geofencingEvent.getTriggeringGeofences();\n new GeofencingManager(this).HandleTriggeringGeofences(triggeringGeofences);\n }\n }", "private void handleSearchPoiResult(MKPoiResult mkPoiResult) {\n if (mkPoiResult.getCurrentNumPois() > 0) {\n // Display all the poi points\n SearchPoiOverlay overlay = new SearchPoiOverlay(getActivity(),\n mMapView, mSearch);\n overlay.setData(mkPoiResult.getAllPoi());\n Bundle bundle = new Bundle();\n bundle.putString(CheckinActivity.KEY_POI_PROVINCE, mProvince);\n overlay.setExtra(bundle);\n // Clear old overlays and add new\n mMapView.getOverlays().clear();\n mMapView.getOverlays().add(overlay);\n mMapView.refresh();\n\n // Move to the first not null info\n List<MKPoiInfo> infoList = mkPoiResult.getAllPoi();\n for (MKPoiInfo info : infoList) {\n // info.pt is null when info.ePoiType == 2 or 4\n if (info.pt != null) {\n mMapView.getController().animateTo(info.pt);\n break;\n }\n }\n// // The typed poi is found in other cities rather than this\n } else if (mkPoiResult.getCityListNum() > 0) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Found in \");\n for (int i = 0, sz = mkPoiResult.getCityListNum(); i < sz; i++) {\n sb.append(mkPoiResult.getCityListInfo(i).city);\n sb.append(\" \");\n }\n // TODO: make it more elegant\n Toast.makeText(getActivity(), sb.toString(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onGeoQueryReady() {\n if (!isAgentFound) {\n radius++;\n getNearestAgent();\n }\n }", "public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n onLocationChanged(location);\n findNearbyHospitals(location);\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "protected void streetLoc(LatLng latLng) {\n if (latLng == null) {\n return;\n }\n TencentSearch tencentSearch = new TencentSearch(this);\n //还可以传入其他坐标系的坐标,不过需要用coord_type()指明所用类型\n //这里设置返回周边poi列表,可以在一定程度上满足用户获取指定坐标周边poi的需求\n Geo2AddressParam geo2AddressParam = new Geo2AddressParam(latLng).getPoi(true)\n .setPoiOptions(new Geo2AddressParam.PoiOptions()\n// .setRadius(1000).setCategorys(\"面包\")\n .setPolicy(Geo2AddressParam.PoiOptions.POLICY_O2O));\n tencentSearch.geo2address(geo2AddressParam, new HttpResponseListener<BaseObject>() {\n\n @Override\n public void onSuccess(int arg0, BaseObject arg1) {\n if (arg1 == null) {\n return;\n }\n Geo2AddressResultObject obj = (Geo2AddressResultObject)arg1;\n StringBuilder sb = new StringBuilder();\n sb.append(\"逆地址解析\");\n sb.append(\"\\n地址:\" + obj.result.address);\n sb.append(\"\\npois:\"+obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n// provinceMap.put()\n province1 = provinceMap.get(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n if(province1 == null) {\n provinceMap.put(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district,obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n getStreet(obj.result.address_component.province, obj.result.address_component.city, obj.result.address_component.district);\n }\n\n// for (Poi poi : obj.result.pois) {\n// sb.append(\"\\n\\t\" + poi.title);\n// tencentMap.addMarker(new MarkerOptions()\n// .position(poi.latLng) //标注的位置\n// .title(poi.title) //标注的InfoWindow的标题\n// .snippet(poi.address) //标注的InfoWindow的内容\n// );\n// }\n// Log.e(\"test\", sb.toString());\n }\n\n @Override\n public void onFailure(int arg0, String arg1, Throwable arg2) {\n Log.e(\"test\", \"error code:\" + arg0 + \", msg:\" + arg1);\n }\n });\n }", "public static String getGeoLocation(String address) {\n URL url = null;\n HttpURLConnection conn = null;\n String textResult = \"\";\n try {\n url = new URL(GEO_URI + address + \"&key=\" + KEY);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n\n return textResult;\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n \tString[] ids = (String[])intent.getExtras().get(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_IDS);\n \tint transitionType = intent.getIntExtra(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_TYPE, -1);\n \t\n \tboolean hasRootGeofenceTransition = false;\n \tfor (String id : ids){\n \t\tif (id.equals(ClientSideUtils.RootGeofenceId)){\n \t\t\thasRootGeofenceTransition = true;\n \t\t}\n \t}\n \t\n \t// TODO if both root and sons in ids DO SOMETHING\n \t\n \tif (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Entered: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmSonGeofencesList = new ArrayList<Geofence>();\n \t\t\tfor (LotGeofence lotGeofence : mLotsDb.mSonLotGeofencesList){\n \t\t\tmSonGeofencesList.add(lotGeofence.toGeofenceObject());\n \t\t\tmCurrentGeofenceList.add(lotGeofence.toGeofenceObject());\n \t\t\t}\n\t\t \tmGeofenceRequestType = ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD;\n\t\t try{\n\t\t \t\tmGeofenceRequester.addGeofences(mSonGeofencesList);\n\t\t \t} catch(UnsupportedOperationException e){\n\t\t \t\tLog.d(ClientSideUtils.APPTAG, \"In progress on adding geofences again\");\n\t\t \t}\n\t\t if (!MOCKUP_MODE){\n\t\t \tstartActivityRecognition();// <----- Starting Activity Recognition Here\n\t\t }\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\tenteredParkingLot(id);\n \t\t\t}\n \t\t}\n\n \t}else if (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Exited: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmGeofenceRemoveType = ClientSideUtils.GEOFENCE_REMOVE_TYPE.LIST;\n \t\t\tremoveCurrentGeofecesByID(mSonGeofencesList);\n \t\t\t\n \t\t\tmCurrentGeofenceList = new ArrayList<Geofence>();\n \t\t\tmCurrentGeofenceList.add(mLotsDb.mRootLotGeofence.toGeofenceObject());\n \t\t\t\n \t\t\tstopActivityRecognition(); // <----- Stopping Activity Recognition Here\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\texitedParkingLot(id);\n \t\t\t}\n \t\t}\n \t}else{\n \t\tLog.e(ClientSideUtils.APPTAG, \"Entered Geofence action handling, the type was not ENTERED nor EXITED\");\n \t}\n }", "@Override\n public void onSuccess(Location location) {\n\n if (location != null) {\n // Logic to handle location object\n\n Geocoder gcd = new Geocoder(MainActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n System.out.println(addresses.get(0).getLocality());\n sp.set(SPConstants.location,addresses.get(0).getLocality()+\", \"+addresses.get(0).getCountryName());\n }\n else {\n sp.set(SPConstants.location,\"\");\n\n // do your stuff\n }\n\n }\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "@GetMapping(path = \"geo\", produces = MediaType.APPLICATION_JSON_VALUE)\n public Geo geoGetRequest(@RequestParam(\"addr\") String address) {\n return getGeoForAddress(address);\n }", "@Override\n\tprotected String doExecute(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws SQLException, Exception {\n\t\tIProviderLocationDAO providerDAO = getOracleDaoFactory().getProviderLocationDAO();\n\t\tArrayList<ProviderLocation> locations = providerDAO.find(1, MAX_PROVIDER_LOCATIONS_TO_DISPLAY);\n\t\trequest.getSession().setAttribute(\"providers\", locations);\n String json = new Gson().toJson(locations);\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n response.getWriter().write(json);\n\t\treturn null;\n\t}", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\tif(arg0==null||arg0.error!=SearchResult.ERRORNO.NO_ERROR||arg0.getLocation().latitude==0||arg0.getLocation().longitude==0)\n\t\t\t\t{\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\tToastUtil.shortToast(getApplicationContext(), \"百度地图出现错误了,请重写输入地址\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlatitude=arg0.getLocation().latitude;\n\t\t\t\tlongitude=arg0.getLocation().longitude;\n\t\t\t\tLog.e(\"llll2\", latitude+\"\");\n\t\t\t\tLog.e(\"11112\", longitude+\"\");\n\t\t\t\tsendEmptyUiMessage(MsgConstants.MSG_01);\n\t\t\t\t\n\t\t\t}", "private void onSearchClick(Location loc) {\n\r\n\r\n Log.d(TAG, \"IN ONSEARCHCLICK\");\r\n\r\n String url;\r\n\r\n\r\n url = \"https://geocode-maps.yandex.ru/a1.x/?format=json&geocode=\" + loc.getLongitude() + \",\" + loc.getLatitude();\r\n\r\n Log.d(TAG, url);\r\n RequestQueue queue = Volley.newRequestQueue(this);\r\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Log.d(TAG, response.toString());\r\n //JSONArray jsonArray = response.getJSONObject(\"results\").getString(\"formattedString\");\r\n //String formattedAdress = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderResponseMetaData\").getString(\"request\");\r\n JSONObject country = null;\r\n JSONObject area = null;\r\n JSONObject city = null;\r\n JSONObject street = null;\r\n JSONObject houseNumber = null;\r\n try {\r\n country = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\");\r\n } catch (JSONException e) {\r\n country = null;\r\n }\r\n try {\r\n area = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\");\r\n } catch (JSONException e) {\r\n area = null;\r\n }\r\n try {\r\n city = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\");\r\n } catch (JSONException e) {\r\n city = null;\r\n }\r\n try {\r\n street = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\");\r\n } catch (JSONException e) {\r\n street = null;\r\n }\r\n try {\r\n houseNumber = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\").getJSONObject(\"Premise\");\r\n } catch (JSONException e) {\r\n houseNumber = null;\r\n }\r\n String text = \"\";\r\n if (country != null) {\r\n// try {\r\n// text += \"Country: \" + country.getString(\"CountryName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n// if (area != null) {\r\n// try {\r\n// text += \"Administrative Area: \" + area.getString(\"AdministrativeAreaName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n if (city != null) {\r\n try {\r\n text +=city.getString(\"LocalityName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (street != null) {\r\n try {\r\n text +=street.getString(\"ThoroughfareName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (houseNumber != null) {\r\n try {\r\n text +=houseNumber.getString(\"PremiseNumber\");\r\n } catch (JSONException e) {\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Log.d(TAG, country);\r\n\r\n addressEditText.setText(text);\r\n getPostCode();\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Log.d(TAG, error.getMessage() + \" ERROR!\");\r\n }\r\n });\r\n\r\n queue.add(request);\r\n\r\n }", "public void queryAttribute4Query(String objId, String layerUrl,\n final ArrayList resultList, final Handler handler) {\n Query query = new Query();\n // query.setGeometry(geometry);\n // query.setReturnGeometry(true);\n query.setOutFields(new String[] { \"OBJECTID\", \"NAME\",\"OBJ_NAME_C\" });\n // SpatialRelationship.CONTAINS: 框中整个盆地范围,才能查询到\n query.setSpatialRelationship(SpatialRelationship.CONTAINS);\n // Log.d(\"searchtask\", \"queryAttribute4Query......SpatialReference: \" +\n // query.getSpatialRelationship());\n query.setOutSpatialReference(mapView.getSpatialReference());\n query.setWhere(objId);\n\n Log.v(\"mandy\", \"objId: \" + objId);\n\n SearchQueryTask task = new SearchQueryTask(mapView.getContext(),\n layerUrl, CommonData.TypeOperateFrameChoos, mProgressDialog);\n task.execute(query);\n\n task.setQueryFinishListener(new OnQueryFinishListener() {\n\n @Override\n public void onFinish(FeatureSet results) {\n\n\n SinoApplication.mFeatureSet4Query = results;\n Graphic[] graphics = results.getGraphics();\n\n\n Message.obtain(handler,0,graphics).sendToTarget();\n\n DrawTool.this.graphics = graphics;\n\n // 把之前高亮显示结果清除\n mDrawLayer4HighLight.removeAll();\n if (graphics != null) {\n Log.d(\"mandy\", \"模糊查询 结果个数 : \" + graphics.length + \" \"\n + results.getDisplayFieldName());\n\n for (int j = 0; j < graphics.length; j++) {\n drawHighLight4Query(graphics[j], Color.RED);\n mylog.i(\"DrawTool\",\" \" +graphics[j].getAttributes());\n }\n\n zoomExtent(graphics);\n mProgressDialog.dismiss();\n // deactivate();\n // mCallback.setSearchData4Query(results);\n // Toast.makeText(mapView.getContext(), sb.toString() ,\n // Toast.LENGTH_LONG).show();\n }\n }\n\n });\n\n }", "public interface GGeocodeAdvancedResultListener\r\n{\r\n\t/**\r\n\t * Called when the geocode operation is successful, returns a set of \"matching\" results\r\n\t * @param result\r\n\t */\r\n\tpublic void onSuccess(GGeocodeResult result);\r\n\t\r\n\t/**\r\n\t * Called when the geocode operation fails\r\n\t *\r\n\t */\r\n\tpublic void onFail(int statusCode, String address);\r\n}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n PreparedQuery results = getQuery();\n\n // Add tracked locations as MapImage objects to a List.\n List<MapImage> formLocationOptions = convertMetdataToMapImages(results);\n\n Gson gson = new Gson();\n String jsonLocations = gson.toJson(formLocationOptions);\n response.setContentType(\"application/json\");\n response.getWriter().println(jsonLocations);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n Geocoder gcd = new Geocoder(context, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n if (addresses.size() > 0) {\n\n city = addresses.get(0).getLocality();\n local.setText(city);\n local.setSelection(local.getText().length());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "void contactQueryResult(String queryId, Contact contact);", "@Test(priority = 9)\n\tpublic void clickGeofence() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.geofence(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 9, 1);\n\t\t\n\t}", "void queryPoint(JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler);", "private void GetLocation(final String str) {\n AlertUtils.showCustomProgressDialog(LocationSearchActivityNew.this);\n String selectedPlaceKey = DataToPref.getSharedPreferanceData(LocationSearchActivityNew.this, LaoxiConstant.SELECTED_PLACE_ID, LaoxiConstant.SELECTED_PLACE_ID_KEY);\n\n CommonImplementation.getInstance().doGetLocation(null, \"https://maps.googleapis.com/maps/api/place/details/json?placeid=\" + selectedPlaceKey + \"&sensor=false&key=\" + getString(R.string.browser_key) + \"&language=\" + Locale.getDefault().getCountry(), new OnTaskComplete() {\n @Override\n public void onSuccess(Response data, boolean success) {\n AlertUtils.dismissDialog();\n if (data.code() == 200) {\n\n String LAT = \"\";\n String Long = \"\";\n String Location = \"\";\n String City = \"\";\n String State = \"\";\n String postal_code = \"\";\n String country = \"\";\n\n try {\n\n String response = data.body().string();\n JSONObject object = new JSONObject(response);\n\n String status = object.getString(\"status\").toString();\n\n if (object.has(\"result\")) {\n //JSONArray results = object.getJSONArray(\"results\");\n int i = 0;\n //Log.i(\"i\", i + \",\" + results.length());\n JSONObject r = object.getJSONObject(\"result\");\n JSONArray addressComponentsArray = r.getJSONArray(\"address_components\");\n do {\n\n JSONObject addressComponents = addressComponentsArray.getJSONObject(i);\n JSONArray typesArray = addressComponents.getJSONArray(\"types\");\n String types = typesArray.getString(0);\n\n if (types.equalsIgnoreCase(\"sublocality\")) {\n Location = addressComponents.getString(\"short_name\");\n Log.i(\"Locality\", Location);\n\n } else if (types.equalsIgnoreCase(\"locality\")) {\n City = addressComponents.getString(\"long_name\");\n Log.i(\"City\", City);\n\n } else if (types.equalsIgnoreCase(\"administrative_area_level_1\")) {\n State = addressComponents.getString(\"long_name\");\n Log.i(\"State\", State);\n\n } else if (types.equalsIgnoreCase(\"postal_code\")) {\n postal_code = addressComponents.getString(\"long_name\");\n Log.i(\"postal_code\", postal_code);\n } else if (types.equalsIgnoreCase(\"country\")) {\n country = addressComponents.getString(\"long_name\");\n Log.i(\"country\", country);\n }\n\n i++;\n } while (i < addressComponentsArray.length());\n\n\n JSONObject geometry = r.getJSONObject(\"geometry\");\n JSONObject location = geometry.getJSONObject(\"location\");\n\n LAT = location.getString(\"lat\");\n Long = location.getString(\"lng\");\n\n\n /* Log.i(\"JSON Geo Locatoin =>\", currentLocation);\n return currentLocation;*/\n\n String Data = LAT + \",,,\" + Long + \",,,\" + Location + \",,,\" + City + \",,,\" + State + \",,,\" +\n postal_code + \",,,\" + country;\n\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else if (data.code() == 404) {\n\n }\n }\n\n @Override\n public void onFailure() {\n AlertUtils.dismissDialog();\n }\n });\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case Constants.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n mInProgress = false;\n beginAddGeofences(mGeoIds);\n break;\n }\n }\n }", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "private void update_private(LatLngBounds bounds) {\n\t\tJSONObject response = null;\n\n\t\ttry {\n\t\t\tStringBuffer result = new StringBuffer();\n\n\t\t\tURL url = new URL(BASE_URL +\n\t\t\t\t\t\"lang=\" + mLang +\n\t\t\t\t\t\"&north=\" + bounds.getNe().getLat() +\n\t\t\t\t\t\"&south=\" + bounds.getSw().getLat() +\n\t\t\t\t\t\"&east=\" + bounds.getNe().getLng() +\n\t\t\t\t\t\"&west=\" + bounds.getSw().getLng() +\n\t\t\t\t\t\"&maxRows=\" + MAX_SEARCH_RESULTS);\n\t\t\tPLog.d(TAG, \"Sending geonames URL... \", url);\n\t\t\tBufferedReader buf = BufferedReaderFactory.openBufferedReader(url);\n\t\t\tfor (String line; (line = buf.readLine()) != null;) {\n\t\t\t\tresult.append(line).append(\"\\n\");\n\t\t\t}\n\t\t\tbuf.close();\n\t\t\tPLog.d(TAG, \"Geonames result received !\");\n\t\t\tresponse = new JSONObject(result.toString());\n\n\t\t\t/*\n\t\t\t * Once the first response is received, we adjust the real\n\t\t\t * amount of possible responses for next sends.\n\t\t\t */\n\n\t\t\tif (response.has(\"status\")) {\n\t\t\t\t/* No results found on first request */\n\t\t\t\tthrow (new Exception(\"Bad response status : \" + response.getJSONObject(\"status\").getString(\"message\")));\n\t\t\t}\n\n\t\t\tupdateMarkers(bounds,response);\n\n\t\t\t// Trigger a refresh of map display\n\t\t\tmController.getHandler().sendEmptyMessage(Controller.MSG_INVALIDATE_DISPLAY);\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\tPLog.e(TAG, \"Incorrect URL in search method : \", e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tPLog.e(TAG, \"Error while manipulating stream response : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JSONException e) {\n\t\t\tPLog.e(TAG, \"Error JSON while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\tresponse = null;\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tPLog.e(TAG, \"Error while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String mLocality = resultData.getString(Constants.RESULT_DATA_KEY);\n\n // Show a toast message if an address was found.\n if (resultCode == Constants.SUCCESS_RESULT) {\n\n Uri queryUri = LocationsContract.LocationsEntry.CONTENT_URI;\n String[] projection = new String[]{LocationsContract.LocationsEntry.COLUMN_PLACEID};\n String selection = LocationsContract.LocationsEntry.COLUMN_PLACEID + \"=?\";\n String[] selectionArgs = new String[]{UNIQUE_GEOLOCATION_ID};\n\n Cursor locationCursor = getContentResolver().query(queryUri, projection, selection, selectionArgs, null);\n\n if(locationCursor!=null) {\n int isGeolocalityPresent = locationCursor.getCount();\n if (isGeolocalityPresent == 0) {\n SunshineLocationUtils.insertLocation(MainActivity.this, mLocality, mCurrentLocation.getLatitude(),\n mCurrentLocation.getLongitude(), UNIQUE_GEOLOCATION_ID);\n } else {\n SunshineLocationUtils.updateLocation(MainActivity.this, mLocality, mCurrentLocation.getLatitude(),\n mCurrentLocation.getLongitude());\n }\n\n locationCursor.close();\n } else {\n Toast noAddress = Toast.makeText(MainActivity.this, \"\" + getString(R.string.no_address_found), Toast.LENGTH_LONG);\n noAddress.show();\n }\n }\n }", "@Override\n public void onPlaceSelected(Place place) {\n initiateSearch(place.getLatLng());\n }", "@Override\n protected String doInBackground(Void... params) {\n if (HelperRete.isNetworkAvailable(mMainActivity)) {\n\n String queryFormattata = mQueryGrezza.replaceAll(\" \", \"+\" + \"\");\n mQueryTitolo = mQueryGrezza.substring(0,1).toUpperCase() + mQueryGrezza.substring(1);\n\n // creazione url\n String url = \"https://maps.google.com/maps/api/geocode/json\" +\n \"?address=\" + queryFormattata + \"&key=\" + mMainActivity.getString(R.string.google_geoc_key);\n\n JSONObject response = HelperRete.volleySyncRequest(mMainActivity, url);\n\n // ottieni le coordinate dell'indirizzo tramite la risposta di GoogleApi\n try {\n if (response != null) {\n Log.i(\"jsonresp\", response.toString());\n\n double lng = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lng\");\n\n double lat = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lat\");\n\n mCoordinateCercate = new LatLng(lat, lng);\n\n return RICERCA_COMPLETATA;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n return NO_INTERNET;\n }\n\n return null;\n }", "@Override\n public void Handle() {\n fusedLocationClient = LocationServices.getFusedLocationProviderClient(context);\n\n // Fetch the last location\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener((Activity) context, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n Map<String, Double> latlng = new HashMap<String, Double>();\n latlng.put(\"longitude\", location.getLongitude());\n latlng.put(\"latitude\", location.getLatitude());\n Log.d(\"Location\", \"Location retreived \" + latlng.toString());\n result.success(latlng);\n } else {\n Log.d(\"Location\", \"unable to retreive location\");\n result.success(null);\n }\n }\n });\n }", "@Override\n public void onMapClick(LatLng arg0) {\n try {\n Geocoder geo = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> add = geo.getFromLocation(arg0.latitude, arg0.longitude, 1);\n String selectedCountry;\n if (add.size() > 0) {\n selectedCountry = add.get(0).getCountryName();\n selectedStateOrCountry = selectedCountry;\n\n //Log.d(\"country\", selectedCountry);\n //For usa go with states . All other countries - it gives the capital\n if (selectedCountry.equalsIgnoreCase(\"United States\") ||\n selectedCountry.equalsIgnoreCase(\"US\")) {\n selectedStateOrCountry = add.get(0).getAdminArea();\n }\n //Log.d(\"state\", selectedStateOrCountry);\n ConvertTextToSpeech();\n }\n } catch (Exception e) {\n //Log.e(TAG, \"Failed to initialize map\", e);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Check that the result was from the autocomplete widget.\n if (requestCode == REQUEST_CODE_AUTOCOMPLETE) {\n if (resultCode == RESULT_OK) {\n // Get the user's selected place from the Intent.\n Place place = PlaceAutocomplete.getPlace(this, data);\n Log.i(TAG, \"Place Selected: \" + place.getName());\n\n // Format the place's details and display them in the TextView.\n eventEditVenue.setText(place.getName().toString().trim());\n eventEditAddres.setText(place.getAddress().toString().trim());\n\n // Display attributions if required.\n CharSequence attributions = place.getAttributions();\n// if (!TextUtils.isEmpty(attributions)) {\n// mPlaceAttribution.setText(Html.fromHtml(attributions.toString()));\n// } else {\n// mPlaceAttribution.setText(\"\");\n// }\n } else if (resultCode == PlaceAutocomplete.RESULT_ERROR) {\n Status status = PlaceAutocomplete.getStatus(this, data);\n Log.e(TAG, \"Error: Status = \" + status.toString());\n } else if (resultCode == RESULT_CANCELED) {\n // Indicates that the activity closed before a selection was made. For example if\n // the user pressed the back button.\n }\n }\n }", "private void searchQuery(String query) {\n mSearchAheadServiceV3 = new SearchAheadService(this, API_KEY);\n\n String queryString = query;\n\n LatLng surreyBC = new LatLng(49.104599F, -122.823509F);\n\n List searchCollections = Arrays.asList(SearchCollection.AIRPORT, SearchCollection.ADMINAREA,\n SearchCollection.ADDRESS, SearchCollection.FRANCHISE, SearchCollection.POI);\n try {\n SearchAheadQuery searchAheadQuery = new SearchAheadQuery\n .Builder(queryString, searchCollections)\n .location(surreyBC)\n .limit(5)\n .build();\n\n mSearchAheadServiceV3.predictResultsFromQuery(searchAheadQuery,\n new SearchAheadService.SearchAheadResponseCallback() {\n\n @Override\n public void onSuccess(@NonNull SearchAheadResponse searchAheadResponse) {\n\n //Get search results from the request response\n List<SearchAheadResult> searchAheadResults = searchAheadResponse.getResults();\n\n //if we have requests\n if (searchAheadResults.size() > 0) {\n\n //clear the current data to display\n searchResultsData.clear();\n\n try {\n\n int size = (searchAheadResults.size() < 5) ? searchAheadResults.size() : 5;\n\n for (int i = size - 1; i >= 0; i--) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n AddressProperties addressProperties = searchAheadResults.get(i).getPlace().getAddressProperties();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"address\", searchAheadResults.get(i).getName());\n hashMap.put(\"city\", addressProperties.getCity() + \", \" + addressProperties.getStateCode());\n hashMap.put(\"lat\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLatitude()));\n hashMap.put(\"long\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLongitude()));\n\n\n // add this hashmap to the list\n searchResultsData.add(hashMap);\n }\n\n //handle null pointer exception on address properties\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n //adapter inputs\n String[] from = {\n \"address\",\n \"city\",\n \"lat\",\n \"long\"\n };\n\n int[] to = {R.id.text_result_address, R.id.text_result_city, R.id.hidden_location_lat, R.id.hidden_location_long};\n\n searchAdapter = new SimpleAdapter(getApplicationContext(), searchResultsData, R.layout.item_search_result, from, to);\n mListViewSearch.setAdapter(searchAdapter);\n mListViewSearch.setVisibility(View.VISIBLE);\n } else {\n resetSearchAheadList();\n }\n }\n\n @Override\n public void onError(Exception e) {\n Log.e(\"MAPQUEST\", \"Search Ahead V3 Failure\", e);\n }\n });\n } catch (IllegalQueryParameterException e) {\n Log.e(\"Error performing search\", e.getMessage());\n }\n }", "public ReturnData queryEncounterForinfo(){\n ReturnData returnData = new ReturnData();\n String [] jsids = {\"03034a63-e8d6-49a4-8e71-58a544b8fca3\",\n \"1ae3709f-d8c2-4db8-9f38-1a60fb0d2e61\",\n \"7340479a-28fc-44b6-bf18-374f037d5f03\",\n \"e1e5f378-b16f-441e-b673-0f0d2544d108\"};\n try {\n returnData.setData(jueseMapper.selectByPrimaryKey(jsids[MyUuid.getRandomInt(jsids.length)-1]));\n }catch (Exception e){\n returnData.setCode(-1);\n returnData.setData(e.getMessage());\n }finally {\n return returnData;\n }\n }", "private void onFinishReverseGeoCoding(String result) {\n }", "private void onFinishReverseGeoCoding(String result) {\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n final String email = getIntent().getStringExtra(Constant.PROFILE_EMAIL);\n\n /**\n * Setup an observable to handle the results of the search\n * query.\n *\n * If a charity was found with the extracted email, attempt to\n * convert their address to a specific latitude and longitude. */\n final MultiObservable<String> charityAddress = new MultiObservable<>();\n charityAddress.addObserver(new Observer() {\n @Override\n public void update(Observable o, Object arg) {\n getLocationFromAddress(getApplicationContext(), (String) arg);\n }\n });\n\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.collection(\"users\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n int count = 0;\n for (QueryDocumentSnapshot doc : task.getResult()) {\n if (\n doc.get(\"type\").equals(\"charity\")\n && doc.get(\"email\").equals(email)\n ) {\n String address = String.format(\n \"%s, %s, %s\",\n doc.get(\"address\"), doc.get(\"state\"),\n doc.get(\"postcode\")\n );\n charityAddress.setValue(address);\n\n Log.d(TAG, \"Found charity with email: \" + email);\n Log.d(TAG, \"Charity address: \" + address);\n } else if (++count == task.getResult().size()) {\n Log.d(TAG, \"Failed to find charity with email: \" + email);\n }\n }\n } else {\n Log.w(\n TAG, \"Error getting documents.\",\n task.getException());\n }\n }\n });\n }", "private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}", "pb4server.QueryInfoByWorldAskReq getQueryInfoByWorldAskReq();", "@Override\n public void success(FindApiEnvelope weatherDataEnvelope, Response response) {\n BusProvider.getInstance().post(produceMapSearchEvent(OpenWeatherDataParse.parseCurrentWeathers(weatherDataEnvelope)));\n }", "public ArrayList< LocationHandler >findNear ( double lat, double lon){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT \"+ table_location +\".*, \" +\n\t\t\t\t\"(( \" + lat +\" - \" + table_location+\".\"+ key_latitude +\") * (\" + lat +\" - \" + table_location+\".\"+ key_latitude +\") + \" +\n\t\t\t\t\"(\" + lon +\" - \" + table_location+\".\"+ key_longitude +\") * (\" + lon +\" - \" + table_location+\".\"+ key_longitude +\"))\" +\n\t\t\t\t\" AS distance \"+ \n\t\t\t\t\" FROM \" + table_location + \" LEFT JOIN \" + table_locationType + \" ON \" +\n\t\t\t\ttable_location +\".\"+key_type + \" = \" + table_locationType+ \".\" +key_base_id +\n\t\t\t\t\" ORDER BY distance\";\n\t\t//\t\t\t\t\t\" ORDER BY \" + \"ABS( \" + table_location +\".\" +key_latitude + \" - \" + lon + \") \" + \" AND \" \n\t\t//\t\t\t\t\t + \"ABS( \" + table_location +\".\"+ key_longitude + \" - \" + lat + \") \" + \" DESC\";\n\t\tLog.i(TAG, \"near \" + selectQuery);\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6));\n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "@Override\r\n public void onShowQueryResult() {\n }", "@Override\n\t\t\tpublic void onGetReverseGeoCodeResult(ReverseGeoCodeResult arg0) {\n\t\t\t}", "private void updateTargetProductGeocoding() {\n }", "@Override\n\tpublic void onGetPoiResult(PoiResult result) {\n\t\tif (result == null\n\t\t\t\t|| result.error == SearchResult.ERRORNO.RESULT_NOT_FOUND) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tlist = result.getAllPoi();\n\t\t\tif (list != null && list.size() > 0) {\n\t\t\t\tMyLocationData locData = new MyLocationData.Builder()\n\t\t\t\t\t\t.direction(100).latitude(list.get(0).location.latitude)\n\t\t\t\t\t\t.longitude(list.get(0).location.longitude).build();\n\t\t\t\tbaiduMap.setMyLocationData(locData);\n\n\t\t\t\tfor (PoiInfo item : list) {\n\t\t\t\t\tSystem.out.println(\"item:::::::\" + item.name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n\n // Check the action code and determine what to do\n String action = intent.getAction();\n\n // Intent contains information about errors in adding or removing geofences\n if (TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCE_ERROR)) {\n\n handleGeofenceError(context, intent);\n\n // Intent contains information about successful addition or removal of geofences\n } else if (\n TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCES_ADDED)\n ||\n TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCES_REMOVED)) {\n\n handleGeofenceStatus(context, intent);\n\n // Intent contains information about a geofence transition\n } else if (TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCE_TRANSITION)) {\n\n handleGeofenceTransition(context, intent);\n\n // The Intent contained an invalid action\n } else {\n Log.e(GeofenceUtils.APPTAG, getString(R.string.invalid_action_detail, action));\n Toast.makeText(context, R.string.invalid_action, Toast.LENGTH_LONG).show();\n }\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "@Override\n\tpublic List<DisplayResult> getResults(ReferencedEnvelope bounds) {\n\t\t\n\t\tString whereClause = bounds != null ? \"WHERE ST_Transform(geom, 4326) && ST_MakeEnvelope(\"+bounds.getMinX()+\",\"+bounds.getMinY()+\",\"+bounds.getMaxX()+\",\"+bounds.getMaxY()+\") \" : \"\";\n\t\t\n\t\t//Only latest results\n\t\tString query = \"SELECT DISTINCT ON (meshblock_id) id, meshblock_id, operat_score, date_entered, ST_AsText(ST_Transform(centroid,4326)), ST_AsText(ST_Transform(geom,4326)), \"\n\t\t\t\t+ \"natural_elements_score, incivilities_and_nuisance_score, navigation_and_mobility_score, territorial_score \"\n\t\t\t\t+ \"FROM result \"\n\t\t\t\t+ whereClause\n\t\t\t\t+ \"ORDER BY meshblock_id, date_entered DESC;\";\n\n\t\tSystem.out.println(query);\n\t GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n\t WKTReader reader = new WKTReader(geometryFactory);\n\t \n\t\tRowMapper<DisplayResult> rowMapper = (rs, rowNum) -> {\n\t\t\t\n\t\t\tDisplayResult result = new DisplayResult();\n\t\t\tresult.setResultId(rs.getInt(1));\n\t\t\tresult.setMeshblockId(rs.getInt(2));\n\t\t\tresult.setOperatScore(rs.getDouble(3));\n\t\t\t\t\n\t\t\tresult.setNaturalElementsScore(rs.getDouble(7));\n\t\t\tresult.setIncivilitiesScore(rs.getDouble(8));\n\t\t\tresult.setNavigationScore(rs.getDouble(9));\n\t\t\tresult.setTerritorialScore(rs.getDouble(10));\n\t\t\tPoint point;\n\t\t\ttry {\n\t\t\t\tpoint = (Point) reader.read(rs.getString(5));\n\t\t\t\tresult.setCentroid(point.toString());\n\t\t\t\tresult.setLat(point.getCoordinate().y);\n\t\t\t\tresult.setLng(point.getCoordinate().x);\n\t\t\t\t\t\n\t\t\t\tresult.setGeom(rs.getString(6));\n\t\t\t\t\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\treturn jdbcTemplate.query(query, rowMapper);\n\t\t\n\t}", "@Override\n public void success(FindApiEnvelope weatherDataEnvelope, Response response) {\n BusProvider.getInstance().post(produceSearchByCityNameEvent(OpenWeatherDataParse.parseCurrentWeathers(weatherDataEnvelope)));\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1) {\n if(resultCode == RESULT_OK) {\n location = data.getStringExtra(\"EXTRA_PLACE_NAME\");\n place_id = data.getStringExtra(\"EXTRA_PLACE_ID\");\n //lat = data.getDoubleExtra(\"EXTRA_PLACE_LAT\", 0);\n //lng = data.getDoubleExtra(\"EXTRA_PLACE_LNG\", 0);\n\n ViewLocation.setText(location);\n\n }\n }\n }", "private void fetchCafes(){\n DatabaseReference cafeRef = Singleton.get(mainActivity).getDatabase()\n .child(\"cafes\");\n\n // Add Listener when info is recieved or changed\n cafeRef.addValueEventListener(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, MyLatLng> latLngList = new HashMap<>();\n ArrayList<Cafe> cafes = new ArrayList<>();\n for (DataSnapshot locationSnapshot : dataSnapshot.getChildren()) {\n\n\n MyLatLng latLng = locationSnapshot.getValue(MyLatLng.class);\n Cafe cafe = locationSnapshot.getValue(Cafe.class);\n cafes.add(cafe);\n\n latLngList.put(locationSnapshot.getKey(), latLng);\n\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(cafe.getLatitude(), cafe.getLongitude())).title(cafe.getName()));\n marker.setTag(cafe.getId());\n marker.showInfoWindow();\n markers.add(marker);\n\n }\n setOnSearchInputChanged(cafes);\n //listener.onLoadLocationSuccess(latLngList);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n\n }", "public static String findTemp(String lat, String lon) {\n //final String methodPath = \"/entities.electricityusage/\";\n //initialize\n URL url = null;\n String appid = \"appid=f93bd59bea3ab44fb8dba0d95596adfc\";\n HttpURLConnection conn = null;\n String textResult = \"\";\n //making http request\n try {\n url = new URL(WEATHER_URI + \"lat=\" + lat + \"&\" + \"lon=\" + lon + \"&\" +appid);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n return textResult;\n }", "public CompletableFuture<List<Details>> searchTweetByLocation(CompletableFuture<String> geoLocation){\n try{\n String topic= geoLocation.get();\n return searchTweetByTopic(topic);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return null;\n\n }", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "@RequestMapping(value = \"/address\", method = RequestMethod.GET)\n public ResponseEntity<Location> getAddress(@RequestParam(\"latlng\") String latlng){\n ResponseEntity<Location> responseEntity = null;\n\n //Splits geocode into individual latitude and longitude\n Geocode geocode = splitLatLng(latlng);\n\n // Get address from geocode\n Location location = geoLocationService.getAddress(geocode);\n\n if (location.getAddress() != null){\n responseEntity= new ResponseEntity<Location>(location, HttpStatus.OK);\n }else{\n responseEntity= new ResponseEntity<Location>(location, HttpStatus.NO_CONTENT);\n }\n\n return responseEntity;\n }", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tif (LocationClient.hasError(intent)) {\n\t\t\t// Get the error code with a static method\n\t\t\tint errorCode = LocationClient.getErrorCode(intent);\n\t\t\t// Log the error\n\t\t\tLog.e(\"ReceiveTransitionsIntentService\",\n\t\t\t\t\t\"Location Services error: \" + Integer.toString(errorCode));\n\t\t\t\n\t\t\tLog.i(\"LOC NOT\", \"Got an error\");\n\t\t\t/*\n\t\t\t * You can also send the error code to an Activity or Fragment with\n\t\t\t * a broadcast Intent\n\t\t\t */\n\t\t\t/*\n\t\t\t * If there's no error, get the transition type and the IDs of the\n\t\t\t * geofence or geofences that triggered the transition\n\t\t\t */\n\t\t} else {\n\t\t\t// Get the type of transition (entry or exit)\n\t\t\n\t\t\t\n\t\t\tint transitionType = LocationClient.getGeofenceTransition(intent);\n\t\t\t\n\t\t\t\n\t\t\t// Test that a valid transition was reported\n\t\t\tif ((transitionType == Geofence.GEOFENCE_TRANSITION_ENTER)\n\t\t\t\t\t|| (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT)) {\n\t\t\t\t\n\t\t\t\tList<Geofence> triggerList = LocationClient.getTriggeringGeofences(intent);\n\t\t\t\tGeofence current = triggerList.get(0);\n\t\t\t\tString[] triggerIds = new String[triggerList.size()];\n\n\t\t\t\tfor (int i = 0; i < triggerIds.length; i++) {\n\t\t\t\t\t// Store the Id of each geofence\n\t\t\t\t\ttriggerIds[i] = triggerList.get(i).getRequestId();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgenerateNotification(transitionType, current);\n\t\t\t\t//notification();\n\t\t\t\tnewNotification(current);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * At this point, you can store the IDs for further use display\n\t\t\t\t * them, or display the details associated with them.\n\t\t\t\t */\n\t\t\t}\n\t\t\t// An invalid transition was reported\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tLog.i(\"LOC NOT\", \"not a valid transition\");\n\t\t\t\t\n\t\t\t\tLog.e(\"ReceiveTransitionsIntentService\",\n\t\t\t\t\t\t\"Geofence transition error: \");\n\n\t\t\t}\n\t\t}\n\t}", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "public void handleSearchQuery(String query) {\n // Iterate through Spot list looking for a Spot whose name matches the search query String\n for (Spot spot : mSpotList) {\n if (spot.getName().equalsIgnoreCase(query)) {\n mMap.addCircle(new CircleOptions()\n .center(new LatLng(spot.getLatLng().latitude, spot.getLatLng().longitude))\n .radius(10)\n .strokeColor(Color.BLACK) // Border color of the circle\n // Fill color of the circle.\n // 0x represents, this is an hexadecimal code\n // 55 represents percentage of transparency. For 100% transparency, specify 00.\n // For 0% transparency ( ie, opaque ) , specify ff\n // The remaining 6 characters(00ff00) specify the fill color\n .fillColor(0x8800ff00)\n // Border width of the circle\n .strokeWidth(2)); // Todo: Make this transparent blue?\n\n // To change the position of the camera, you must specify where you want\n // to move the camera, using a CameraUpdate. The Maps API allows you to\n // create many different types of CameraUpdate using CameraUpdateFactory.\n // Animate the move of the camera position to spot's coordinates and zoom in\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(spot.getLatLng(), 18)),\n 2000, null);\n break;\n }\n }\n }", "public void calculateDistance() {\n\t\tdouble lon = coordinates.getLongitude(); // your longitude\n\t\tdouble lat = coordinates.getLatitude(); // your latitude\n\n\t\tString distanceQueryString = \"SELECT loc, \"\n\t\t\t\t+ \"(:earthRadius * FUNC('acos', FUNC('cos', FUNC('radians', :latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.longitude) - FUNC('radians', :longitude)) + \"\n\t\t\t\t+ \"FUNC('sin', FUNC('radians', :latitude)) * FUNC('sin', FUNC('radians', loc.latitude)) ) ) AS distance \"\n\t\t\t\t+ \"FROM Location loc \"\n\t\t\t\t+ \"WHERE ((:earthRadius * FUNC('acos', FUNC('cos', FUNC('radians', :latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.longitude) - FUNC('radians', :longitude)) + \"\n\t\t\t\t+ \"FUNC('sin', FUNC('radians', :latitude)) * FUNC('sin', FUNC('radians', loc.latitude)) ) )<= :searchRadius) \"\n\t\t\t\t+ \"ORDER BY distance\";\n\n\t\tQuery query = entityManager.createQuery(distanceQueryString);\n\t\tquery.setParameter(\"latitude\", lat);\n\t\tquery.setParameter(\"longitude\", lon);\n\t\tquery.setParameter(\"searchRadius\", searchRadius);\n\t\tquery.setParameter(\"earthRadius\", EARTH_RADIUS);\n\t\tquery.setMaxResults(limit);\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object[]> rows = query.getResultList();\n\t\tList<Location> sortedLocations = new ArrayList<>(rows.size());\n\t\tfor (Object[] row : rows) {\n\t\t\tsortedLocations.add((Location) row[0]);\n\t\t}\n\n\t\tCity city;\n\t\tMap<City, Double> unsortedMap = new HashMap<>();\n\n\t\tfor (Location entity : sortedLocations) {\n\t\t\tcity = entity.getCity();\n\t\t\tdouble distance = getDistanceFromBounds(new Coordinates(lat, lon), city.getBounds());\n\t\t\tunsortedMap.put(city, distance);\n\t\t}\n\n\t\tMap<City, Double> sortedMap = unsortedMap.entrySet().stream().sorted(Entry.comparingByValue())\n\t\t\t\t.collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\n\n\t\tfor (Map.Entry<City, Double> entry : sortedMap.entrySet()) {\n\t\t\tif (entry.getValue() == 0.0) {\n\t\t\t\tSystem.out.println(\"Point is inside the bounds of \" + entry.getKey().getName() + \"(\"\n\t\t\t\t\t\t+ entry.getKey().getCountry() + \")\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.out.printf(\"%.4f\", entry.getValue());\n\t\t\t\tSystem.out.println(\" km. - \" + entry.getKey().getName() + \"(\" + entry.getKey().getCountry() + \")\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\n\t\tif(arg0==1&&arg1==RESULT_OK){\n\t\t\tif(arg2.getStringExtra(\"name\")==null)\n\t\t\t\treturn;\n\t\t\tarea=arg2.getStringExtra(\"name\");\n\t\t\tcode=arg2.getStringExtra(\"code\");\n\t\t\tcity=arg2.getStringExtra(\"city\");\n\t\t\tet_region.setText(arg2.getStringExtra(\"name\"));\n\t\t\tiv_loc.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif(arg0==2&&arg1==RESULT_OK){\n\t\t\tif (arg2 == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t ContentResolver reContentResolverol = getContentResolver(); \n\t\t\t\t Uri contactData = arg2.getData();\n\t\t\t\t //查询就是输入URI等参数,其中URI是必须的,其他是可选的,如果系统能找到URI对应的ContentProvider将返回一个Cursor对象.\n\t\t\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\t\t\t\tCursor cursor = managedQuery(contactData, null, null, null, null); \n\t\t\t\t cursor.moveToFirst(); \n\t\t\t\t //获得DATA表中的名字\n\t\t\t\t name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); \n\t\t\t\t //条件为联系人ID\n\t\t\t\t et_name.setText(name);\n\t\t\t\t String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID)); \n\t\t\t\t // 获得DATA表中的电话号码,条件为联系人ID,因为手机号码可能会有多个\n\t\t\t\t Cursor phone = reContentResolverol.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, \n\t\t\t\t null, \n\t\t\t\t ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + contactId, \n\t\t\t\t null, \n\t\t\t\t null); \n\t\t\t\t while (phone.moveToNext()) { \n\t\t\t\t phone_number = phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); \n\t\t\t\t if(!phone_number.equals(\"\"))\n\t\t\t\t et_phone.setText(phone_number);\n\t\t\t\t } \n\t\t\t\t \n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tint wkid = map.getSpatialReference().getID();\n\n\t\t\t\t\t\t\tLocator locator = Locator\n\t\t\t\t\t\t\t\t\t.createOnlineLocator(floorInfo\n\t\t\t\t\t\t\t\t\t\t\t.getLocatorServerPath());\n\t\t\t\t\t\t\t// Create suggestion parameter\n\t\t\t\t\t\t\tLocatorFindParameters params = new LocatorFindParameters(\n\t\t\t\t\t\t\t\t\taddress);\n\n\t\t\t\t\t\t\t// ArrayList<String> outFields = new\n\t\t\t\t\t\t\t// ArrayList<String>();\n\t\t\t\t\t\t\t// outFields.add(\"*\");\n\t\t\t\t\t\t\t// params.setOutFields(outFields);\n\t\t\t\t\t\t\t// Set the location to be used for proximity based\n\t\t\t\t\t\t\t// suggestion\n\t\t\t\t\t\t\t// params.setLocation(map.getCenter(),map.getSpatialReference());\n\t\t\t\t\t\t\t// Set the radial search distance in meters\n\t\t\t\t\t\t\t// params.setDistance(50000.0);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlocatorResults = locator.find(params);\n\t\t\t\t\t\t\t\t// HashMap<String, String> params = new\n\t\t\t\t\t\t\t\t// HashMap<String,\n\t\t\t\t\t\t\t\t// String>();\n\t\t\t\t\t\t\t\t// params.put(\"货架编号\", address);\n\t\t\t\t\t\t\t\t// locatorResults = locator.geocode(params,\n\t\t\t\t\t\t\t\t// null,\n\t\t\t\t\t\t\t\t// map.getSpatialReference());\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 出错:\"\n\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (locatorResults != null\n\t\t\t\t\t\t\t\t\t&& locatorResults.size() > 0) {\n\t\t\t\t\t\t\t\t// Add the first result to the map and zoom to\n\t\t\t\t\t\t\t\t// it\n\t\t\t\t\t\t\t\tfor (LocatorGeocodeResult result : locatorResults) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 结果:\"\n\t\t\t\t\t\t\t\t\t\t\t+ result.getAddress());\n\n\t\t\t\t\t\t\t\t\tif (result.getAddress() != null\n\t\t\t\t\t\t\t\t\t\t\t&& address.equals(result\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getAddress())) {\n\n\t\t\t\t\t\t\t\t\t\tfloorInfo.getShelfList().add(result);\n\t\t\t\t\t\t\t\t\t\t// shelfList.add(result);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsearchTime++;\n\t\t\t\t\t\t\tSystem.out.println(\"已查找次数:\" + searchTime);\n\t\t\t\t\t\t\tif (searchTime >= mSearchCount) {\n\t\t\t\t\t\t\t\tmHandler.post(mMarkAndRoute);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n Map<String, Double> latlng = new HashMap<String, Double>();\n latlng.put(\"longitude\", location.getLongitude());\n latlng.put(\"latitude\", location.getLatitude());\n Log.d(\"Location\", \"Location retreived \" + latlng.toString());\n result.success(latlng);\n } else {\n Log.d(\"Location\", \"unable to retreive location\");\n result.success(null);\n }\n }", "@Override\r\n protected Void doInBackground(Void... arg0) {\n findNearLocation();\r\n return null;\r\n }", "@Override\n public List<Map<String, Object>> tareasOrdenadasPorDistancia(long id_emergencia){\n try(Connection conn = sql2o.open()){\n List<Emergencia> emergencia = conn.createQuery(\"SELECT ST_X(ST_AsText(ubicacion)) AS longitud, ST_Y(ST_AsText(ubicacion)) AS latitud FROM emergencia WHERE id = :id_eme\")\n .addParameter(\"id_eme\", id_emergencia)\n .executeAndFetch(Emergencia.class);\n String punto = \"POINT(\" + emergencia.get(0).getLongitud() + \" \" + emergencia.get(0).getLatitud() + \")\";\n return conn.createQuery(\"SELECT id, nombre, ST_X(ST_AsText(ubicacion)) AS longitud, ST_Y(ST_AsText(ubicacion)) AS latitud, ST_Distance(ST_GeomFromText(:tar_punto, 4326), ubicacion::geography) AS distancia FROM tarea WHERE id_emergencia = :id_eme ORDER BY distancia ASC\")\n .addParameter(\"tar_punto\", punto)\n .addParameter(\"id_eme\", id_emergencia)\n .executeAndFetchTable()\n .asList();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return null;\n }\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n\n\n T.t(TripMapsActivity.this, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "@Override\n\tpublic Map<String, Object> fingViolationCarInfo(String query) throws Exception {\n\t\treturn responsitory.fingViolationCarInfo(query);\n\t}", "public ArrayList< LocationHandler >findNear (String tag, double lat, double lon){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT \"+ table_location +\".*, \" +\n\t\t\t\t\"(( \" + lat +\" - \" + table_location+\".\"+ key_latitude +\") * (\" + lat +\" - \" + table_location+\".\"+ key_latitude +\") + \" +\n\t\t\t\t\"(\" + lon +\" - \" + table_location+\".\"+ key_longitude +\") * (\" + lon +\" - \" + table_location+\".\"+ key_longitude +\"))\" +\n\t\t\t\t\" AS distance \"+ \n\t\t\t\t\" FROM \" + table_location + \" LEFT JOIN \" + table_locationType + \" ON \" +\n\t\t\t\ttable_location +\".\"+key_type + \" = \" + table_locationType+ \".\" +key_base_id\n\t\t\t\t+ \" WHERE \" + table_locationType +\".\"+key_name + \" LIKE \" + \"'%\" + tag + \"%'\" +\n\t\t\t\t\" ORDER BY distance\";\n\t\t//\t\t\t\t\t\" ORDER BY \" + \"ABS( \" + table_location +\".\" +key_latitude + \" - \" + lon + \") \" + \" AND \" \n\t\t//\t\t\t\t\t + \"ABS( \" + table_location +\".\"+ key_longitude + \" - \" + lat + \") \" + \" DESC\";\n\t\tLog.i(TAG, \"near \" + selectQuery);\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6));\n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "public String execGetMapGeneFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n }\n\n\n\n int offset = -1;\n int limit = -1;\n\n int pageno = 0;\n int pagesize = 0;\n int totalcount = -1;\n\n if( (this.totalCount!=null && this.totalCount.equals(\"-1\")==false)){\n totalcount = Integer.parseInt(totalCount);\n }\n\n if(this.isFirstSearchFlag == 0){\n if(totalCount != null && totalCount.length()>0){\n totalcount = Integer.parseInt(totalCount);\n }\n }\n\n if(this.pageNo != null ){\n pageno = (int)this.pageNo;\n }\n\n if(this.pageSize != null ){\n pagesize = (int) this.pageSize;\n }\n\n\n if(totalcount != -1){\n page = new Page(totalcount, pageno, pagesize, 0);\n\n if (this.page.getPageSize() > totalcount){\n offset = this.page.getRowFrom() -1 ;\n limit = totalcount ;\n }else {\n offset = this.page.getRowFrom() -1;\n limit = this.page.getPageSize() ;\n }\n }else{\n //first compute count\n offset = 0 ;\n limit =10;\n\n map.put(\"count\",\"count\");\n GwasAssociationBean gwasbean = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",map);\n if(gwasbean!=null ){\n System.out.println(\"count=\"+gwasbean.getTraitCount());\n totalcount = gwasbean.getTraitCount();\n }\n map.remove(\"count\");\n }\n\n\n List<GwasAssociationBean> t_gwasAssociationList =(List<GwasAssociationBean>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",map);\n\n if(t_gwasAssociationList != null && t_gwasAssociationList.size()>0) {\n\n List traitlist = new ArrayList();\n for (GwasAssociationBean gwas : t_gwasAssociationList) {\n System.out.println(\"gwas.getGenotypeId()\"+gwas.getGenotypeId());\n traitlist.add(gwas.getGenotypeId());\n }\n Map t = new HashMap();\n t.put(\"genotypelist\",traitlist);\n\n this.genotypeAnnotateGeneViewList = (List<GenotypeAnnotateGeneView>) baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n\n }\n\n return SUCCESS;\n\n }", "private void getLocation() {\n fields = Arrays.asList(Place.Field.ID, Place.Field.NAME, Place.Field.LAT_LNG);\n\n // Start the autocomplete intent.\n Intent intent = new Autocomplete.IntentBuilder(\n AutocompleteActivityMode.FULLSCREEN, fields)\n .build(this);\n startActivityForResult(intent, AUTOCOMPLETE_REQUEST_CODE);\n }", "private SearchResult<ProviderProfile> getAllResults(HealthCareFacilitySearchCriteria criteria,\n String providerCatagory) throws URISyntaxException, IOException, ServiceException {\n DefaultHttpClient client = new DefaultHttpClient();\n client.setRedirectStrategy(new LaxRedirectStrategy());\n\n // we need to get a token from the start page, this will be stored in the client\n HttpGet getFrontPage = new HttpGet(new URIBuilder(getSearchURL()).build());\n HttpResponse response = client.execute(getFrontPage);\n verifyAndAuditCall(getSearchURL(), response);\n EntityUtils.consume(response.getEntity()); // releases the connection\n\n // our client is now valid, pass the criteria to the search page\n String postSearchURL = Util.replaceLastURLPart(getSearchURL(), \"showprovideroutput.cfm\");\n HttpPost searchPage = new HttpPost(new URIBuilder(postSearchURL).build());\n String whichArea = \"\", selectCounty = \"0\", cityToFind = \"\", providerToFind = \"\";\n if (\"county\".equals(criteria.getCriteria())) {\n whichArea = \"County\";\n selectCounty = criteria.getValue();\n } else if (\"city\".equals(criteria.getCriteria())) {\n whichArea = \"City\";\n cityToFind = criteria.getValue();\n } else if (\"provider\".equals(criteria.getCriteria())) {\n whichArea = \"Name\";\n providerToFind = criteria.getValue();\n }\n HttpEntity entity = postForm(postSearchURL, client, searchPage, new String[][] {\n { \"ProviderCatagory\", providerCatagory }, { \"WhichArea\", whichArea }, { \"Submit\", \"Submit\" },\n { \"SelectCounty\", selectCounty }, { \"CityToFind\", cityToFind },\n { \"ProviderToFind\", providerToFind } }, true);\n\n List<ProviderProfile> allProviders = new ArrayList<ProviderProfile>();\n // this now holds the search results, parse every row\n Document page = Jsoup.parse(EntityUtils.toString(entity));\n Elements rows = page.select(\"div#body table tbody tr:gt(0)\");\n for (Element row : rows) {\n ProviderProfile profile = parseProfile(row.children());\n if (profile != null) {\n allProviders.add(profile);\n }\n }\n\n SearchResult<ProviderProfile> results = new SearchResult<ProviderProfile>();\n results.setItems(allProviders);\n return results;\n }", "@ApiOperation(value = \"retourne la liste des habitants vivant à l’adresse donnée\")\n @GetMapping(\"/fire\")\n public PersonsInFirestationAddressResponse getPeopleInFirestationAddress(@RequestParam String address){\n return firestationService.getPeopleByFirestationAddress(address);\n }", "public void getPlacesFor(String query, SimpleLocation location, PlacesFetchListener listener) {\n this.location = location;\n this.listener = listener;\n\n // if offline or user prefers offline, get places from local database\n if (!nm.connectedToInternet() || Prefs.offline) {\n db.findPlacesByName(query, listener);\n } else { // else fetch from API endpoint\n String url = getRequestUrl(query);\n Log.i(C.TAG, \"url: \" + url);\n nm.makeGETRequest(url, this);\n }\n\n }", "private ResultSet getSpatialQueryResults(final Connection conn, final SearchRegion region) throws SQLException {\n final Statement stmt = conn.createStatement();\n final double lx = region.getLx(), ly = region.getLy(), rx = region.getRx(), ry = region.getRy();\n\n //Careful about the precision of the float from string formatter\n final String spatial_query = String.format(\"SELECT * FROM item_location WHERE \"\n + \"MBRContains(GeomFromText('Polygon((%f %f, %f %f, %f %f, %f %f, %f %f))'), coord)\", \n lx, ly, lx, ry, rx, ry, rx, ly, lx, ly);\n return stmt.executeQuery(spatial_query);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n // Check the action code and determine what to do\n String action = intent.getAction();\n\n // Intent contains information about errors in adding or removing geofences\n if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCE_ERROR)) {\n\n handleGeofenceError(context, intent);\n\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_ADDED) || TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_REMOVED)) {\n\n handleGeofenceStatus(context, intent);\n\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_TRANSITION)) {\n\n \thandleGeofenceTransition(context, intent);\n \t\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_REFRESH_STATUS_LIST)) {\n\n \thandleActivityStatus(context, intent);\n \t \t\n } else {\n \t\n Log.e(ClientSideUtils.APPTAG, getString(R.string.invalid_action_detail, action));\n Toast.makeText(context, R.string.invalid_action, Toast.LENGTH_LONG).show();\n }\n }" ]
[ "0.62086153", "0.60002273", "0.59638995", "0.5807675", "0.57891744", "0.56403184", "0.5603463", "0.54775006", "0.54085666", "0.5386164", "0.5375096", "0.5328885", "0.532189", "0.53129303", "0.5310012", "0.52274275", "0.52180725", "0.52096516", "0.51890314", "0.5176349", "0.5173572", "0.516213", "0.5153122", "0.51512563", "0.51144964", "0.5113909", "0.5078041", "0.5077184", "0.50485146", "0.50386304", "0.5037114", "0.5015955", "0.5007586", "0.5003566", "0.4989983", "0.4985678", "0.49806637", "0.49787742", "0.49785578", "0.49737743", "0.4968032", "0.49533445", "0.49470738", "0.4941501", "0.49299172", "0.4926634", "0.49176118", "0.4916872", "0.48953167", "0.48763213", "0.48727855", "0.48664123", "0.48498702", "0.4846588", "0.48457873", "0.4845398", "0.4844884", "0.48429704", "0.48429704", "0.48398724", "0.48269925", "0.4806885", "0.47887814", "0.4774146", "0.4765795", "0.47645366", "0.4762825", "0.47542343", "0.47532126", "0.4749579", "0.4749537", "0.47495204", "0.4746083", "0.47375455", "0.47341555", "0.47306702", "0.47276205", "0.47202727", "0.47167635", "0.47110146", "0.47079387", "0.46998706", "0.46868837", "0.46853912", "0.46851048", "0.46841496", "0.46725908", "0.46690708", "0.46662483", "0.46637344", "0.46587676", "0.46444905", "0.46399885", "0.46208", "0.4619288", "0.46116355", "0.4604656", "0.4603333", "0.46013564", "0.45993352" ]
0.61919886
1
Updates map view to reflect user's new location
@Override public void handleLocationChange(Location newLocation) { super.handleLocationChange(newLocation); MainActivity mainActivity = (MainActivity) getActivity(); mainActivity.getGeofenceMonitor().handleLocationChange(newLocation); setCamera(); if(mainActivity.getGeofenceMonitor().currentLocation != null) { if(debugMode) { TextView txt_lat = (TextView) view.findViewById(R.id.txt_lat); TextView txt_long = (TextView) view.findViewById(R.id.txt_long); txt_lat.setVisibility(View.VISIBLE); txt_long.setVisibility(View.VISIBLE); txt_lat.setText("Latitude: " + mainActivity.getGeofenceMonitor().currentLocation.getLatitude()); txt_long.setText("Longitude: " + mainActivity.getGeofenceMonitor().currentLocation.getLongitude()); } setUpMapIfNeeded(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onLocationChange(Location loc) {\n user.setRelativePosition(loc.getX(), loc.getY());\n map.addStep(new PointF(loc.getX(), loc.getY()));\n //messageHandler.sendEmptyMessage(MESSAGE_REFRESH);\n }", "@Override\r\n\tpublic void onLocationChange(Location loc) {\n\t\tuser.setRelativePosition(loc.getX(), loc.getY());\r\n\t\tmap.addStep(new PointF(loc.getX(),loc.getY()));\r\n\t\tmessageHandler.sendEmptyMessage(MESSAGE_REFRESH);\r\n\t}", "public void updateLocation();", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\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 }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\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 }\n }", "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 }", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\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 }", "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 }", "@Override\n public void onLocationChanged(MapWidget v, Location location) {\n }", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\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 }", "@Override\npublic void onLocationChanged(Location location) {\nString lat = String.valueOf(location.getLatitude());\nString lon = String.valueOf(location.getLongitude());\nLog.e(\"GPS\", \"location changed: lat=\"+lat+\", lon=\"+lon);\n//tv.setText(\"lat=\"+lat+\", lon=\"+lon);\nLatLng coordinates = new LatLng(location.getLatitude(), location.getLongitude()); \nmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinates, 12));\n\n\n//Update Value of Lat Long\n}", "public void onLocationChanged(Location argLocation) {\n\t GeoPoint myGeoPoint = new GeoPoint(\r\n\t (int)(argLocation.getLatitude()*1000000),\r\n\t (int)(argLocation.getLongitude()*1000000));\r\n\t /*\r\n\t * it will show a message on \r\n\t * location change\r\n\t Toast.makeText(getBaseContext(),\r\n\t \"New location latitude [\" +argLocation.getLatitude() +\r\n\t \"] longitude [\" + argLocation.getLongitude()+\"]\",\r\n\t Toast.LENGTH_SHORT).show();\r\n\t */\r\n\r\n\t mapController.animateTo(myGeoPoint);\r\n\r\n\t }", "@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "public void refresh() {\n if (mMarkerView != null) {\n mMarkerView.setLatLng(GeoJSONUtils.toLatLng(mCoordinate));\n }\n }", "private void updateLocationUI() {\n if (mCurrentLocation != null) {\n Log.e(\"UPDATE GEO\", \"LAT \" + mCurrentLocation.getLatitude() + \" LON \" +\n mCurrentLocation.getLongitude() + \" LAST UPDATE \" + mLastUpdateTime);\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng newLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (marker == null) {\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n textView.setText(\"Your Current Location: \" + address); //For Testing, display coordinates on textView every time it's triggered\n marker = mMap.addMarker(new MarkerOptions().position(newLocation).title(\"Your current location:\"));\n arrayMarker.add(0, marker);\n builder.include(marker.getPosition());\n marker.setSnippet(address);\n } else {\n marker.setPosition(newLocation);\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n// textView.setText(\"\\nCurrent Location: \" + address);\n marker.setTitle(\"Your current location:\");\n marker.setSnippet(address);\n }\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 14.0f));\n renderCamera();\n }", "@Override\n public void onLocationChanged(Location location) {\n Log.d(\"GeoPost Location\", \"Location update received: \" + location.toString());\n\n mMap.clear();\n\n latitudine = location.getLatitude();\n longitudine = location.getLongitude();\n myPosition = new LatLng(latitudine, longitudine);\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"Marker in myPosition\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myPosition, 15));\n Log.d(\"GeoPost Location\", \"lat: \"+latitudine+\" longi: \"+longitudine);\n\n }", "@Override\n public void onLocationChanged(Location location) {\n updateLocation(location);\n }", "@Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equals(\"gps\")){\n\n locationManager.removeUpdates(this);\n }\n LatLng user_location = new LatLng(location.getLatitude(), location.getLongitude());\n m1.setPosition(user_location);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_location, 16));\n\n }", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onLocationChanged(Location newlocation) {\n\t\t\t\t\n\t\t\t\tif (newlocation != null) \n\t\t\t\t{\n\t\t\t\t\tlocationManager.removeUpdates(this);\n\t\t\t\t\tpoint=getGeoPoint(newlocation);\n\t\t\t\t\t//String altitiude = \"Altitiude: \" + newlocation.getAltitude();\n\t\t\t\t\t//String accuracy = \"Accuracy: \" + newlocation.getAccuracy();\n\t\t\t\t\t//String time = \"Time: \" + newlocation.getTime();\n\t\t\t\t\tmapController.animateTo(point);\n\t\t\t\t\t\n\t\t\t\t\tlatitudes= String.valueOf(newlocation.getLatitude() * 1E6);\n\t\t\t\t\tlongitudes= String.valueOf (newlocation.getLongitude() * 1E6);\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"latd\",latitudes));\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"lotd\",longitudes));\n\t\t\t\t\tnameValuePairs.add(new BasicNameValuePair(\"id\",LoginId));\n\t\t\t\t\tArrayList<NameValuePair> result=db.getServerData(nameValuePairs,\"updatecoordinates.php\");\n\t\t\t\t\tnameValuePairs.clear();\n\t\t\t\t\tfor(int i=0;i<result.size();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ts=result.get(i).getName();\n\t\t\t\t\t\tif(s.equals(\"Error\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast tt=Toast.makeText(MapViewActivity.this, \"Co-Ords Updated\", 3000);\n\t\t\t\t\t\t\ttt.setGravity(Gravity.CENTER, 0, 15);\n\t\t\t\t\t\t\ttt.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast tt=Toast.makeText(MapViewActivity.this, \"Co-Ords Updated Error\", 3000);\n\t\t\t\t\t\t\ttt.setGravity(Gravity.CENTER, 0, 15);\n\t\t\t\t\t\t\ttt.show();break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresult.clear();\n\t\t\t\t\t\n\t\t\t\t\tmapView.invalidate();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void updateUserPosition()\n {\n LatLng current = new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude());\n circle.setCenter(current);\n Log.i(\"ZOOM:\", \" \" + mMap.getCameraPosition().zoom);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));//move map to the user's position\n updateMap();\n }", "@Override\n\tpublic void onLocationChanged(android.location.Location arg0) {\n\t\tif(gmapFlag == true){\n\t\t\tmyLocation = new LatLng(arg0.getLatitude(), arg0.getLongitude());\n\t\t}\n\t\t\n\t\t\n\t}", "void setMapChanged();", "protected void updateLocationUI() {\n if (mCurrentLocation != null) {\n //TrackDataCSVHelper myCSV2 = new TrackDataCSVHelper();\n //mDistanceFromWaypointText.setText(String.valueOf(myCSV2.getLon(track, this))); //<-- used this to test getting proper lat/lon\n //mDistanceFromWaypointText.setText(String.format(\"%s: %f\", \"Dist from WP\", mDistanceFromWaypoint));\n //mZoneStatusText.setText(\"IN THE ZONE? \" + mIsInZone);\n //mNumberUpdates.setText(String.valueOf(mNum));\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n drawUserMarker(location);\n }", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 17.0f));\n }", "@Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void updateUserLocation(Location location) {\n locationSelectorPresenter.setUserLocationGoogleMarker(location);\n }", "private void updateLocationUI() {\n mCurrentLocationStr = mCurrentPlace.getAddress().toString();\n mCurrentLatLng = mCurrentPlace.getLatLng();\n if(mCurrentLocationStr.isEmpty())\n mCurrentLocationStr = String.format(\"(%.2f, %.2f)\",mCurrentLatLng.latitude, mCurrentLatLng.longitude);\n\n mAddLocation.setText(mCurrentLocationStr);\n mAddLocation.setTextColor(mSecondaryTextColor);\n mClearLocation.setVisibility(View.VISIBLE);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng currentLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLocation));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n double latitude = location.getLatitude();\n\n // Getting longitude of the current location\n double longitude = location.getLongitude();\n\n // Creating a LatLng object for the current location\n LatLng latLng = new LatLng(latitude, longitude);\n\n // Showing the current location in Google Map\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Zoom in the Google Map\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n\tpublic void locationChanged(Location newLocation) {\n\t\tshowOnMap(newLocation);\n\t\tgiveNavigationInstructions(newLocation);\n\t}", "public void onLocationChanged(Location location) {\r\n double latitude = location.getLatitude();\r\n double longitude = location.getLongitude();\r\n controller.setLocation(new LatLng(latitude, longitude));\r\n }", "public void onLocationChanged(Location location) {\r\n currentLocation = new GeoPoint(location);\r\n DatabaseInteractor.sendPosition(act, PreferenceData.getUserId(act), currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\t\tguidoMap.showMyLocation();\r\n }", "private void updateScreenLoc(LatLng loc){\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(START_ZOOM), 2000, null);//2000 animates it for 2 seconds. Zoom lvl 10\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if (checkPermissions()) {\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n mMap.addMarker(new MarkerOptions().position(currLocation).title(\"Current Location\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currLocation));\r\n getLastLocation();\r\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n }\n }", "private void updateMyLocation(ObjectLocation location){\n if(mMap==null)\n return;\n\n if(currentLocation==null){\n LatLng latLng = new LatLng(location.getLat(),location.getLng());\n Bitmap icon = ((BitmapDrawable)userImage.getDrawable()).getBitmap();\n Bitmap smallIcon = Bitmap.createScaledBitmap(icon,100,100,false);//Sony xperia mini 40x40\n MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(\"Me\").icon(BitmapDescriptorFactory.fromBitmap(smallIcon));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,18));\n\n currentLocation = mMap.addMarker(markerOptions);\n markerOnClick.put(currentLocation,new MyMarker(user.getId(),true));\n\n ((MyApplication) this.getApplication()).setCurrentLocation(latLng);\n }else{\n animateMarker(currentLocation,new LatLng(location.getLat(),location.getLng()),new LatLngInterpolator.Linear());\n ((MyApplication) this.getApplication()).setCurrentLocation(new LatLng(location.getLat(),location.getLng()));\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@Override\n public void updateLocation(Location location) {\n if (location != null ) {\n Timber.e(\"updated location %1$s %2$s\", location.getLatitude(), location.getLongitude());\n\n CameraPosition cameraPosition = new CameraPosition.Builder().target(\n new LatLng(location.getLatitude(), location.getLongitude())).zoom(20).build();\n\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n points.add(latLng);\n Polyline route = googleMap.addPolyline(new PolylineOptions()\n .width(30)\n .color(R.color.colorMapLine)\n .geodesic(false)\n .zIndex(1000));\n route.setPoints(points);\n\n writeToFile(\"Lati: \" + location.getLatitude() + \" , Longi: \" + location.getLongitude(), context);\n\n Timber.e(\"Main Activity updated location %1$s %2$s\", location.getLatitude(), location.getLongitude());\n Toast.makeText(MainActivity.this, \"Lati: \" + location.getLatitude() + \" , Longi: \" + location.getLongitude(), Toast.LENGTH_LONG).show();\n }\n }", "public abstract void updateLocations();", "private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n //Adding marker to map\n mMap.addMarker(new MarkerOptions()\n .position(latLng) //setting position\n .draggable(true) //Making the marker draggable\n .title(\"you are here\")); //Adding a title\n\n //Moving the camera\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n //Animating the camera\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n //Displaying current coordinates in toast\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latitude, longitude);\n }", "public void updateLocation(LatLng location){\n if ( Build.VERSION.SDK_INT >= 23 &&\n ContextCompat.checkSelfPermission( this, android.Manifest.permission.ACCESS_FINE_LOCATION ) != PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission( this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return ;\n }\n\n //allow map to display mockLocations\n mMap.setMyLocationEnabled(true);\n\n //setup Location manager\n Location mockLocation= new Location(LocationManager.GPS_PROVIDER);\n\n //build mock location using LatLng passed in\n mockLocation.setLatitude(location.latitude);\n mockLocation.setLongitude(location.longitude);\n mockLocation.setAltitude(0);\n mockLocation.setTime(System.currentTimeMillis());\n mockLocation.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());\n mockLocation.setAccuracy(5);\n\n //add mockLoction to the manager\n mLocationManager.setTestProviderLocation(LocationManager.GPS_PROVIDER, mockLocation);\n mCurrentLoc = location;\n Log.i(\"LocationUpdate\", \"should have been updated\");\n\n\n\n }", "@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}", "@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }", "public void onLocationChanged(Location location) {\n Log.d(\"Location\",location.toString());\n currentPosition.setAltitude(location.getAltitude());\n currentPosition.setCoordinate(new SKCoordinate(location.getLongitude(),location.getLatitude()));\n currentPosition.setSpeed(location.getSpeed());\n mapView.setPositionAsCurrent(currentPosition.getCoordinate(),1,true);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mUserLocation = new LatLng(location.getLatitude(), location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(mUserLocation, 16);\n mMap.animateCamera(update);\n mMap.addMarker(new MarkerOptions().position(mUserLocation).title(\"Mischief Managed!\"));\n\n }\n }", "@Override\n\t\tpublic void onLocationChanged(Location args0) {\n\t\t\t mCurrentLocation = args0;\n\t mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n\t updateUI();\n\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng sydney = new LatLng(40.362552, -94.767392);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Joseph Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.362552,-94.767392), 12.0f));\n\n LatLng publicUser1 = new LatLng(40.332692, -94.870458);\n mMap.addMarker(new MarkerOptions().position(publicUser1).title(\"David Location\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.332692,-94.870458), 12.0f));\n\n LatLng publicUser2 = new LatLng(40.350650, -94.886080);\n mMap.addMarker(new MarkerOptions().position(publicUser2).title(\"Alex Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.350650,-94.886080), 12.0f));\n\n LatLng publicUser3 = new LatLng(40.357818, -94.890868);\n mMap.addMarker(new MarkerOptions().position(publicUser3).title(\"Johnson Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.357818,-94.890868), 12.0f));\n\n LatLng publicUser4 = new LatLng(40.348272, -94.871527);\n mMap.addMarker(new MarkerOptions().position(publicUser4).title(\"Mike Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.348272,-94.871527), 12.0f));\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "@Override\n public void onLocationChanged(Location location) {\n setChanged();\n notifyObservers(location);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n mCurrentLocation = location;\n LatLng newLocation = new LatLng(mCurrentLocation.getLatitude(),\n mCurrentLocation.getLongitude());\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 15));\n } else\n Toast.makeText(getApplicationContext(),\n \"No Location Detected\", Toast.LENGTH_SHORT).show();\n }", "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 }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n myMap = googleMap;\n setMap();\n try{\n myMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lastKnown.getLatitude(), lastKnown.getLongitude()), 18.0f));\n }catch (NullPointerException e){\n\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n mLastLocation = location;\n\n\n }", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t\tGeoPoint p = new GeoPoint((int) (location.getLatitude() * 1E6), (int) (location.getLongitude() * 1E6));\n\t\t\toverlayHome = new MyOverlayItem(p, getString(R.string.Casa),getString(R.string.HelloCasa));\n\t\t\titemizedoverlay.addOverlay(overlayHome);\n\t\t\tContentValues initialValues = new ContentValues();\n\t\t\tinitialValues.put(Home.LATITUDE, p.getLatitudeE6());\n\t\t\tinitialValues.put(Home.LONGITUDE, p.getLongitudeE6());\n\t\t\tgetContentResolver().insert(Home.CONTENT_URI, initialValues);\n\t\t\tmapView.invalidate();\n\t\t\tmapView.getController().animateTo(p);\n\t\t\tToast.makeText(Map.this, \"Localização Gps\", Toast.LENGTH_SHORT).show();\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /*GPSTracker gps = new GPSTracker(this);\n if(gps.canGetLocation()) {\n //lat=gps.getLatitude();\n //lon=gps.getLongitude();\n }*/\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n //mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n // Add a marker in Sydney and move the camera\n /*LatLng current = new LatLng(lat, lon);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));\n LatLng new1 = new LatLng(lat+0.0008, lon+0.00004);\n mMap.addMarker(new MarkerOptions().position(new1).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new1));\n LatLng new2 = new LatLng(lat+0.0005, lon+0.0004);\n mMap.addMarker(new MarkerOptions().position(new2).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new2));\n mMap.addMarker(new MarkerOptions().position(current).title(lat+\" \"+lon+\n \"\"));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(lat, lon)) // Sets the center of the map to location user\n .zoom(18) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));*/\n }", "@Override\n \tpublic void onLocationChanged(Location location) {\n \t\tthis.location = location;\n \t}", "private void updateLocationUI() {\r\n if (mCurrentLocation != null) {\r\n CityName = mCurrentLocation.getLatitude()+ mCurrentLocation.getLongitude();\r\n }\r\n }", "@Override\n public void onLocationChanged(Location location) {\n Toast.makeText(MapsActivity.this, \"\" + location, Toast.LENGTH_SHORT).show();\n //mMap.clear();\n// longi = location.getLongitude();\n// lat = location.getLatitude();\n//\n// mLastLocation.set(location);\n\n\n mLastLocation = location;\n longi = mLastLocation.getLongitude();\n lat = mLastLocation.getLatitude();\n LatLng lt = new LatLng(lat,longi);\n Log.d(\"cxcxcx\",longi+\"\");\n mMap.addMarker(new MarkerOptions().position(lt).title(longi + \"\" + lat));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(lt, 8));\n\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n googleMap.setMyLocationEnabled(true);\r\n\r\n LocationManager locationManager = (LocationManager)\r\n getSystemService(Context.LOCATION_SERVICE);\r\n Criteria criteria = new Criteria();\r\n\r\n Location currentLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\r\n\r\n LatLng sydney = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 13));\r\n\r\n } else {\r\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\r\n }\r\n\r\n updateMarkersData(googleMap);\r\n\r\n }", "@Override\r\n public void onLocationChanged(Location location) {\n LatLng latLng_Now = new LatLng(location.getLatitude(), location.getLongitude());\r\n CameraPosition cameraPosition = new CameraPosition.Builder()\r\n .target(latLng_Now) // Sets the center of the map to LatLng (refer to previous snippet)\r\n .zoom(17) // Sets the zoom\r\n .bearing(90) // Sets the orientation of the camera to east\r\n .tilt(30) // Sets the tilt of the camera to 30 degrees\r\n .build(); // Creates a CameraPosition from the builder\r\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n if(latLng_Prev == null){\r\n latLng_Prev = latLng_Now;\r\n }\r\n //draw line between two locations:\r\n Polyline line = mMap.addPolyline(new PolylineOptions()\r\n .add(latLng_Prev, latLng_Now)\r\n .width(5)\r\n .color(Color.RED));\r\n latLng_Prev=latLng_Now;\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(15) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\" Current Location\");\n option.snippet(\"....\");\n option.position(latLng);\n option.draggable(true);//Making the marker draggable\n\n Marker currentMarker = mMap.addMarker(option);\n currentMarker.showInfoWindow();\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "void update(Location location);", "@Override\n \t\t\tpublic void onLocationChanged(Location loc) {\n \t \n \t\t\t}", "public void viewOnMap(View view){\r\n changeToMapActivity();\r\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }", "@Override\n\tpublic void onLocationChanged(Location location) {\n\t\t if (location != null) {\n\t\t //punto = location;\n\t\t GeoPoint puntoCap = new GeoPoint(location);\n\t\t this.posicionActualOverlay.setLocation(puntoCap);\n\t\t mapView.getController().animateTo(puntoCap);\n\t\t mapView.getController().setCenter(puntoCap);\n\t\t }\n\t\t\n\t}", "@Override\n public void onLocationChanged(Location location) {\n }", "public void onLocationChanged(Location location) {\n\n //Display the current location\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude,longitude);\n mGPSon.setText(\"Latitude: \"+Math.round(gp.x)+\"\\nLongitude: \"+Math.round(gp.y));\n\n }", "@Override\n protected void setUpMap() {\n super.setUpMap();\n // For showing a move to my location button and a blue\n // dot to show user's location\n MainActivity mainActivity = (MainActivity) getActivity();\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n }", "private void showOnMap(Location location) {\n\t\tfinal double RADIUS_KM = 1.5; // the distance, in KM, to show around the point.\n\n\t\tif (!TestHarnessUtils.isTestHarness() && isShowingMap) {\n\t\t\tLatLng gmLocation = new LatLng(location.getLatitude(), location.getLongitude());\n\n\t\t\t// Update user's location marker\n\t\t\tif (this.userMapMarker != null) {\n\t\t\t\tthis.userMapMarker.setPosition(gmLocation);\n\t\t\t}\n\n\t\t\t// For now, just display RADIUS_KM in all directions around the given location.\n\t\t\tLatLng northBounds = LocationUtils.getLocation(gmLocation, 0, RADIUS_KM);\n\t\t\tLatLng southBounds = LocationUtils.getLocation(gmLocation, 180, RADIUS_KM);\n\t\t\tLatLng eastBounds = LocationUtils.getLocation(gmLocation, 90, RADIUS_KM);\n\t\t\tLatLng westBounds = LocationUtils.getLocation(gmLocation, 270, RADIUS_KM);\n\n\t\t\tLatLngBounds bounds;\n\t\t\tint padding;\n\n\t\t\tif (routePolyline == null) {\n\t\t\t\tbounds = LatLngBounds.builder().include(northBounds).include(southBounds).include(eastBounds)\n\t\t\t\t\t\t.include(westBounds).include(gmLocation).build();\n\t\t\t\tpadding = 0;\n\t\t\t} else {\n\t\t\t\tLatLngBounds.Builder builder = LatLngBounds.builder().include(gmLocation);\n\t\t\t\tfor (LatLng pt : routePolyline.getPoints()) {\n\t\t\t\t\tbuilder.include(pt);\n\t\t\t\t}\n\t\t\t\tbounds = builder.build();\n\t\t\t\tpadding = 100;\n\t\t\t}\n\n\t\t\tfinal CameraUpdate camUpdate = CameraUpdateFactory.newLatLngBounds(bounds, padding);\n\n if (this.theMap != null) {\n try {\n this.theMap.moveCamera(camUpdate);\n\n } catch (IllegalStateException ex) {\n // Map not yet initialized.\n logger.info(\"showOnMap(): IllegalStateException when trying to move camera. Will delegate task to listener.\");\n final View mapView = mapFragment.getView();\n if (mapView.getViewTreeObserver().isAlive()) {\n mapView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {\n @SuppressWarnings(\"deprecation\")\n @SuppressLint(\"NewApi\")\n @Override\n public void onGlobalLayout() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n } else {\n mapView.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n }\n WorkoutActivity.this.theMap.moveCamera(camUpdate);\n }\n });\n }\n }\n }\n\t\t}\n\t}", "@Override\n\tpublic void onLocationChanged(Location loc)\n\t{\n\t}", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n }", "private void setCurrentLocation() {\n foundLocation = false;\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location == null) {\n locationControlTask = new LocationControl();\n locationControlTask.execute(getActivity());\n } else {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n });\n }", "@Override\n public void onLocationChanged(Location loc)\n {\n \t\n \tint lat = (int) (loc.getLatitude() * 1E6);\n\t\t\tint lng = (int) (loc.getLongitude() * 1E6);\n\t\t\t point = new GeoPoint(lat, lng);\n\t\t\t \n\t\t\t /** remove the previous overlay so the another\n\t\t\t can be added **/\n\t\t\t itemizedOverlay.removeOverlay(0);\n\t\t\t \n\t\t\n\t\t\t //this follows the same steps in the OnCreate function at start up.\n\t\t\t // //Initialize a normal MapOVerlay item with new point.\n\t\t\t OverlayItem overlayitem = new OverlayItem(point, \"kiddda!\", \"sasri kal!\");\n\t\t \n\t\t itemizedOverlay.addOverlay(overlayitem);\n\t\t mapOverlays.add(itemizedOverlay);\n\t\t // move to new point.\n\t\t\tcontroller.animateTo(point); \n\t\t\t \n\t\n\t\t\t//debug message to say the location has been read.\n\t\t\tLog.i(\"Listener\", \"location read\");\n\t\t\t \n\t\t\n\n\t\t \n // String Text = \"My current location is: \" +\n\t\t\tLog.i(\"service check\",\" Latitude = \" + loc.getLatitude() +\n \" Longitude = \" + loc.getLongitude());\n \n // Toast.makeText( getApplicationContext(), Text, Toast.LENGTH_LONG).show();\n \n }", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if(permission_granted){\n try {\n mMap.setMyLocationEnabled(true);\n }catch (SecurityException e){\n e.printStackTrace();\n }\n }\n\n //googleMap.clear();\n //new FetchTweets().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n\n if(mLastLocation!=null) {\n\n launchTimerTask();\n LatLng latLng = new LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude());\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"You are here\"));\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latLng, 14);\n googleMap.animateCamera(update);\n mMap.setInfoWindowAdapter(new MyInfoWindowAdapter());\n\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n latLng = new LatLng(location.getLatitude(), location.getLongitude());\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng).zoom(18).build();\n mMap.moveCamera(CameraUpdateFactory\n .newCameraPosition(cameraPosition));\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n\n sendRequestAPI(lat,lng, places);\n //mMap.addMarker(new MarkerOptions().position(sydney));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);\n\n }", "public void onLocationChanged(Location location) {\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // Add a marker to current location and move the camera\n // LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"You are here!\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@Override\n public void onLocationChanged(Location location) {\n currLatLng = new LatLng(location.getLatitude(), location.getLongitude());\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(currLatLng).zoom(15).build();\n\n mGoogleMap.animateCamera(CameraUpdateFactory\n .newCameraPosition(cameraPosition));\n\n //If you only need one location, unregister the listener\n LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n // Recherche de la derniere localisation\n Criteria criteria = new Criteria();\n String provider = locationManager.getBestProvider(criteria, false);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(provider);\n\n // Initialize the location fields\n if (location != null) {\n float lat = (float) (location.getLatitude());\n float lng = (float) (location.getLongitude());\n\n currentPosition = new Point(location.getLongitude(), location.getLatitude());\n\n // Add a marker at our position and move the camera\n LatLng lastCoord = new LatLng(lat, lng);\n mMap.addMarker(new MarkerOptions().position(lastCoord).title(\"Last time we were here\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(lastCoord));\n\n lblPosition.setText(\"Last Position: \"+location.getLatitude()+\", \"+location.getLongitude());\n\n Log.i(this.getClass().getName(), String.valueOf(lat));\n Log.i(this.getClass().getName(), String.valueOf(lng));\n } else {\n Log.w(this.getClass().getName(), \"Provider not available\");\n }\n\n // dessine points intérets et sector de la database\n loadPOI();\n loadSector();\n\n // attache le callback\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10, 1, this);\n }", "@Override\n public void onLocationChanged(Location location) {\n mCurrentLocation = location;\n mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n updateUI();\n Toast.makeText(this, getResources().getString(R.string.location_updated_message),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onLocationChanged(Location location) {\n mCurrentLocation = location;\n mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());\n updateUI();\n Toast.makeText(this, getResources().getString(R.string.location_updated_message),\n Toast.LENGTH_SHORT).show();\n }", "private void updateLocation() {\n myLocationOnScreenRef.set(myComponent.getLocationOnScreen());\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng miUbicacion = new LatLng(location.getLatitude(), location.getLongitude());\n\n //Marcador de la ub. actual\n mMap.addMarker(new MarkerOptions().position(miUbicacion).title(\"Ubicación actual\").icon(BitmapDescriptorFactory.fromResource(R.drawable.marca3)));\n\n //Foco de la camara según la ubicación\n mMap.moveCamera(CameraUpdateFactory.newLatLng(miUbicacion));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(miUbicacion)\n .zoom(14)\n .bearing(90)\n .tilt(45)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "@Override\n \t\tpublic void onLocationChanged(Location location) {\n \t\t\tmobileLocation = location;\n \t\t\tif(!wasZoomed)\n \t\t\t{\n \t\t\tGeoPoint newPos = new GeoPoint(\n \t\t\t\t\t(int)(mobileLocation.getLatitude() * 1e6),\n \t\t\t\t\t(int)(mobileLocation.getLongitude() * 1e6));\n \t\t\t\n \t\t\tdouble latitudeSpan = Math.round(Math.abs(mobileLocation.getLatitude()*1e6- \n \t grave.getLatitudeE6()));\n \t\t\tdouble longitudeSpan = Math.round(Math.abs(mobileLocation.getLongitude()*1e6 - \n \t grave.getLongitudeE6()));\n \t\t\t\n \t\t\tmc.zoomToSpan((int)(latitudeSpan*2), (int)(longitudeSpan*2)); \n \t\t\t\t\t\n \t\t\tmc.animateTo(new GeoPoint\n \t\t\t\t\t((grave.getLatitudeE6()+newPos.getLatitudeE6())/2, \n \t\t\t \t\t\t(grave.getLongitudeE6()+newPos.getLongitudeE6())/2));\n \t\t\t\n \t\t\tmapView.invalidate();\n \t\t\twasZoomed = true;\n \t\t\t}\n \t\t\tLog.i(\"LOCATION\",\"LONG: \"+location.getLongitude()+ \" LAT:\"+location.getLatitude());\n \t\t}" ]
[ "0.7401772", "0.7381851", "0.73349017", "0.7290627", "0.72743934", "0.720776", "0.7167821", "0.71270406", "0.71250355", "0.71250355", "0.71250355", "0.7105738", "0.7075215", "0.70741415", "0.70314574", "0.6946418", "0.69450843", "0.69441915", "0.6930185", "0.6906686", "0.687802", "0.68776816", "0.6874508", "0.6840748", "0.68288237", "0.68280345", "0.67999804", "0.6785666", "0.67645156", "0.67598563", "0.6754824", "0.6720645", "0.6719357", "0.6716446", "0.6716124", "0.66822416", "0.66818833", "0.6678011", "0.6669481", "0.666269", "0.666244", "0.6653036", "0.665028", "0.66249347", "0.6617249", "0.6615396", "0.66063225", "0.6591721", "0.65888995", "0.6562044", "0.6561247", "0.6547011", "0.652945", "0.652945", "0.652715", "0.65271354", "0.65270203", "0.6523859", "0.6517681", "0.6503213", "0.6497375", "0.6488354", "0.64863217", "0.6476894", "0.64599353", "0.6459654", "0.64442223", "0.6443625", "0.6443242", "0.643611", "0.64294136", "0.6413791", "0.640488", "0.6404586", "0.64038336", "0.640342", "0.6390056", "0.6386078", "0.63857234", "0.6384816", "0.6384244", "0.6374742", "0.63735396", "0.63702905", "0.6367839", "0.63581675", "0.63543975", "0.6349737", "0.63495547", "0.63495547", "0.63481396", "0.63456416", "0.6340847", "0.63393813", "0.63380086", "0.6330437", "0.6330437", "0.63189983", "0.63158685", "0.63072747" ]
0.68126506
26
Returns the GeofenceInfoContent[] of info that each marker represents
private GeofenceInfoContent[] getContentFromMarker(Marker marker){ return currentGeofencesInfoMap.get(marker.getTitle()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Marker> getMarkers() {\n return this.markers.obtainAll();\n }", "public List<UserMarker> getMarkers() {\n List<UserMarker> markers = new ArrayList<>();\n\n Query query = new Query(\"UserMarker\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n double lat = (double) entity.getProperty(\"lat\");\n double lng = (double) entity.getProperty(\"lng\");\n String content = (String) entity.getProperty(\"content\");\n\n UserMarker marker = new UserMarker(lat, lng, content);\n markers.add(marker);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading marker.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n return markers;\n }", "public SortedSet<Marker> getMarkers() {\n return variant.getSchedule().getMarkerManager().getMarkers(this);\n }", "public MapInfo getAllCovidCasesMapinfo() {\n GeoJsonGenerator generator = new GeoJsonGenerator();\n return generator.getAllMapInfo(getMapParamsOfMany(covidDataRepository.findAll()));\n }", "@Override\n\t\tpublic View getInfoContents(Marker marker) {\n\t\t\treturn null;\n\t\t}", "public org.tigr.microarray.mev.cgh.CGHDataObj.ICGHDataRegion[][] getAnnotations();", "@Override\n public View getInfoContents(Marker marker) {\n return null;\n }", "public short[] get_infos_metadata() {\n short[] tmp = new short[2];\n for (int index0 = 0; index0 < numElements_infos_metadata(0); index0++) {\n tmp[index0] = getElement_infos_metadata(index0);\n }\n return tmp;\n }", "@Override\n public View getInfoContents(Marker marker)\n {\n View view = context.getLayoutInflater().inflate(R.layout.custominfowindow, null);\n\n TextView tvTitle = (TextView) view.findViewById(R.id.tv_title);\n TextView tvSubTitle = (TextView) view.findViewById(R.id.tv_subtitle);\n TextView tvAddress = (TextView) view.findViewById(R.id.tv_address);\n TextView tvOpeningTimes = (TextView) view.findViewById(R.id.tv_openingTimes);\n\n BuildingInfo building = (BuildingInfo)marker.getTag();\n\n tvTitle.setText(marker.getTitle());\n tvSubTitle.setText(marker.getSnippet());\n tvAddress.setText(building.getAddress());\n tvOpeningTimes.setText(\"Opening hours: \\n\" + Html.fromHtml(building.getOpeningTimes()));\n\n return view;\n }", "public List<Marker> getSelectedMarkers() {\n return this.selectedMarkers;\n }", "public static java.util.List<org.politaktiv.map.infrastructure.model.Marker> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "public String[] getInfoData();", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "@Override\n\tpublic View getInfoContents(Marker marker)\n\t{\n\t\tMediaMarkerManager manager = MediaMarkerManager.getManagerFromMarker(marker);\n\t\t\n\t\tif (manager == null)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn manager.getView(popupContext);\n\t}", "public ArrayList<String[]> getInfos()\n {\n return (this.infos);\n }", "@Override\n public View getInfoContents(Marker marker) {\n\n //PARAMS GENERALES\n int size = 18;\n\n //DIBUJAMOS dentro de los elementos que tenemos\n View popupView = inflater.inflate(R.layout.popupmap, null);\n Meteo meteo = (Meteo) marker.getTag();\n TextView ttvTitle = (TextView) popupView.findViewById(R.id.title);\n TextView txtDesc = (TextView) popupView.findViewById(R.id.desc);\n TextView txtTemp = (TextView) popupView.findViewById(R.id.temp);\n TextView txtTempMin = (TextView) popupView.findViewById(R.id.tempMin);\n TextView txtTempMax = (TextView) popupView.findViewById(R.id.tempMax);\n ImageView imageView = (ImageView) popupView.findViewById(R.id.imageView);\n TextView txtWind = (TextView) popupView.findViewById(R.id.wind);\n\n //TITLE and PARAMS\n ttvTitle.setText(meteo.getName());\n ttvTitle.setTextSize(25);\n ttvTitle.setTextColor(Color.WHITE);\n ttvTitle.setBackgroundColor(Color.BLUE);\n\n //IMAGE\n imageView.setImageDrawable(getDrawable(getResources().getIdentifier(\"_\" + meteo.getWeather().get(0).getIcon(), \"drawable\", getPackageName())));\n\n //TEXT VIEWS\n txtDesc.setText(\"Description: \" + meteo.getWeather().get(0).getDescription());\n txtTemp.setText(\"Température: \" + meteo.getMain().getTemp() + \"°C\");\n txtTempMax.setText(\"MAX: \" + meteo.getMain().getTemp_max() + \"°C\");\n txtTempMin.setText(\"MIN: \" + meteo.getMain().getTemp_min() + \"°C\");\n txtWind.setText(\"Force du vent: \" + meteo.getWind().getSpeed() + \" Deg: \" + meteo.getWind().getDeg());\n\n //PARAMS TEXT VIEWS\n txtDesc.setTextSize(size);\n txtTemp.setTextSize(size);\n txtTempMax.setTextSize(size);\n txtTempMin.setTextSize(size);\n txtWind.setTextSize(size);\n\n return popupView ;\n }", "private HashMap<String, Marker> loadNMarkers(){\n HashMap<String, Marker> map = new HashMap<String, Marker>();\n if (googleMap != null) {\n googleMap.clear();\n }\n float alpha = (float) 0.5;\n if (main.state.getBookingState() != State.RESERVE_BIKE_SELECTION_STATE && main.state.getBookingState() != State.RESERVE_DOCK_SELECTION_STATE){\n alpha = 1;\n }\n for (Station station : stationList) {\n float fillLevel = station.getFillLevel(); // change the marker colors depending on the station fill levels\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)).alpha(alpha));\n marker.setTag(station.getId()); // set tag to reference markers later\n map.put(station.getId(), marker);\n }\n return map;\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "public List<LatLng> getCoordinates() {\n return getGeometryObject();\n }", "public Set<Location> get_all_locations() {\n Set<Location> locations = new HashSet<Location>();\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n JSONArray array = (JSONArray) jsonObject.get(\"pictures\");\n Iterator<String> iterator = array.iterator();\n while (iterator.hasNext()) {\n locations.add(new Location(iterator.next()));\n }\n return locations;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "public List<FavoriteLocation> queryAllLocations() {\n\t\tArrayList<FavoriteLocation> fls = new ArrayList<FavoriteLocation>(); \n\t\tCursor c = queryTheCursorLocation(); \n\t\twhile(c.moveToNext()){\n\t\t\tFavoriteLocation fl = new FavoriteLocation();\n\t\t\tfl._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tfl.description = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_DES));\n\t\t\tfl.latitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LAT));\n\t\t\tfl.longitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LON));\n\t\t\tfl.street_info = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_STREET));\n\t\t\tfl.type = c.getInt(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_CATEGORY));\n\t\t\tbyte[] image_byte = c.getBlob(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_PIC)); \n\t\t\tfl.image = BitmapArrayConverter.convertByteArrayToBitmap(image_byte);\n\t\t\tfl.title = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_TITLE));\n\t\t\tfls.add(fl);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn fls;\n\t}", "public String[] getGeoSystem();", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "protected LineMarker<?>[] createMarkers()\n {\n // Create list\n List<LineMarker<?>> markers = new ArrayList<>();\n\n // Add markers for member Overrides/Implements\n JClassDecl cd = _textArea.getJFile().getClassDecl();\n if (cd != null)\n getSuperMemberMarkers(cd, markers);\n\n // Add markers for BuildIssues\n BuildIssue[] buildIssues = _textArea.getBuildIssues();\n for (BuildIssue issue : buildIssues)\n if (issue.getEnd() <= _textArea.length())\n markers.add(new LineMarker.BuildIssueMarker(_textPane, issue));\n\n // Add markers for breakpoints\n Breakpoint[] breakpoints = _textArea.getBreakpoints();\n if (breakpoints != null) {\n for (Breakpoint bp : breakpoints) {\n if (bp.getLine() < _textArea.getLineCount())\n markers.add(new LineMarker.BreakpointMarker(_textPane, bp));\n else _textArea.removeBreakpoint(bp);\n }\n }\n\n // Return markers\n return markers.toArray(new LineMarker[0]);\n }", "private Collection<InfoMarker> getProviderMarkerDescriptions( List<Form> listForm )\n {\n Collection<InfoMarker> collectionNotifyMarkers = new ArrayList<>( );\n List<Question> questionList = new ArrayList<>( );\n \n for(Form form: listForm) {\n \t\n \tquestionList.addAll( QuestionHome.getListQuestionByIdForm( form.getId( ) ));\n }\n\n for ( Question formQuestion : questionList )\n {\n \tif( collectionNotifyMarkers.stream().noneMatch( p -> p.getMarker( ).equals(formQuestion.getCode( )))) {\n \t\t\n \t\tInfoMarker notifyMarker = new InfoMarker( formQuestion.getCode( ));\n \t\tnotifyMarker.setDescription( formQuestion.getColumnTitle( ) );\n \t\tcollectionNotifyMarkers.add( notifyMarker );\n \t}\n }\n InfoMarker notifyMarkerURl = new InfoMarker( Constants.MARK_URL_ADMIN_RESPONSE );\n notifyMarkerURl.setDescription( I18nService.getLocalizedString( Constants.MESSAGE_DESCRIPTION, I18nService.getDefaultLocale( ) ) );\n collectionNotifyMarkers.add( notifyMarkerURl );\n return collectionNotifyMarkers;\n }", "@Override\n\t\t\tpublic View getInfoContents(Marker arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "public List<Marker> getMarkersInRect(RectF rectF) {\n return this.markers.obtainAllIn(rectF);\n }", "public ArrayList<Map> getMapsArrayContainsThisPlaceOfInterest()\r\n\t{\r\n\t\treturn this._mapsArrayContainsThisPlaceOfInterest;\r\n\t}", "public HashMap<Integer, ArrayList<String>> getInfo() {\n\t\treturn infoList;\n\t}", "public ArrayList< LocationInfoHandler >getAllLocationInfo (){\n\t\tArrayList< LocationInfoHandler> locationInfoList = new ArrayList< LocationInfoHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_locationInfo + \" ORDER BY \" + key_date_entry; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationInfoHandler locationInfoHandlerArray = new LocationInfoHandler();\n\t\t\t\tlocationInfoHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationInfoHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationInfoHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationInfoHandlerArray.setContent(cursor.getString(3)); \n\t\t\t\tlocationInfoHandlerArray.setTitle(cursor.getString(4)); \n\t\t\t\tlocationInfoHandlerArray.setLocation_id(cursor.getInt(5)); \n\t\t\t\tlocationInfoHandlerArray.setImage(convertToBitmap(cursor.getBlob(6))); \n\t\t\t\tlocationInfoList.add(locationInfoHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn locationInfoList;\n\t}", "@Override\n\t\t\t\tpublic View getInfoContents(Marker arg0) {\n\t\t\t\t\tView v = null;\n\n\t\t\t\t\t// Getting the position from the marker\n\t\t\t\t\tLatLng latLng = arg0.getPosition();\n\n\t\t\t\t\t// Getting reference to the TextView to set latitude\n\t\t\t\t\t//TextView tvLat = (TextView) v.findViewById(R.id.tv_lat);\n\n\t\t\t\t\t// Getting reference to the TextView to set longitude\n\t\t\t\t\t// TextView tvLng = (TextView) v.findViewById(R.id.tv_lng);\n\n\t\t\t\t\tString str = getAddress(context, latLng.latitude,\n\t\t\t\t\t\t\tlatLng.longitude);\n\n\t\t\t\t\treturn v;\n\t\t\t\t}", "public float[] getCallout() {\n/* 698 */ COSBase base = getCOSObject().getDictionaryObject(COSName.CL);\n/* 699 */ if (base instanceof COSArray)\n/* */ {\n/* 701 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 703 */ return null;\n/* */ }", "public List<Info> getInfos() {\n\treturn mInfos;\n }", "@Override\n public View getInfoContents(Marker marker) {\n TextView titleView = (TextView) contentsView.findViewById(R.id.text_info_window_title);\n titleView.setText(marker.getTitle());\n return contentsView;\n }", "public Shape[] getMarkerShapes()\n{\n if(_markerShapes!=null) return _markerShapes;\n Shape shp0 = new Ellipse(0,0,8,8);\n Shape shp1 = new Polygon(4,0,8,4,4,8,0,4);\n Shape shp2 = new Rect(0,0,8,8);\n Shape shp3 = new Polygon(4,0,8,8,0,8);\n Shape shp4 = new Polygon(0,0,8,0,4,8);\n return _markerShapes = new Shape[] { shp0, shp1, shp2, shp3, shp4 };\n}", "@Override\n public Map<String,Map<String,Object>> getLocatedLocations() {\n Map<String,Map<String,Object>> result = new LinkedHashMap<String,Map<String,Object>>();\n Map<Location, Integer> counts = new EntityLocationUtils(mgmt()).countLeafEntitiesByLocatedLocations();\n for (Map.Entry<Location,Integer> count: counts.entrySet()) {\n Location l = count.getKey();\n Map<String,Object> m = MutableMap.<String,Object>of(\n \"id\", l.getId(),\n \"name\", l.getDisplayName(),\n \"leafEntityCount\", count.getValue(),\n \"latitude\", l.getConfig(LocationConfigKeys.LATITUDE),\n \"longitude\", l.getConfig(LocationConfigKeys.LONGITUDE)\n );\n result.put(l.getId(), m);\n }\n return result;\n }", "@Override\r\n\tpublic E2ECheckpointElements getElements() {\n\t\treturn this.content;\r\n\t}", "java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> \n getEntryList();", "@Override\n public View getInfoContents(Marker marker) {\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "public List<GeoRegionInner> locations() {\n return this.locations;\n }", "public Marker getMarker() {\n return marker;\n }", "public List<Float[]> getCoordinates() {\n return coordinates;\n }", "public Fence[] getAllFences() {\n/* 622 */ Set<Fence> fenceSet = new HashSet<>();\n/* 623 */ if (this.fences != null)\n/* */ {\n/* 625 */ for (Fence f : this.fences.values())\n/* */ {\n/* 627 */ fenceSet.add(f);\n/* */ }\n/* */ }\n/* */ \n/* 631 */ VolaTile eastTile = this.zone.getTileOrNull(this.tilex + 1, this.tiley);\n/* 632 */ if (eastTile != null) {\n/* */ \n/* 634 */ Fence[] eastFences = eastTile.getFencesForDir(Tiles.TileBorderDirection.DIR_DOWN);\n/* 635 */ for (int x = 0; x < eastFences.length; x++)\n/* */ {\n/* 637 */ fenceSet.add(eastFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 641 */ VolaTile southTile = this.zone.getTileOrNull(this.tilex, this.tiley + 1);\n/* 642 */ if (southTile != null) {\n/* */ \n/* 644 */ Fence[] southFences = southTile.getFencesForDir(Tiles.TileBorderDirection.DIR_HORIZ);\n/* 645 */ for (int x = 0; x < southFences.length; x++)\n/* */ {\n/* 647 */ fenceSet.add(southFences[x]);\n/* */ }\n/* */ } \n/* */ \n/* 651 */ if (fenceSet.size() == 0) {\n/* 652 */ return emptyFences;\n/* */ }\n/* 654 */ return fenceSet.<Fence>toArray(new Fence[fenceSet.size()]);\n/* */ }", "private void createMarkers(Bundle savedInstanceState) {\n List<MarkerDTO> markerDTOs = null;\n // add the OverlayItem to the ArrayItemizedOverlay\n ArrayList<DescribedMarker> markers = null;\n if (savedInstanceState != null) {\n markerDTOs = savedInstanceState.getParcelableArrayList(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n } else {\n markerDTOs = getIntent().getParcelableArrayListExtra(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n // retrieve geopoint if missing\n if (getIntent().getExtras() == null) {\n return;\n }\n featureIdField = getIntent().getExtras().getString(PARAMETERS.FEATURE_ID_FIELD);\n if (featureIdField == null) {\n featureIdField = FEATURE_DEFAULT_ID;\n }\n if (!MarkerUtils.assignFeaturesFromDb(markers, featureIdField)) {\n Toast.makeText(this, R.string.error_unable_getfeature_db, Toast.LENGTH_LONG).show();\n canConfirm = false;\n // TODO dialog : download features for this area?\n }\n }\n // create an ItemizedOverlay with the default marker\n overlayManager.getMarkerOverlay().getOverlayItems().addAll(markers);\n }", "public List getInfos() {\n return infos;\n }", "public HashMap<String, InputStream> getPlaceFiles() {\n\t\treturn getFilesByPath(PLACES_PATH);\n\t}", "public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }", "public List<LatLng> getCoordinates() {\n return mCoordinates;\n }", "public Collection<String> getContigs() {\n\t\treturn infoMap.keySet();\n\t}", "public ArrayList<Integer[]> getMineLocations()\n {\n return mineLocations;\n }", "public final ArrayList<String[]> getFullInformation() {\r\n\t\tArrayList<String[]> allInfo = new ArrayList<String[]>();\r\n\r\n\t\tfor (Workout i : workoutList) {\r\n\t\t\tallInfo.add(new String[] { i.getName(), i.getEquipment().toString(), i.getPrimaryMuscle().toString(),\r\n\t\t\t\t\ti.getSecondaryMuscle().toString(), i.getDesc(), i.getReminders() });\r\n\r\n\t\t}\r\n\r\n\t\treturn allInfo;\r\n\t}", "private void getMarkers() {\n\n // Read from the database\n databaseRef.addValueEventListener(new ValueEventListener() {\n /**\n * listener to get data of vendors from firebase db\n * @param dataSnapshot\n */\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n HashMap<String, Object> values = (HashMap<String, Object>) dataSnapshot.getValue();\n for (String UserId : values.keySet()) {\n HashMap<String, Object> userInfo = (HashMap<String, Object>) values.get(UserId);\n\n if (userInfo.get(\"Type\").equals(\"Vendor\")\n && userInfo.containsKey(\"Location\")\n && userInfo.containsKey(\"Name Of Food Truck\")\n && userInfo.containsKey(\"Type Of Food\")\n && userInfo.containsKey(\"Active\")) {\n\n // get info from vendor\n String vendorName = (String) userInfo.get(\"Name Of Food Truck\");\n String foodType = (String) userInfo.get(\"Type Of Food\");\n String coords = (String) userInfo.get(\"Location\");\n String uniqueID = (String) userInfo.get(\"UniqueID\");\n boolean isActive = (boolean)userInfo.get(\"Active\");\n Location l = new Location(coords);\n\n // make green marker if active\n if (isActive) {\n // add marker to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(l.getLat(), l.getLng()))\n .snippet(foodType)\n .title(vendorName)\n .icon(BitmapDescriptorFactory.defaultMarker(\n BitmapDescriptorFactory.HUE_GREEN)))\n .setTag(uniqueID);\n }\n else {\n // add marker to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(l.getLat(), l.getLng()))\n .snippet(foodType)\n .title(vendorName))\n .setTag(uniqueID);\n }\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Log.d(\"markerOnClick\", \"marker clicked\");\n String uniqueID = (String) marker.getTag();\n Intent i = new Intent(MapsActivity.this, VendorProfileForCustomerActivity.class);\n i.putExtra(\"vendorUniqueID\", uniqueID);\n startActivity(i);\n }\n });\n\n }\n }\n\n }\n\n /**\n * handles error from db\n * @param error\n */\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "public ArrayList<MarkerTag> queryAllMarkerTags() {\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n// MarkerTagContract.MarkerTagTable._ID,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_TITLE,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_DATE,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_DETAILS,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_IMG,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_LATITUDE,\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_LONGITUDE\n };\n\n// // Filter results WHERE \"title\" = 'My Title'\n// String selection = MarkerTagContract.MarkerTagTable.COLUMN_NAME_TITLE + \" = ?\";\n// String[] selectionArgs = { \"My Title\" };\n\n// // How you want the results sorted in the resulting Cursor\n// String sortOrder =MarkerTagContract.MarkerTagTable._ID + \" DESC\";\n\n // Query the database for results (returns a cursor)\n Cursor cursor = db.query(\n MarkerTagContract.MarkerTagTable.TABLE_NAME, // The table to query\n projection, // The columns to return\n null, // The columns for the WHERE clause\n null, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n null // The sort order\n );\n\n // Makes MarkerTag objects from data queried and adds it to a Set\n// Set<MarkerTag> markerTagList = new HashSet<>();\n ArrayList<MarkerTag> markerTagList = new ArrayList<>();\n\n while(cursor.moveToNext()) {\n String title = cursor.getString(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_TITLE));\n String date = cursor.getString(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_DATE));\n String details = cursor.getString(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_DETAILS));\n byte[] imgByteArray = cursor.getBlob(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_IMG));\n double latitude = cursor.getDouble(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_LATITUDE));\n double longitude = cursor.getDouble(cursor.getColumnIndexOrThrow(\n MarkerTagContract.MarkerTagTable.COLUMN_NAME_LONGITUDE));\n\n // Converts byte[] back to bitmap\n //Bitmap img = BitmapFactory.decodeByteArray(imgByteArray, 0, imgByteArray.length);\n Bitmap img = Bitmap.createScaledBitmap(BitmapFactory.\n decodeByteArray(imgByteArray, 0, imgByteArray.length), 100, 100, true);\n\n // Add MarkerTag to List\n //TODO: uncomment markerTagList.add(new MarkerTag(title, date, details, img, latitude, longitude));\n }\n\n cursor.close();\n\n return markerTagList;\n }", "Marker getMarker();", "public ArrayList<Location> getLocations() {\n return this.imageLocs; \n }", "private List<String> extractFeatures() {\n List<String> result = new ArrayList<String>();\n\n int startPoint = -1;\n\n List<TextPosition> featureItem;\n for (int i = 0; i < infoBlock.size(); i++) {\n // To get index of the text in the information block, if the text does not exist, the index will be -1.\n int index = CommonUtils.collectTextBuffer(infoBlock.get(i)).indexOf(FEATURE_KEY);\n if (index != -1) {\n startPoint = i + 1;\n\n // To locate the PDF object from the text feature to the end of the information block.\n featureItem = infoBlock.get(i).subList(index, index + FEATURE_KEY.length());\n\n // To extract information vertically. startPoint now is where the information block next to the\n // one that contains text feature.\n if (startPoint != -1) {\n result = filterTextBuffersVerical(featureItem, infoBlock, startPoint, 10);\n/*\t\t\t\t\t\tfor(String item: result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(item);\n\t\t\t\t\t\t}*/\n }\n\n break;\n }\n }\n\n return result;\n }", "public List<MapItemData> getSerializableIconData() {\n\n\t\tList<MapItemData> data = new ArrayList<>();\n\n\t\tfor(MapItemData item : additionalData) {\n\n\t\t\tdata.add(item);\n\n\t\t}\n\n\t\treturn data;\n\t}", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "Map<String, List<List<Attribution>>> getAttributionMap();", "public ArrayList<LocationDetail> getLocations() throws LocationException;", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "public String getMarker() {\n return marker;\n }", "public String getMarker() {\n return marker;\n }", "public List<PhotoLocation> loadSavedLocations(GoogleMap xMap) {\n List<PhotoLocation> list = mDb.locationModel().loadAllLocations();\n for (PhotoLocation each : list) {\n MarkerOptions m = new MarkerOptions();\n m.position(new LatLng(each.lat, each.lon));\n m.title(each.name);\n Marker marker = xMap.addMarker(m);\n marker.setTag(each.id);\n mMarkers.add(marker);\n }\n return list;\n }", "private void addMarkers() {\n\n for (MarkerPropio m : listMarkers) {\n LatLng posicion = new LatLng(m.getLatitud(), m.getLogitud());\n final MarkerOptions marker = new MarkerOptions()\n .position(posicion)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1))\n .title(m.getTitulo())\n .snippet(m.getDescripcion());\n switch (m.getNumImages()){\n case 1:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n break;\n case 2:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker2));\n break;\n case 3:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker3));\n break;\n case 4:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker4));\n break;\n case 5:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker5));\n break;\n case 6:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker6));\n break;\n\n }\n mMap.addMarker(marker);\n hashMarker.put(posicion, m.getId());\n mMap.setOnInfoWindowClickListener(this);\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "@Override\n public ArrayList<ICatLocDetail> getLocalities() {\n return localities;\n }", "public void initMapMarkers() {\n\t\tmyMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder myLocMarkerBuilder = new MapMarkerBuilder();\n\t\tmyLocMarkerBuilder.setMarkerId(MARKER_ID_MY_LOCATION);\n\t\tmyLocMarkerBuilder.setIsAccuracyCircleSupported(true);\n\t\tmyLocMarkerBuilder.setAccuracyCircleBaseColor(new FColorRGB(32/255f, 173/255f, 229/255f));\n\t\tmyLocMarkerBuilder.setBaseOrder(-206000);\n\t\tmyLocMarkerBuilder.setIsHidden(true);\n\t\tBitmap myLocationBitmap = OsmandResources.getBitmap(\"map_pedestrian_location\");\n\t\tif (myLocationBitmap != null) {\n\t\t\tmyLocMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tmyLocationBitmap.getWidth(), myLocationBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(myLocationBitmap)));\n\t\t}\n\t\tmyLocationMarker = myLocMarkerBuilder.buildAndAddToCollection(myMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(myMarkersCollection);\n\n\t\t// Create context pin marker\n\t\tcontextPinMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder contextMarkerBuilder = new MapMarkerBuilder();\n\t\tcontextMarkerBuilder.setMarkerId(MARKER_ID_CONTEXT_PIN);\n\t\tcontextMarkerBuilder.setIsAccuracyCircleSupported(false);\n\t\tcontextMarkerBuilder.setBaseOrder(-210000);\n\t\tcontextMarkerBuilder.setIsHidden(true);\n\t\tBitmap pinBitmap = OsmandResources.getBitmap(\"map_pin_context_menu\");\n\t\tif (pinBitmap != null) {\n\t\t\tcontextMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tpinBitmap.getWidth(), pinBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(pinBitmap)));\n\t\t\tcontextMarkerBuilder.setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.Top);\n\t\t\tcontextMarkerBuilder.setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal);\n\t\t}\n\t\tcontextPinMarker = contextMarkerBuilder.buildAndAddToCollection(contextPinMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(contextPinMarkersCollection);\n\t}", "public ArrayList getStreets() {\n\t if(assertZipCodeMap()) {\n\t\t return CSVReader.getStreets(zipCodeMap, zipcode, street);\n\t }\n\t return new ArrayList();\n }", "public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }", "public static ArrayList<MapDataModel> getMarkersData(PreviousProductTag productTag){\n getMarkersRecursively(productTag);\n sortingArrayList();\n return allMapData;\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "public ArrayList getLocations()\r\n\t\t{\r\n\t\t\treturn locations;\r\n\t\t}", "java.util.List<? extends com.google.devtools.kythe.proto.Analysis.FileInfoOrBuilder> \n getEntryOrBuilderList();", "@JsonIgnore public Collection<Mass> getProteinContents() {\n final Object current = myData.get(\"proteinContent\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Mass>) current;\n }\n return Arrays.asList((Mass) current);\n }", "public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getInfo() {\n return info;\n }", "@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }", "@Override\n public View getInfoContents(Marker arg0) {\n\n // Getting view from the layout file info_window_layout\n View v = getLayoutInflater().inflate(R.layout.window_layout, null);\n\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.beacon_title1);\n\n // Getting reference to the TextView to set longitude\n ImageView img = (ImageView) v.findViewById(R.id.goat);\n\n // Setting the latitude\n tvLat.setText(arg0.getTitle());\n // Returning the view containing InfoWindow contents\n return v;\n\n }", "public XSObjectList getAnnotations() {\n\treturn (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;\n }", "public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getInfo() {\n return info;\n }", "@Override\n\t\t\tpublic View getInfoWindow(Marker marker) {\n\t\t\t\tView v = getLayoutInflater().inflate(R.layout.map_info_window, null);\n\n // Getting reference to the TextView to set title\n TextView memo = (TextView) v.findViewById(R.id.memo);\n ImageView imgV = (ImageView) v.findViewById(R.id.photo);\n\n memo.setText(marker.getTitle());\n\n \n /**\n * marker는 생성되는 순서대로 m0, m1, m2... m 뒤에 붙는 숫자들은 마커의 인덱스이고 이 인덱스는 \n * areaList의 인덱스와 같으므로 마커의 인덱스를 파싱해서 areaList에 그 인덱스로 접근하면 지역정보를 얻을 수 있다.\n */\n String id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파.\n // LatLng l = marker.getPosition();\n \n String mPath = mAreaList.get(mIdx).pathOfPic.get(0); // 해당 위치에 저장된 많은 사진중 첫번째 사진주\n Bitmap bitm = decodeBitmapFromStringpath(mPath, 100, 100);\n imgV.setImageBitmap(bitm);\n// imgV.setImageURI(Uri.parse(mPath));\n // Returning the view containing InfoWindow contents\n return v;\n\t\t\t}", "@Override\n public View getInfoContents(Marker marker) {\n View view = inflater.inflate(R.layout.layout_info_window, null, false);\n TextView txtName = view.findViewById(R.id.txtName);\n txtName.setText(marker.getTitle());\n// txtName.setText(message);\n return view;\n }", "java.util.List<com.google.cloud.videointelligence.v1p3beta1.ObjectTrackingAnnotation> \n getObjectAnnotationsList();", "private void fetchCafes(){\n DatabaseReference cafeRef = Singleton.get(mainActivity).getDatabase()\n .child(\"cafes\");\n\n // Add Listener when info is recieved or changed\n cafeRef.addValueEventListener(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, MyLatLng> latLngList = new HashMap<>();\n ArrayList<Cafe> cafes = new ArrayList<>();\n for (DataSnapshot locationSnapshot : dataSnapshot.getChildren()) {\n\n\n MyLatLng latLng = locationSnapshot.getValue(MyLatLng.class);\n Cafe cafe = locationSnapshot.getValue(Cafe.class);\n cafes.add(cafe);\n\n latLngList.put(locationSnapshot.getKey(), latLng);\n\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(cafe.getLatitude(), cafe.getLongitude())).title(cafe.getName()));\n marker.setTag(cafe.getId());\n marker.showInfoWindow();\n markers.add(marker);\n\n }\n setOnSearchInputChanged(cafes);\n //listener.onLoadLocationSuccess(latLngList);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n\n }", "List<IFeature> getFeatureList();", "@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}", "@JsonIgnore public Collection<Mass> getFatContents() {\n final Object current = myData.get(\"fatContent\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Mass>) current;\n }\n return Arrays.asList((Mass) current);\n }", "public String getMarker() {\n return this.marker;\n }", "public ContactInfo[] getContactInfo() {\n return contactInfo;\n }", "public Location[] getLocation() {\r\n return locations;\r\n }", "java.util.List<? extends edu.usfca.cs.dfs.StorageMessages.StoreChunkLocationOrBuilder> \n getChunksLocationOrBuilderList();", "@Override\n public View getInfoContents(final Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", marker.getTitle());\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "public static List<Information> getData() {\n List<Information> data = new ArrayList<>();\n int[] icons = {R.drawable.ic_number1, R.drawable.ic_number1, R.drawable.ic_number2,\n R.drawable.ic_number3, R.drawable.ic_number4, R.drawable.ic_number4,\n R.drawable.ic_action_settings, R.drawable.ic_action_settings};\n String[] titles = {\"Computer Science\", \"Electrical\", \"Fiction\", \"Mathematics\", \"Mechanical\", \"Chemical\", \"Civil\", \"Others\"};\n for (int i = 0; i < titles.length; i++) {\n Information current = new Information();\n current.iconId = icons[i % icons.length];\n current.title = titles[i % titles.length];\n data.add(current);\n }\n return data;\n }", "public Object[] getRawContent() {\n Object[] returnedContent = fFieldsMap.values().toArray(new Object[fFieldsMap.size()]);\n return returnedContent;\n }" ]
[ "0.66116625", "0.6264297", "0.6077777", "0.5629442", "0.55602294", "0.5550244", "0.5525342", "0.53260607", "0.53245085", "0.530638", "0.53034556", "0.5290002", "0.5264398", "0.52630574", "0.5234221", "0.522317", "0.52167743", "0.5201473", "0.5200572", "0.5197761", "0.5197761", "0.5197761", "0.51943064", "0.5175877", "0.51744753", "0.5159977", "0.5138865", "0.5130422", "0.5124695", "0.5116735", "0.5111505", "0.5097681", "0.5094159", "0.5093136", "0.5069337", "0.5048635", "0.5043", "0.50345296", "0.50308603", "0.5029111", "0.50236017", "0.50228995", "0.50184655", "0.501846", "0.5002295", "0.49778682", "0.4973409", "0.4968793", "0.4968793", "0.496743", "0.4961487", "0.49533024", "0.4949592", "0.49412352", "0.49396613", "0.493333", "0.49267164", "0.4917635", "0.49155855", "0.49126375", "0.49078172", "0.48942286", "0.48909006", "0.48876062", "0.48851168", "0.48850483", "0.48733136", "0.48733136", "0.487026", "0.4855933", "0.48541328", "0.48511568", "0.4849661", "0.48439744", "0.48422155", "0.48417822", "0.4838393", "0.4825416", "0.48248705", "0.48218307", "0.48218235", "0.48206773", "0.48183513", "0.48159868", "0.48137924", "0.48114458", "0.48087937", "0.48080185", "0.4804506", "0.47998625", "0.4798022", "0.47961417", "0.47896808", "0.4784912", "0.47817597", "0.4778948", "0.47771075", "0.47736967", "0.47715363", "0.4769881" ]
0.8072234
0
Shows the history popover for a given marker on the map
private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){ RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); relLayoutTutorial.setVisibility(View.GONE); GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject); FragmentManager fm = getActivity().getSupportFragmentManager(); RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom); fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, "RecyclerViewPopoverFragment"); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }", "public void showMarkerInfo(OperaFirebase mapMarker){\n Intent i = new Intent(this, MarkerInfoActivity.class);\n i.putExtra(\"MapMarker\", mapMarker);\n startActivity(i);\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n openTimesheetInfo(marker.getTitle());\n }", "public void showHistoryAction(boolean selected) {\n\t\tif (selected == true) {\n\t\t\tanimalDetailPanel.showHistoryShiftPane();\n\t\t\tfillAnimalDetailTable();\n\t\t}\n\t}", "@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n return;\n// openTimesheetInfo(marker.getTitle());\n }", "@Override\n public View getInfoWindow(Marker marker) {\n\n if(shownMarker!=null&&shownMarker.isInfoWindowShown()){\n shownMarker.hideInfoWindow();\n shownMarker.showInfoWindow();\n\n }\n\n return null;\n }", "@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "public void showHistorySwitchAction() {\n\t\tanimalsListPanel.switchToPast();\n\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n makeText(this, \"Info window clicked\",\n LENGTH_SHORT).show();\n marker.getTag();\n marker.getTitle();\n marker.getId();\n\n }", "@Override\n public View getInfoContents(final Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", marker.getTitle());\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")){\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n if(!marker.getTitle().equalsIgnoreCase(\"Destination\")) {\n if(mPreviousMarker !=null) // destination is marked\n show_card(marker.getTitle(),true,mlocation,mPreviousMarker);\n else\n show_card(marker.getTitle(),false,mlocation,mPreviousMarker);\n }else\n mPreviousMarker.getSnippet();\n\n return false;\n }", "private void showMarker() {\n\n if (myMarker == null) {\n MarkerOptions options = new MarkerOptions();//1 option co 2 thu k thieu vi tri ,hinh anh\n options.position(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));//vi tri kinh do vi do,no tra ve vi tri cuoi cung gps nhan dc ,neu\n options.title(\"dung123\");\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n //newu chua co thif sedc sinh ra bang cach add\n googleMap.addMarker(options);\n// myMarker.setTag(\"Hello\");//co the truyen doi tuig vao duoi window marker getTag\n } else {\n myMarker.setPosition(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));\n }\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void showDetails(Marker marker) throws JSONException{\n JSONObject data = (JSONObject) marker.getTag();\n\n // Get data from JSONObject\n String name = getName(data);\n String address = getAddress(data);\n String direction = data.getString(\"direction\");\n\n View layout = findViewById(R.id.detailspopup);\n\n // Find views\n TextView nameView = (TextView) findViewById(R.id.name);\n TextView addressView = (TextView) findViewById(R.id.address);\n TextView directionView = (TextView) findViewById(R.id.direction);\n\n // Add data to views\n nameView.setText(name);\n addressView.setText(address);\n directionView.setText(direction);\n\n // Show invisible layout\n layout.setVisibility(View.VISIBLE);\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n if (markerDestination != null)\n markerDestination.remove();\n markerDestination = mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.destination_marker))\n .position(latLng)\n .title(\"Destination\"));\n\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15.0f));\n //show bottom sheet\n\n BottomSheetRiderFragment mBottomSheet = BottomSheetRiderFragment.newInstance(String.format(\"%f,%f\", mLastLocation.getLatitude(), mLastLocation.getLongitude()),\n String.format(\"%f,%f\", latLng.latitude, latLng.longitude),\n true);\n Home.super.onPostResume();\n mBottomSheet.show(getSupportFragmentManager(), mBottomSheet.getTag());\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n if(marker.equals(markerPrueba)){\n UnsaFragment.newInstance(marker.getTitle(),\"Universidad nacional de san Agustin de Arequipa\" )\n .show(getSupportFragmentManager(), null);\n\n\n }\n\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}", "private void highLightMarker(Marker marker) {\n\t\tif (marker != null) {\n\t\t\t\n//\t\t\tmarker.setIcon(BitmapDescriptorFactory\n//\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n//\t\t\tmarker.showInfoWindow();\n\t\t}\n\t}", "@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }", "private void showMapFragment(boolean addToBackStack) {\n showFragment(fragments, MAP, addToBackStack);\n }", "@Override\n\t\t\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t\t\tLog.d(\"ASD\", marker.getTitle());\n\t\t\t\t\t\tString markerItemId = infoList.get(marker.getTitle());\n\t\t\t\t\t\tonMapWindwosClick(markerItemId, marker.getTitle());\n\t\t\t\t\t}", "public void onFocusChanged(ItemizedOverlay<?> overlay, OverlayItem newFocus) {\n\t\t if (null != newFocus) { \r\n \r\n\t\t\t MapView.LayoutParams params = (MapView.LayoutParams) popView.getLayoutParams(); \r\n \r\n\t\t\t params.x = marker.getBounds().centerX();// \r\n \r\n\t\t\t params.y = - marker.getBounds().height();// \r\n \r\n\t\t\t params.point = newFocus.getPoint(); \r\n \r\n\t\t\t TextView title_TextView = (TextView) popView.findViewById(R.id.map_bubbleTitle); \r\n \r\n\t\t\t title_TextView.setText(newFocus.getTitle()); \r\n \r\n\t\t\t TextView desc_TextView = (TextView) popView.findViewById(R.id.map_bubbleText); \r\n \r\n\t\t\t desc_TextView.setText(newFocus.getSnippet()); \r\n \r\n\t\t\t mapView.updateViewLayout(popView, params); \r\n \r\n\t\t\t popView.setVisibility(View.VISIBLE); \r\n \r\n\t\t\t mapView.getController().animateTo(newFocus.getPoint()); \r\n\t \r\n\t\t\t focusItem = newFocus; \r\n \r\n\t\t } \t\r\n \r\n\t\r\n\t }", "@Override\n public boolean onMarkerClick(Marker marker) {\n //Cuando se presiona un marker, se abre la ventana de info (default)\n marker.showInfoWindow();\n return true;\n }", "@Override\n\t\t\tpublic View getInfoWindow(Marker marker) {\n\t\t\t\tView v = getLayoutInflater().inflate(R.layout.map_info_window, null);\n\n // Getting reference to the TextView to set title\n TextView memo = (TextView) v.findViewById(R.id.memo);\n ImageView imgV = (ImageView) v.findViewById(R.id.photo);\n\n memo.setText(marker.getTitle());\n\n \n /**\n * marker는 생성되는 순서대로 m0, m1, m2... m 뒤에 붙는 숫자들은 마커의 인덱스이고 이 인덱스는 \n * areaList의 인덱스와 같으므로 마커의 인덱스를 파싱해서 areaList에 그 인덱스로 접근하면 지역정보를 얻을 수 있다.\n */\n String id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파.\n // LatLng l = marker.getPosition();\n \n String mPath = mAreaList.get(mIdx).pathOfPic.get(0); // 해당 위치에 저장된 많은 사진중 첫번째 사진주\n Bitmap bitm = decodeBitmapFromStringpath(mPath, 100, 100);\n imgV.setImageBitmap(bitm);\n// imgV.setImageURI(Uri.parse(mPath));\n // Returning the view containing InfoWindow contents\n return v;\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "public void showEmployeesHistory(boolean selected) {\n\t\tif (selected) {\n\t\t\tanimalDetailPanel.showHistoryShiftPane();\n\t\t\tfillEmployeesHistoryDetailTable();\n\t\t}\n\t}", "private void navigateToMoodHistoryMapFragment() {\n // open nav drawer\n solo.clickOnImageButton(0);\n\n // get maps item\n String label = rule.getActivity().getString(R.string.mood_history_map_label);\n\n // navigate to follow request\n assertTrue(solo.waitForText(label, 1, 2000));\n solo.clickOnText(label);\n }", "private void focus() {\n getMapRef().animateCamera(CameraUpdateFactory.newLatLngZoom(\n newHazard.getLatLong(), FOCUS_ZOOM));\n switch (newHazard.getTitle()) {\n case \"Road Works\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_warning_orange_24dp)));\n break;\n case \"Pothole\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_move_to_inbox_orange_24dp)));\n break;\n case \"Road Closure\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp)));\n break;\n case \"Flooding\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_pool_orange_24dp)));\n break;\n case \"Traffic Accident\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_directions_car_orange_24dp)));\n break;\n case \"Broken Glass\" :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_local_bar_orange_24dp)));\n break;\n default :\n getMapRef().addMarker(new MarkerOptions()\n .position(newHazard.getLatLong())\n .flat(true)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_error_orange_24dp)));\n break;\n }\n\n }", "@Override\n public void onCameraMove() {\n if(!markerClickflag)\n showMarkerButtons(false);\n }", "private void highLightMarker(Marker marker) {\n\n\t\t/*\n\t\tfor (Marker foundMarker : this.markers) {\n\t\t\tif (!foundMarker.equals(marker)) {\n\t\t\t\tfoundMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\t\t\t} else {\n\t\t\t\tfoundMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n\t\t\t\tfoundMarker.showInfoWindow();\n\t\t\t}\n\t\t}\n\t\t*/\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n marker.showInfoWindow();\n\n //Utils.bounceMarker(googleMap, marker);\n\n this.selectedMarker=marker;\n }", "@Override\n public void onMapClick(LatLng arg0) {\n mBaiduMap.hideInfoWindow();\n if (window != null) {\n window.showAtLocation(search, Gravity.BOTTOM, 0, 0);\n }\n }", "@UiHandler(\"history\")\n public void showHistory (ClickEvent event){\n \tshowHistory();\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n\n if (Config.CEK_KONEKSI(ListDealerMaps.this)) {\n if (markerAccessMapping.get(marker).equals(\"1\")) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(Config.DISP_KD_DEALER, markerIdMapping.get(marker));\n resultIntent.putExtra(Config.DISP_COY_DEALER, markerCoyMapping.get(marker));\n resultIntent.putExtra(Config.DISP_NAMA_DEALER, marker.getTitle());\n setResult(Activity.RESULT_OK, resultIntent);\n finish();\n }else{\n Toast.makeText(ListDealerMaps.this, Config.ALERT_ONLY_VIEW, Toast.LENGTH_SHORT).show();\n }\n } else {\n showDialog(Config.TAMPIL_ERROR);\n }\n\n }", "@Override\n public void onMarkerDragEnd(Marker arg0) {\n Log.d(\"System out\", \"onMarkerDragEnd...\"+arg0.getPosition().latitude+\"...\"+arg0.getPosition().longitude);\n map.animateCamera(CameraUpdateFactory.newLatLng(arg0.getPosition()));\n showPopUp(new LatLng(arg0.getPosition().latitude,arg0.getPosition().longitude));\n }", "@Override\r\n public View getInfoWindow(Marker marker) {\n return null;\r\n }", "public void showAddMemoriesPopover(){\n Log.i(logMessages.MEMORY_MONITORING, \"HistoryFragment : showAddMemoriesPopover called\");\n FragmentManager fm = getActivity().getSupportFragmentManager();\n AddMemoryFragment addMemoryFragment = AddMemoryFragment.newInstance();\n\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom);\n fragmentTransaction.replace(R.id.fragment_container, addMemoryFragment, \"AddMemoriesFragment\");\n\n fragmentTransaction.commit();\n }", "private void showCurrentLocation(LatLng ll) {\n if (mMarker != null) {\n mMarker.remove();\n }\n\n if (mZoom == 0) {\n mZoom = 15;\n } else {\n mZoom = googleMap.getCameraPosition().zoom;\n }\n\n // Move the camera instantly to current postion\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(ll, mZoom));\n\n // Marker\n mMarker = googleMap.addMarker(new MarkerOptions()\n .title(getString(R.string.current_location))\n .snippet(mLocationHelper.getAddress(ll.latitude, ll.longitude).toString())\n .position(ll));\n\n // Zoom in, animating the camera.\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(mZoom), 2000, null);\n }", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "private void showPoints() {\n\t\tMarkerOptions options = new MarkerOptions();\n\n\t\tfor (Integer i = 0; i < markerPoints.size(); i++) {\n\t\t\tLatLng point = markerPoints.get(i);\n\n\t\t\t// Setting the position of the marker\n\t\t\toptions.position(point);\n\n\t\t\t// Setting title for the MarkerOptions\n\t\t\toptions.title(names.get(i));\n\t\t\t// Setting snippet for the MarkerOptions\n\t\t\toptions.snippet(\"Latitude:\" + point.latitude + \",Longitude: \"\n\t\t\t\t\t+ point.longitude);\n\n\t\t\tif (statusVal == 0) {\n\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n\n\t\t\t} else {\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n\t\t\t}\n\n\t\t\t// Add new marker to the Google Map Android API V2\n\t\t\tgMmap.addMarker(options);\n\n\t\t\t// Creating CameraUpdate object for position\n\t\t\tCameraUpdate updatePosition = CameraUpdateFactory.newLatLngZoom(\n\t\t\t\t\tpoint, 15);\n\n\t\t\t// Applying zoom to the marker position\n\t\t\tgMmap.animateCamera(updatePosition);\n\t\t}\n\n\t}", "private void showPlaceInfo(Marker marker){\n if (marker != null){\n //unlock the drawer\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);\n\n et_drawer_name.setText(marker.getTitle());\n\n //open the drawer layer from the right\n layout_drawer.openDrawer(Gravity.RIGHT);\n\n final Marker markerCopy = marker;\n\n Button remove = (Button) findViewById(R.id.drawer_btn_remove);\n remove.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\n // set dialog message\n alertDialogBuilder\n .setMessage(\"Are you sure you want to remove location?\")\n .setCancelable(false)\n .setPositiveButton(\"Remove\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n removeMarkerFromMap(markerCopy);\n Toast.makeText(getApplicationContext(), \"Location Removed\",\n Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(\"Cancel\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // if this button is clicked, just close\n // the dialog box and do nothing\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }\n });\n\n //Close the drawer when cancel is pressed\n Button cancel = (Button) findViewById(R.id.drawer_btn_cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n }\n });\n\n //Save changes in the name and close drawer when save is pressed\n Button save = (Button) findViewById(R.id.drawer_btn_save);\n save.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n EditText editName = (EditText) findViewById(R.id.drawer_et_name);\n String editedName = editName.getText().toString();\n changeMarkerName(markerCopy, editedName);\n Toast.makeText(getApplicationContext(), \"Name Saved\", Toast.LENGTH_SHORT).show();\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n }\n });\n }\n }", "@Override\n public void onMapClick(LatLng latLng) {\n showMarkerButtons(false);\n current_number=\"\";\n markerClickflag=false;\n }", "@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tLog.e(\"map\", \"at InfoWindowClisck\");\n\t\t\t\t\n\t\t\t\tString id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파\n\t\t\t\tArrayList<String> _pathOfPic = mAreaList.get(mIdx).pathOfPic;\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(\"android.intent.action.CUSTOM_ALBUM\");\n\t\t\t\tintent.putStringArrayListExtra(\"pathOfPic\", _pathOfPic);\n\t\t\t\t\n\t\t\t\tmCtx.startActivity(intent);\t\n\t\t\t\t\n\t\t\t}", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n\tpublic void locationChanged(Location newLocation) {\n\t\tshowOnMap(newLocation);\n\t\tgiveNavigationInstructions(newLocation);\n\t}", "@Override\n public View getInfoContents(Marker marker) {\n TextView titleView = (TextView) contentsView.findViewById(R.id.text_info_window_title);\n titleView.setText(marker.getTitle());\n return contentsView;\n }", "void onHistoryButtonClicked();", "@Override\n public View getInfoWindow(Marker marker) {\n\n return null;\n }", "private void showMarker(Double lat, Double lng, String title) {\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(lat, lng))\n .title(title));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n //setOnInfoWindowClick listener\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n if(markerOnClick.get(marker).isItUserMarker()) {\n Intent intent = new Intent(MainActivity.this, FriendProfileActivity.class);\n intent.putExtra(\"friendID\", markerOnClick.get(marker).getID());\n startActivity(intent);\n }else{\n Intent intent = new Intent(MainActivity.this, AnswerTheQuestionActivity.class);\n intent.putExtra(\"questionID\", markerOnClick.get(marker).getID());\n intent.putExtra(\"userID\", user.getId());\n startActivityForResult(intent,ANSWER_THE_QUESTION_ACTIVITY_REQUSET_CODE);\n }\n }\n });\n restoreCurrentLocation();\n }", "private void openTimesheetInfo (String markerTitle) {\n // Chuyen sang man hinh timesheet info\n Intent intent = new Intent(TourTabsActivity.this, TimesheetInfoActivity.class);\n // Gan so thu tu tour\n intent.putExtra(\"TourOrder\", tourOrder);\n // Gan so thu tu timesheet\n ArrayList<TourTimesheet> currentTimesheets = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet();\n for (int i = 0; i < currentTimesheets.size(); i++) {\n String title = currentTimesheets.get(i).getmBuildingName() + \"-\" + currentTimesheets.get(i).getmClassroomName();\n if (title.equals(markerTitle)) {\n // Neu trung marker title thi gan timesheet order\n intent.putExtra(\"TimesheetOrder\", i);\n // Chuyen activity\n TourTabsActivity.this.startActivity(intent);\n break;\n }\n }\n }", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "@Override\n\t\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\t\tgoogleMap.clear();\n\n\t\t\t\t\t// Creating an instance of MarkerOptions to set position\n\t\t\t\t\t// MarkerOptions markerOptions = new MarkerOptions();\n\n\t\t\t\t\t// Setting position on the MarkerOptions\n\t\t\t\t\tmarker.position(arg0);\n\n\t\t\t\t\t// Animating to the currently touched position\n\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory.newLatLng(arg0));\n\n\t\t\t\t\t// Adding marker on the GoogleMap\n\t\t\t\t\tMarker marker1 = googleMap.addMarker(marker);\n\n\t\t\t\t\t// Showing InfoWindow on the GoogleMap\n\t\t\t\t\tmarker1.showInfoWindow();\n\t\t\t\t}", "@Override\n public boolean onMarkerClick(Marker marker) {\n if (Objects.equals(marker.getTag(), true)) {\n Toast.makeText(MapsActivity.this,\n \"Own marker\", Toast.LENGTH_SHORT).show();\n } else {\n try {\n showDetails(marker);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "@Override\n public View getInfoContents(Marker marker) {\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "@Override\n public void onClick(View v) {\n showMemoriesPopover();\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng newLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (marker == null) {\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n textView.setText(\"Your Current Location: \" + address); //For Testing, display coordinates on textView every time it's triggered\n marker = mMap.addMarker(new MarkerOptions().position(newLocation).title(\"Your current location:\"));\n arrayMarker.add(0, marker);\n builder.include(marker.getPosition());\n marker.setSnippet(address);\n } else {\n marker.setPosition(newLocation);\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n// textView.setText(\"\\nCurrent Location: \" + address);\n marker.setTitle(\"Your current location:\");\n marker.setSnippet(address);\n }\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 14.0f));\n renderCamera();\n }", "@Override\n public View getInfoWindow(Marker marker) {\n return null;\n }", "@Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }", "@Override\n public void handleOnGoogleMapClick(GoogleMap mMap, LatLng latLng) {\n mMap.clear();\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n }", "@Override\n public View getInfoContents(Marker marker) {\n View view = inflater.inflate(R.layout.layout_info_window, null, false);\n TextView txtName = view.findViewById(R.id.txtName);\n txtName.setText(marker.getTitle());\n// txtName.setText(message);\n return view;\n }", "@Override\r\n\tpublic void onBackPressed() {\r\n\t\tif (isMapDisplayed) {\r\n\t\t\tisMapDisplayed=false;\r\n\t\t\tswitcher.showPrevious();\r\n\t\t} else super.onBackPressed();\r\n\t}", "@Override\n public void onMapClick(LatLng latLng) {\n if(findViewById(R.id.marker_window).getVisibility() == View.VISIBLE){\n findViewById(R.id.marker_window).setVisibility(View.INVISIBLE);\n setIconListVisibility(true);\n }else{\n if (!firstMapTouch) {\n Toast.makeText(getApplicationContext(), R.string.maps_onmapclick, Toast.LENGTH_SHORT).show();\n firstMapTouch = true;\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n\n\n mMap = googleMap;\n Intent intent = getIntent();\n seisme = (Seisme) intent.getSerializableExtra(\"seisme\");\n String[] split = seisme.getPoint().split(\" \");\n LatLng point = new LatLng(Double.parseDouble(split[0]), Double.parseDouble(split[1]));\n mMap.addMarker(new MarkerOptions().position(point).title(seisme.getTitle()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener()\n {\n @Override\n public void onInfoWindowClick(Marker marker)\n {\n Context context = getApplicationContext();\n Intent intent = new Intent(MapsActivity.this, infoDetail.class);\n intent.putExtra(\"item\", seisme);\n startActivity(intent);\n }\n });\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n marker.hideInfoWindow();\n Punto temp = esEste(marker.getTitle());\n agregarItems(temp, marker);\n\n return true;\n }", "private void setUpTheIcon ( Marker marker ){\n\n // Hide the current info window\n HideCurrentInfoWindow();\n\n if ( mCurrentDestination == null || !mCurrentDestination.getId().equals(marker.getId()) ){\n\n if ( mCurrentPark != null ){\n if ( !mCurrentPark.getId().equals(marker.getId() ) ){\n // clicked ! on current selected parking;\n setSmallIcon ( mCurrentPark );\n\n mCurrentPark = marker;\n\n setBigIcon ( mCurrentPark );\n\n }\n }\n else {\n //previous was selected nothing;\n\n mCurrentPark = marker;\n setBigIcon ( mCurrentPark );\n mCurrentPark.showInfoWindow();\n }\n }else{\n //clicked not a parking;\n if ( mCurrentPark != null ){\n\n setSmallIcon ( mCurrentPark );\n mCurrentPark = null;\n }\n }\n\n // show info window for clicked marker;\n marker.showInfoWindow();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Intent intent = getIntent();\n String title=intent.getStringExtra(\"title\");\n Double lat = intent.getExtras().getDouble(\"latitude\");\n Double lng = intent.getExtras().getDouble(\"longitude\");\n LatLng latLng= new LatLng(lat,lng);\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .title(title)\n .anchor((float) 0.5, (float) 0.5);\n //.snippet(\"Время: \" + MainActivity.time.get(MainActivity.position));\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker));\n mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Listing listing = (Listing) marker.getTag();\n goToDetailedListingScreen(listing);\n return false;\n }", "public void showInfoWindow(){\n\t\tif (mInfoWindow == null)\n\t\t\treturn;\n\t\tfinal int markerWidth = mIcon.getIntrinsicWidth();\n\t\tfinal int markerHeight = mIcon.getIntrinsicHeight();\n\t\tfinal int offsetX = (int)(markerWidth * (mIWAnchorU - mAnchorU));\n\t\tfinal int offsetY = (int)(markerHeight * (mIWAnchorV - mAnchorV));\n\t\tif (mBearing == 0) {\n\t\t\tmInfoWindow.open(this, mPosition, offsetX, offsetY);\n\t\t\treturn;\n\t\t}\n\t\tfinal int centerX = 0;\n\t\tfinal int centerY = 0;\n\t\tfinal double radians = -mBearing * Math.PI / 180.;\n\t\tfinal double cos = Math.cos(radians);\n\t\tfinal double sin = Math.sin(radians);\n\t\tfinal int rotatedX = (int)RectL.getRotatedX(offsetX, offsetY, centerX, centerY, cos, sin);\n\t\tfinal int rotatedY = (int)RectL.getRotatedY(offsetX, offsetY, centerX, centerY, cos, sin);\n\t\tmInfoWindow.open(this, mPosition, rotatedX, rotatedY);\n\t}", "void showTooltip();", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "public void showMoveHistory() {\n\t\ttry {\n\t\t\tif (gameMoveHistoryStage == null) {\n\t\t\t\tgameMoveHistoryStage = new Stage();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onCameraIdle() {\n if(markerClickflag)\n showMarkerButtons(true);\n\n //Once camera adjusts to the marker, make the marker click flag false. Any newmovement of camera will cause\n //buttons to disappear.\n markerClickflag=false;\n }", "@Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "private void setMarker(String key,String marker_title) {\n if(mMap==null)\n return;\n\n if(mMarker == null)\n {\n mMarker = mMap.addMarker(new MarkerOptions().position(prevLocation).title(key));\n }\n else\n {\n mMarker.setTitle(marker_title);\n mMarker.setPosition(prevLocation);\n }\n mMarker.showInfoWindow();\n updateCameraBounds();\n new FetchURL(MainActivity.this)\n .execute(getUrl(currLocation, prevLocation, mDirectionMode, getString(R.string.google_maps_key)), mDirectionMode);\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "private void addGreenMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\r\n markerOptions.position(latLng);\r\n //markerOptions.title(dt.format(newDate));\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n mMap.addMarker(markerOptions);\r\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n View v = getLayoutInflater().inflate(R.layout.layout_marker, null);\n\n TextView info= (TextView) v.findViewById(R.id.info);\n TextView hotelname= (TextView) v.findViewById(R.id.info1);\n\n\n hotelname.setText(\"\"+HotelName+\"\");\n info.setText(\"\"+CurrencySymbol+\"\"+TotalFare);\n\n return v;\n }\n });\n int height = 180;\n int width = 200;\n BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.drawable.blu_pointer);\n Bitmap b=bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n\n\n\n\n\n mMap.getUiSettings().setMapToolbarEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(Lati,Longi);\n mMap.addMarker(new MarkerOptions().position(sydney).\n title(HotelName).\n snippet(\"\"+CurrencySymbol+\" \"+TotalFare).\n icon(BitmapDescriptorFactory.fromBitmap(smallMarker)));\n CameraPosition cameraPosition = new CameraPosition.Builder().target(sydney).zoom(18).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n //googleMap.moveCamera(cameraUpdate);\n mMap.animateCamera(cameraUpdate);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n\t\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\t\t\n\t\t\t\t\tfor(final PoiInfo poiInfo:AppContext.listmap){\n\t\t\t\t\t\tif(poiInfo.location.latitude==arg0.getPosition().latitude&&poiInfo.location.longitude==arg0.getPosition().longitude){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tView mView = LayoutInflater.from(ZhouBianYaodian.this).inflate(R.layout.map_massage_data, null);\n\t\t\t\t\t\t\tTextView dataname=(TextView) mView.findViewById(R.id.txt_map_name);\n\t\t\t\t\t\t\tTextView address=(TextView)mView. findViewById(R.id.txt_map_address);\n\t\t\t\t\t\t\tImageView imageView=(ImageView)mView. findViewById(R.id.map_image_call); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdataname.setText(poiInfo.name==null?\"\":poiInfo.name);\n\t\t\t\t\t\t\t\taddress.setText(poiInfo.address==null?\"\":poiInfo.address);\n\t\t\t\t\t\t\t\tif(poiInfo.phoneNum!=null&&!poiInfo.phoneNum.equals(\"\")){\n\t\t\t\t\t\t\t\t\timageView.setVisibility(ImageView.VISIBLE);\n\t\t\t\t\t\t\t\t\timageView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_DIAL, Uri\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(\"tel:\" + poiInfo.phoneNum));\n\t\t\t\t\t\t\t\t\t\t\tLog.d(\"测试数据\", poiInfo.phoneNum);\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmInfoWindow= new InfoWindow(mView,arg0.getPosition(), -47);\n\t\t\t\t\t\t\tmBaiduMap.showInfoWindow(mInfoWindow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n\tpublic View getInfoWindow(Marker marker) {\n\t\treturn null;\n\t}", "@Override\n\tpublic View getInfoWindow(Marker marker) {\n\t\treturn null;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MarkerOptions m= new MarkerOptions().position(new LatLng(28.7041,77.1025)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"tap to get the alerts\");\n n= mMap.addMarker(m);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n\n if (!lati.equals(\"false\") && !longi.equals(\"false\")) {\n Double la = Double.parseDouble(lati);\n Double lo = Double.parseDouble(longi);\n // Add a marker in Sydney and move the camera\n n.setPosition(new LatLng(la,lo));\n n.setTitle(level);\n if(level.equals(\"hard\")){\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));}\n else\n {\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));}\n LatLng posi = new LatLng(la, lo);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(posi));\n }\n\n\n }\n });\n\n\n\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n currentPosition = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\n MarkerOptions currentPositionMarker = new MarkerOptions()\n .position(currentPosition)\n .title(\"You are Here\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE));\n // Add current location marker to map\n mMap.addMarker(currentPositionMarker);\n addArchitectureMarkers();\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n searchBar.setVisibility(View.GONE);\n searchBar.setText(\"\");\n inputManager.hideSoftInputFromWindow(searchBar.getWindowToken(), 0);\n }\n });\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"testing\", String.valueOf(marker.getPosition()));\n if (!marker.getPosition().equals(currentPosition)) {\n //display pop-up when marker clicked\n Intent intent = new Intent(MapsActivity.this, PopUpInfoWindow.class);\n\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"MARKER_TITLE\", marker.getTitle());\n bundle.putParcelable(\"MARKER_LATLNG\", marker.getPosition());\n bundle.putParcelable(\"CURRENT_LATLNG\", currentPosition);\n bundle.putString(\"MARKER_PLACEID\", marker.getTag().toString());\n destinationMarker = marker;\n //send data to new activity\n intent.putExtras(bundle);\n startActivity(intent);\n }\n return false;\n }\n }\n );\n //create loading screen on start up\n loadingDialog = new AlertDialog.Builder(this).create();\n loadingDialog.setCancelable(false);\n LayoutInflater inflater = getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.progress_bar_dialog, null);\n loadingDialog.setView(dialogView);\n loadingDialog.show();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }", "@Override\n public void onMouseOver(MouseOverEvent event) {\n popup.setPositionAndShow(event);\n }", "@Override\n public View getInfoContents(Marker arg0) {\n\n // Getting view from the layout file info_window_layout\n View v = getLayoutInflater().inflate(R.layout.window_layout, null);\n\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.beacon_title1);\n\n // Getting reference to the TextView to set longitude\n ImageView img = (ImageView) v.findViewById(R.id.goat);\n\n // Setting the latitude\n tvLat.setText(arg0.getTitle());\n // Returning the view containing InfoWindow contents\n return v;\n\n }" ]
[ "0.63299465", "0.61616784", "0.6149679", "0.6097017", "0.6056507", "0.60302716", "0.5989299", "0.59260255", "0.5918066", "0.591543", "0.5892186", "0.587989", "0.58617526", "0.5849738", "0.58493984", "0.58442295", "0.5842387", "0.5842387", "0.5745802", "0.57326007", "0.57090193", "0.56964797", "0.56796324", "0.5675727", "0.5662468", "0.56457657", "0.56138545", "0.5566069", "0.5548464", "0.55330336", "0.55171305", "0.550863", "0.55040276", "0.54952246", "0.54905075", "0.5477596", "0.5464431", "0.5453302", "0.5444981", "0.5419682", "0.5413162", "0.5411579", "0.5402244", "0.54001456", "0.5370338", "0.536017", "0.53599125", "0.53539675", "0.5353781", "0.5351839", "0.53504217", "0.53504217", "0.53504217", "0.5337068", "0.5324775", "0.5322998", "0.5315648", "0.5304621", "0.5297935", "0.52880925", "0.5287885", "0.5265223", "0.5259564", "0.525625", "0.5245262", "0.5245046", "0.5244815", "0.5240079", "0.5239562", "0.52094406", "0.52022344", "0.51997995", "0.5174656", "0.51733524", "0.5156361", "0.51535827", "0.515191", "0.51480216", "0.51222754", "0.51149946", "0.511099", "0.5106124", "0.51019394", "0.5101194", "0.50931686", "0.5092057", "0.5089639", "0.5080011", "0.5075318", "0.5075018", "0.5073937", "0.50730455", "0.50709265", "0.50709265", "0.5068572", "0.5068316", "0.5061251", "0.50389946", "0.5025412", "0.50251704" ]
0.5159994
74
Uses bubble sort to sort geofenceInfoContents by date
private GeofenceInfoContent[] sortByDate(GeofenceInfoContent[] geofenceInfoContents){ GeofenceInfoContent infoContent = null; for(int j = 0; j < geofenceInfoContents.length; j++) { for (int i = 0; i < geofenceInfoContents.length; i++) { infoContent = geofenceInfoContents[i]; if (i < geofenceInfoContents.length - 1) { String year1 = infoContent.getYear(); String year2 = geofenceInfoContents[i + 1].getYear(); int year1Int = Integer.parseInt(year1); int year2Int = Integer.parseInt(year2); if (year1Int < year2Int) { geofenceInfoContents[i] = geofenceInfoContents[i + 1]; geofenceInfoContents[i + 1] = infoContent; } } } } return geofenceInfoContents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }", "private void sortByDateOpen() {\r\n\t\tfor ( int i = 0; i < size-1; i++ ) {\r\n\t\t\tint minIndex = i; \r\n\t\t\tfor ( int j = i + 1; j < size; j++) { \r\n\t\t\t\t//returns -1 if the date is less than\r\n\t\t\t\tif ( accounts[j].getDateOpen().compareTo(accounts[minIndex].getDateOpen()) == -1 ) {\r\n\t\t\t\t\tminIndex = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAccount temp = accounts[minIndex];\r\n\t\t\taccounts[minIndex] = accounts[i];\r\n\t\t\taccounts[i] = temp;\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n earliestDateIndex = j;\n }\n Account acc = accounts[earliestDateIndex];\n accounts[earliestDateIndex] = accounts[i];\n accounts[i] = acc;\n }\n }", "private void sortByDateOpen() { // sort in ascending order\n\t\tint numAccounts = size;\n\t\tDate firstDateOpen;\n\t\tDate secondDateOpen;\n\t\t\n\t\tfor (int i = 0; i < numAccounts-1; i++) {\n\t\t\t\n\t\t\t\n\t\t\tint min_idx = i;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = i+1; j < numAccounts; j++) {\n\t\t\t\t\n\t\t\t\t// Retrieve last name of two that you are comparing\n\t\t\t\tfirstDateOpen = accounts[j].getDateOpen();\n\t\t\t\tsecondDateOpen = accounts[min_idx].getDateOpen();\n\t\t\t\t\n\t\t\t\tif (firstDateOpen.compareTo(secondDateOpen) < 0) {\n\t\t\t\t\tmin_idx = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAccount temp = accounts[min_idx];\n\t\t\taccounts[min_idx] = accounts[i];\n\t\t\taccounts[i] = temp;\n\t\t}\n\t\t\n\t}", "private void sortByDate(List<Entry> entries) {\n\t\t\n\t\tCollections.sort(entries, new Comparator<Entry>() {\n\t\t\tpublic int compare(Entry o1, Entry o2) {\n\t\t\t if (o1.getTimestamp() == null || o2.getTimestamp() == null)\n\t\t\t return 0;\n\t\t\t return o1.getTimestamp().compareTo(o2.getTimestamp());\n\t\t\t }\n\t\t\t});\n\t}", "private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }", "private void sortDate()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getReleaseDate().compareTo(b.getReleaseDate());\n if( result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }", "@Override\n public void onSortByDate() {\n mSorter.sortLocationsByDate(mListLocations);\n mAdapter.notifyDataSetChanged();\n }", "public void sortMarkers() {\n\t\tCollections.sort(getMarkerSet().getMarkers(),\r\n\t\t\t\tnew MarkerTimeComparator());\r\n\t\t// log.debug(\"[sortMarkers]after: \" + getMarkerSet().getMarkers());\r\n\r\n\t}", "public void dateHashMapSorted() {\n\t\t//array used to store the key values of the unsorted HashMap\n\t\tLocalDate[] unsortedArr = new LocalDate[SORTINGDATES_SIZE];\n\t\n\t\t//adding all the keys to unsortedArr\n\t\tint i = 0;\n\t\tfor (LocalDate key : map.keySet()) {\n\t\t\t\tunsortedArr[i++] = key;\n\t\t\t}\n\t\t\n\t\tfor (int currIndex = 1; currIndex < unsortedArr.length; currIndex++) {\n\t\t\tLocalDate date = unsortedArr[currIndex];\n\t\t\tint k = currIndex - 1;\n\t\t\t\t\n\t\t\t/*\n\t\t\t * while the index for the array stays above 0 and the element in the previous\n\t\t\t * index is greater than the element at the currentIndex\n\t\t\t */\n\t\t\twhile ((k >= 0) && (unsortedArr[k].isAfter(date))) {\n\t\t\t\t//shifting the elements to the right\n\t\t\t\tunsortedArr[k + 1] = unsortedArr[k];\n\t\t\t\t//decrement x to move the other elements over\n\t\t\t\tk--;\t\n\t\t\t}\n\t\t\tunsortedArr[k + 1] = date;\n\t\t}\n\n\t\tfor (i = 0; i < unsortedArr.length; ++i) {\n\t\t\tSystem.out.println(unsortedArr[i]);\n\t\t}\n\t}", "private void sortMedApts(List<MedicationAppointment> medApts2) {\n \t}", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "public void dateHashMapSortedDescending() {\n\t\t//array used to store the key values of the unsorted HashMap\n\t\tLocalDate[] unsortedArr = new LocalDate[SORTINGDATES_SIZE];\n\t\t\t\n\t\t//adding all the keys to unsortedArr\n\t\tint i = 0;\n\t\tfor (LocalDate key : map.keySet()) {\n\t\t\tunsortedArr[i++] = key;\n\t\t}\n\t\t\t\t\n\t\tfor (int currIndex = 1; currIndex < unsortedArr.length; currIndex++) {\n\t\t\tLocalDate date = unsortedArr[currIndex];\n\t\t\tint k = currIndex - 1;\n\t\t\t\t\t\t\n\t\t\t/*\n\t\t\t* while the index for the array stays above 0 and the element in the previous\n\t\t\t* index is greater than the element at the currentIndex\n\t\t\t*/\n\t\t\twhile ((k >= 0) && (unsortedArr[k].isBefore(date))) {\n\t\t\t\t//shifting the elements to the right\n\t\t\t\tunsortedArr[k + 1] = unsortedArr[k];\n\t\t\t\t//decrement x to move the other elements over\n\t\t\t\tk--;\t\n\t\t\t}\n\t\t\tunsortedArr[k + 1] = date;\n\t\t}\n\n\t\tfor (i = 0; i < unsortedArr.length; ++i) {\n\t\t\tSystem.out.println(unsortedArr[i]);\n\t\t}\n\t}", "public void sortGivenArray_date(){\n movieList = mergeSort(movieList);\n }", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private void sort() {\n Collections.sort(mEntries, new Comparator<BarEntry>() {\n @Override\n public int compare(BarEntry o1, BarEntry o2) {\n return o1.getX() > o2.getX() ? 1 : o1.getX() < o2.getX() ? -1 : 0;\n }\n });\n }", "public static void main(String[] args) throws ParseException {\n HashMap<Date, String> hmap = new HashMap<Date, String>();\n /* hmap.put(5, \"A\");\n hmap.put(11, \"C\");\n hmap.put(4, \"Z\");\n hmap.put(662, \"Y\");\n hmap.put(9, \"P\");\n hmap.put(661, \"Q\");\n hmap.put(0, \"R\");*/\n \n Date date = new Date();\n \n SimpleDateFormat ft = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n\t//format.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\tString dat = \"2017-06-05T08:07:34.000Z\";\n\tString dats = \"2017-06-05T21:07:34.012Z\";\n\tDate datesss = ft.parse(dat);\n\tDate da = ft.parse(dats);\n\tSystem.out.println(\"ok fine :\"+ft.format(datesss));\n hmap.put(datesss,\"u\");\n hmap.put(da,\"l\");\n\n System.out.println(\"Before Sorting:\");\n Set set = hmap.entrySet();\n Iterator iterator = set.iterator();\n while(iterator.hasNext()) {\n Map.Entry me = (Map.Entry)iterator.next();\n System.out.print(me.getKey() + \": \");\n System.out.println(me.getValue());\n }\n Map<Date, String> map = new TreeMap<Date, String>(hmap); \n String ab = map.get(map.keySet().toArray()[0]);\n\n/*Date firstKey = (Date) map.keySet().toArray()[0];\nString valueForFirstKey = map.get(firstKey);\n System.out.println(firstKey);\n System.out.println(valueForFirstKey);*/\n System.out.println(\"After Sorting:\");\n Set set2 = map.entrySet();\n Iterator iterator2 = set2.iterator();\n while(iterator2.hasNext()) {\n Map.Entry me2 = (Map.Entry)iterator2.next();\n System.out.print(me2.getKey() + \": \");\n System.out.println(me2.getValue());\n }\n System.out.println(\"#######################################################\");\n /* Map<Date, String> mat = new TreeMap<Date, String>(new Comparator<Date>() {\n public int compare(Date d1, Date d2) {\n return d1.after(d2) ? 1 : -1;\n }\n });*/\n \n Map<Long, String> mat = new TreeMap<Long, String>();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n Date d1 = dateFormat.parse(\"2017-06-05T08:07:34.000Z\");\n Date d2 = dateFormat.parse(\"2017-06-05T21:07:34.000Z\");\n Date d3 = dateFormat.parse(\"2021-04-12T21:10:25.000Z\");\n \n// String firstKey = (String) mat.keySet().toArray()[0];\n//\tString valueForFirstKey = (String) mat.get(firstKey);\n\tlong epocha = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(\"2017-06-05T08:07:34.000Z\").getTime() / 1000;\n\tlong epochb = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(\"2008-06-05T21:07:34.000Z\").getTime() / 1000;\n\tlong epochc = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(\"2015-01-07T20:57:40.000Z\").getTime() / 1000;\n\tlong epochd = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\").parse(\"2015-01-30T00:32:20.000Z\").getTime() / 1000;\n\t\n\tmat.put(epocha, \"s2\");\n mat.put(epochb, \"s1\");\n mat.put(epochc, \"s3\");\n mat.put(epochd,\"s4\");\n\t\n\tSystem.out.println(\"epoch:\"+epocha);\n\tSystem.out.println(\"epocha:\"+epochb);\n\tSystem.out.println(\"epochc:\"+epochc);\n\tSystem.out.println(\"epochd:\"+epochd);\n//\tSystem.out.println(firstKey);\n//\tSystem.out.println(valueForFirstKey);\n \n System.out.println(mat );\n \n \n \n \n /* System.out.println(map.size());\n int firstKey1 = (Integer) map.keySet().toArray()[6];\n System.out.println(\"firstKey1:\"+firstKey1);\n\tString valueForFirstKey2 = (String) map.get(firstKey1);\n\tSystem.out.println(\"valueForFirstKey2 :\"+valueForFirstKey2);*/\n}", "public void sortDaysArray() {\n if (_savedDates.size() > 0) {\n Collections.sort(_savedDates, Collections.reverseOrder());\n }\n //Log.i(\"DailyLogFragment\", \"_savedDates after sort = \" + _savedDates);\n }", "public List<SortedArrayInfo> sortHistory();", "private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}", "public void sortByDate(){\n output.setText(manager.display(true, \"date\"));\n }", "private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}", "public void sortAppointments() {\n reminders = sort(reminders);\n followup = sort(followup);\n }", "public ArrayList<Event> sortByDate() {\n\t\tArrayList<Event>calendarSortedByDate = new ArrayList();\n\t\tfor(int j = 0; j<calendar.size(); j++) {\n\t\t\tcalendarSortedByDate.add(calendar.get(j));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < calendarSortedByDate.size() - 1; i++) {\n\t\t // Find the minimum in the list[i..list.size-1]\n\t\t Event currentMin = calendarSortedByDate.get(i);\n\t\t int currentMinIndex = i;\n\n\t\t for (int j = i + 1; j < calendarSortedByDate.size(); j++) {\n\t\t if (currentMin.compareDate​(calendarSortedByDate.get(j)) > 0) {\n\t\t currentMin = calendarSortedByDate.get(j);\n\t\t currentMinIndex = j;\n\t\t }\n\t\t }\n\n\t\t // Swap list[i] with list[currentMinIndex] if necessary;\n\t\t if (currentMinIndex != i) {\n\t\t \t calendarSortedByDate.set(currentMinIndex, calendarSortedByDate.get(i));\n\t\t \t calendarSortedByDate.set(i, currentMin);\n\t\t }\n\t\t }\n\t\treturn calendarSortedByDate;\n\t}", "private void sortDateList(List<Date> dateList) {\n Collections.sort(dateList);\n }", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\t\t\t\tpublic int compare(StatisticsItemData o1, StatisticsItemData o2) {\n\t\t\t\t\treturn o2.getDate().compareTo(o1.getDate());\n\t\t\t\t}", "public void sort() {\n\t\tArrayList<Medication> dayList = new ArrayList<Medication>();\n\t\tupcomingMedsLabel.setText(\"\");\n\t\tDate dt = new Date();\n\t\tDateFormat df = new SimpleDateFormat(\"EEEE\");\n\t\tString currentDay = df.format(dt);\n\t\t\n\t\t//Runs through all elements in the array\n\t\tfor(int i = 0; i < medList.size(); i++) {\n\t\t\t//Checks to see if the medication needs to be taken today\n\t\t\tif(medList.get(i).getMedDateTime().contains(currentDay)) {\n\t\t\t\tboolean added = false;\n\t\t\t\t//If no other element has been added, added the element\n\t\t\t\tif(dayList.size() == 0) {\n\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t} else {\n\t\t\t\t\t//Checks all other medications in the dayList to order them chronologicaly\n\t\t\t\t\tfor(int j = 0; j < dayList.size(); j++) {\n\t\t\t\t\t\t//Get the hour of element at j and compare it again element at i of medList\n\t\t\t\t\t\tint hour = Integer.parseInt(dayList.get(j).getHour());\n\t\t\t\t\t\t//If < add at j, if equal check minutes else add later\n\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getHour()) < hour) {\n\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (Integer.parseInt(medList.get(i).getHour()) == hour) {\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\t//Checks against minutes\n\t\t\t\t\t\t\tint minute = Integer.parseInt(dayList.get(j).getMinute());\n\t\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getMinute()) < minute) {\n\t\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(dayList.size() > (j + 1)) {\n\t\t\t\t\t\t\t\t\tdayList.add(j+1, medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(added == false) {\n\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update the upcomingMedsLabel\n\t\tfor(int i = 0; i < dayList.size(); i++) {\n\t\t\tupcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + dayList.get(i));\n\t\t}\n\t}", "@Test\n public void testShipment_Sorted_By_Date() {\n List<Widget> widgets = shipment.getWidgetsSortedByDate();\n assertNotNull(widgets);\n assertTrue(widgets.size() == 10);\n Widget widget1 = (Widget) widgets.get(0);\n Widget widget2 = (Widget) widgets.get(1);\n assertTrue(widget1.getColor().compareTo(widget2.getColor()) <= 0);\n }", "private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }", "public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }", "public void printByDate() {\n for (int i = 0; i < numBooks; i++)\n {\n for (int j = i + 1; j < numBooks; j++) {\n if (books[i].getDatePublished().compareTo(books[j].getDatePublished()) > 0)\n {\n Book temp = books[i];\n books[i] = books[j];\n books[j] = temp;\n }\n }\n }\n System.out.println(\"**List of books by the dates published.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}", "@Test\n\tpublic void testAssociatorSort() throws Exception {\n\t\t// add out of order to events list\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tAssert.assertEquals(\"closest event first\",\n\t\t\t\tcomparatorTest.closeEvent, sorted.get(0).getEvent());\n\t\tAssert.assertEquals(\"farther event last\",\n\t\t\t\tcomparatorTest.fartherEvent,\n\t\t\t\tsorted.get(testService.events.size() - 1).getEvent());\n\n\t\tSystem.err.println(testAssociator.formatOutput(reference, null, sorted));\n\t}", "public void sortAuthority(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}", "public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "public static void main(String[] args) {\n List l = new ArrayList();\r\n\tl.add(Month.SEP);\r\n\tl.add(Month.MAR);\r\n\tl.add(Month.JUN);\r\n\tSystem.out.println(\"\\nList before sort : \\n\" + l);\r\n\tCollections.sort(l);\r\n\tSystem.out.println(\"\\nList after sort : \\n\" + l);\r\n }", "private List<Content> sortContentMapByVolumeAndBarcode(Map<Integer, List<Content>> unOrderderdContentMap) {\n\n\t\tList<Content> contentsLongList = new LinkedList<>();\n\n\t\tfor (Map.Entry<Integer, List<Content>> entry : unOrderderdContentMap.entrySet())\n\t\t\tfor (Content content : entry.getValue())\n\t\t\t\tcontentsLongList.add(content);\n\n\t\tCollections.sort(contentsLongList, (c1, c2) -> {\n\t\t\tInteger c1Volume = c1.getVolume();\n\t\t\tInteger c2Volume = c2.getVolume();\n\t\t\tString c1Barcode = c1.getBarcode();\n\t\t\tString c2Barcode = c2.getBarcode();\n\n\t\t\treturn c2Volume - c1Volume != 0 ? c2Volume - c1Volume : c1Barcode.compareTo(c2Barcode);\n\t\t});\n\n\t\treturn contentsLongList;\n\t}", "public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }", "public void sortEvents() {\n\t\tCollections.sort(events);\n\t}", "public void sort() {\n documents.sort();\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "ArrayList<String> sortFiles(String[] allFiles){\n\n ArrayList<String> tempArrayList = new ArrayList<String>();\n ArrayList<String> returnArrayList = new ArrayList<String>();\n String[] tempArray = allFiles;\n String[] returnArray;\n\n int numOfFiles = tempArray.length;\n\n //delete nonneeded files\n for(int k = 0; k < numOfFiles; k++){\n if (tempArray[k].startsWith(\"G-\") || tempArray[k].startsWith(\"M-\") || tempArray[k].startsWith(\"I-\")){\n tempArrayList.add(tempArray[k]);\n }\n }\n\n returnArray = new String[tempArrayList.size()];\n for(int i = 0; i < tempArrayList.size(); i++){\n returnArray[i] = tempArrayList.get(i);\n }\n\n //if 0 return empty array\n if (returnArray.length < 2){\n return returnArrayList;\n }\n\n //bubble sort\n for (int i = 0; i < returnArray.length-1; i++){\n for (int j = 0; j < returnArray.length-i-1; j++){\n //get string of full number from file\n String tempFirst = returnArray[j].split(\"_\")[2] + returnArray[j].split(\"_\")[3];\n String tempSecond = returnArray[j+1].split(\"_\")[2] + returnArray[j+1].split(\"_\")[3];\n //take out csv if it is not a subgraph\n if (!tempFirst.contains(\"_subgraph_\")){\n tempFirst = tempFirst.substring(0,14);\n }\n if (!tempSecond.contains(\"_subgraph_\")){\n tempSecond = tempSecond.substring(0,14);\n }\n //get int of string\n long tempFirstNum = Long.parseLong(tempFirst);\n long tempSecondNum = Long.parseLong(tempSecond);\n //compare and swap if bigger\n if (tempFirstNum >= tempSecondNum)\n {\n String temp = returnArray[j];\n returnArray[j] = returnArray[j+1];\n returnArray[j+1] = temp;\n }\n }\n }\n\n //add elements to arraylist with newest date being first\n for(int k = returnArray.length-1; k >= 0; k--){\n returnArrayList.add(returnArray[k]);\n System.out.println(allFiles[k]);\n }\n\n return returnArrayList;\n }", "private void sortTravelContactsByCitizenship() {\n Collections.sort(this.contacts, new Comparator<User>(){\n public int compare(User obj1, User obj2) {\n // ## Ascending order\n return obj1.getSortingStringName().compareToIgnoreCase(obj2.getSortingStringName());\n }\n });\n }", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "private ArrayList<Object> sortState(ArrayList<EcgInfo> array_ecgInfo, ArrayList<ActivityPoint> array_activityInfo,EcgInfo sleepDayInfo){\n\t\tArrayList<Object> sortedState=new ArrayList<Object>();\n\n\t\t//emily++++ insert sleepDayInfo into array_ecgInfo\n\t\tArrayList<EcgInfo> sortedEcgSleep=new ArrayList<EcgInfo>();\n\t\tif(sleepDayInfo.hasData){\n\t\t\twhile (array_ecgInfo.size()!=0 && sleepDayInfo.hasData){\n\t\t\t\tif(sleepDayInfo.measureTime > array_ecgInfo.get(0).measureTime){\n\t\t\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t\t\t\tsleepDayInfo.hasData=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsortedEcgSleep.add(array_ecgInfo.get(0));\n\t\t\t\t\tarray_ecgInfo.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(array_ecgInfo.size()!=0){\n\t\t\tsortedEcgSleep.addAll(array_ecgInfo);\n\t\t}\n\t\tif(sleepDayInfo.hasData){\n\t\t\tsortedEcgSleep.add(sleepDayInfo);\n\t\t}\n\t\t//emily----\n\n\t\twhile(sortedEcgSleep.size()!=0&&array_activityInfo.size()!=0){\n\t\t\tif(sortedEcgSleep.get(0).measureTime<array_activityInfo.get(0).time){\n\t\t\t\tsortedState.add(sortedEcgSleep.get(0));\n\t\t\t\tsortedEcgSleep.remove(0);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsortedState.add(array_activityInfo.get(0));\n\t\t\t\tarray_activityInfo.remove(0);\n\t\t\t}\n\t\t}\n\t\tif(sortedEcgSleep.size()!=0){\n\t\t\tsortedState.addAll(sortedEcgSleep);\n\t\t}\n\t\telse{\n\t\t\tsortedState.addAll(array_activityInfo);\n\t\t}\n\t\treturn sortedState;\n\t}", "private void sortTravelContactsByName() {\n Collections.sort(this.contacts, new Comparator<User>(){\n public int compare(User obj1, User obj2) {\n // ## Ascending order\n return obj1.getSortingStringName().compareToIgnoreCase(obj2.getSortingStringName());\n }\n });\n }", "public void sortieBloc() {\n this.tableLocaleCourante = this.tableLocaleCourante.getTableLocalPere();\n }", "private void sortOutlines() {\r\n Collections.sort(outlines, reversSizeComparator);\r\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \n }", "public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}", "private List<Content> sortContentMapByContentTypeAndPrice(Map<Integer, List<Content>> unOrderderdContentMap) {\n\n\t\tList<Content> contentsLongList = new LinkedList<>();\n\n\t\tfor (Map.Entry<Integer, List<Content>> entry : unOrderderdContentMap.entrySet())\n\t\t\tfor (Content content : entry.getValue())\n\t\t\t\tcontentsLongList.add(content);\n\n\t\tCollections.sort(contentsLongList, (c1, c2) -> {\n\t\t\tDouble c1Price = c1.getPrice();\n\t\t\tDouble c2Price = c2.getPrice();\n\t\t\tContentType c1Type = c1.getType();\n\t\t\tContentType c2Type = c2.getType();\n\n\t\t\treturn c1Type.compareTo(c2Type) != 0 ? c1Type.compareTo(c2Type) : (int) (c1Price - c2Price);\n\t\t});\n\n\t\treturn contentsLongList;\n\t}", "public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}", "double getSortTime();", "public void sortBasedYearService();", "public String sort() {\n this.foodEntries = FoodListManager.sortListByDate(foodEntries);\n return this.toString();\n }", "public void listSort() {\n\t\tCollections.sort(cd);\n\t}", "public void sortChildsZ(){\n\t\tif(childList != null && childList.size() > 0){\n\t\t\tCollections.sort(childList);\n\t\t\tfor(Ent e: childList){\n\t\t\t\te.sortChildsZ();\n\t\t\t}\n\t\t}\n\t}", "public void sortChart() {\n\t\tPassengerTrain temp;\n\t\tGoodsTrain temp1;\n\n\t\tfor (int index = 0; index < TrainDetails.passengerList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.passengerList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.passengerList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.passengerList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp = TrainDetails.passengerList.get(index);\n\t\t\t\t\tTrainDetails.passengerList.set(index,\n\t\t\t\t\t\t\tTrainDetails.passengerList.get(i));\n\t\t\t\t\tTrainDetails.passengerList.set(i, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int index = 0; index < TrainDetails.goodsList.size(); index++) {\n\t\t\tfor (int i = 0; i < TrainDetails.goodsList.size(); i++) {\n\t\t\t\tdouble totalTime1 = ((TrainDetails.goodsList).get(index).duration);\n\t\t\t\tdouble totalTime2 = (TrainDetails.goodsList.get(i).duration);\n\t\t\t\tif (totalTime1 < totalTime2) {\n\t\t\t\t\ttemp1 = TrainDetails.goodsList.get(index);\n\t\t\t\t\tTrainDetails.goodsList.set(index,\n\t\t\t\t\t\t\tTrainDetails.goodsList.get(i));\n\t\t\t\t\tTrainDetails.goodsList.set(i, temp1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static ArrayList<PersonDate> sort(ArrayList<PersonDate> arr)\n { \n for (int i = 0; i < arr.size() - 1; i++)\n {\n int index = i;\n for (int j = i + 1; j < arr.size(); j++)\n if (arr.get(j).compareTo(arr.get(index))>0) \n index = j;\n \n PersonDate smallerNumber = arr.get(index); \n arr.set(index,arr.get(i));\n arr.set(i,smallerNumber);\n }\n return arr;\n }", "public List<Entry<String, Double>> sort()\n\t{\n\t\tList<Entry<String, Double>> list = new ArrayList<Entry<String, Double>>();\n\t\tfor(Entry<String, Double> entry : map.entrySet())\n\t\t{\n\t\t\tlist.add(entry);\n\t\t}\n\n\t\tComparator<Entry<String, Double>> compare = new Comparator<Entry<String, Double>>() {\n\t @Override\n\t public int compare(Entry<String, Double> first, Entry<String, Double> second)\n\t {\n\t \tif (first.getValue() > second.getValue())\n\t \t{\n\t return -1;\n\t }\n\t if (first.getValue() < second.getValue())\n\t {\n\t return 1;\n\t }\n\t return 0;\n\t }\n\t };\n\n\t Collections.sort(list, compare);\n return list;\n\t}", "public List<AvailabilityMedecinResponseDto> listAllMedecinAvailability(MedecinAvailabilityRequestDto medecinAvailability){\n\n var medecin = this.medecinRepository.findById(medecinAvailability.getMedecinId());\n var date = LocalDate.parse(medecinAvailability.getDate(), DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n if(!medecin.isPresent()){\n return null;\n }\n var medecinAvailabilities = this.appointementRepository.findAllByMedecinAndDate(medecin.get(), date);\n\n var medecinAvailabilityList =\n medecinAvailabilities.stream().sorted((a1, a2) -> {\n System.out.printf(\"sort: %s; %s\\n\", a1, a2);\n return a1.getShiftHoraire().getId().compareTo(a2.getShiftHoraire().getId());\n })\n .map(a -> this.appointementMapper.toAvailabilityMedecinDto(a))\n .collect(Collectors.toList());\n\n return this.tweakResponse.listAllAvailiblityByStatus(medecinAvailabilityList);\n }", "public void sort() {\r\n\t\tCollections.sort(parts);\r\n\t}", "public void sortEventsByValue() {\n for (OrgEvent event : events) {\n event.setCompareByTime(false);\n }\n Collections.sort(events);\n }", "private static Map<Long, Long> sortByComparatorGift(Map<Long, Long> unsortMap) {\n\t\tList<Map.Entry<Long, Long>> list = \n\t\t\tnew LinkedList<Map.Entry<Long, Long>>(unsortMap.entrySet());\n \n\t\t// Sort list with comparator, to compare the Map values\n\t\tComparator<Map.Entry<Long, Long>> comparator;\n\t\tcomparator = Collections.reverseOrder(new Comparator<Map.Entry<Long, Long>>() {\n\t\t\tpublic int compare(Map.Entry<Long, Long> o1,\n Map.Entry<Long, Long> o2) {\n\t\t\t\treturn (o1.getValue()).compareTo(o2.getValue());\n\t\t\t}\n\t\t});\n\t\tCollections.sort(list, comparator);\n \n\t\t// Convert sorted map back to a Map\n\t\tMap<Long, Long> sortedMap = new LinkedHashMap<Long, Long>();\n\t\tfor (Iterator<Map.Entry<Long, Long>> it = list.iterator(); it.hasNext();) {\n\t\t\tMap.Entry<Long, Long> entry = it.next();\n\t\t\tsortedMap.put(entry.getKey(), entry.getValue());\n\t\t}\n\t\treturn sortedMap;\n\t}", "void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "private static void sortingMemo() {\n\t\t\n\t}", "private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }", "private void btnSortArrivalDateActionPerformed(java.awt.event.ActionEvent evt) {\n Arbol miArbol = new Arbol();\n root = null;\n txaMostrar.setText(\"\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date llegada = null;\n \n for (int i = 0; i < princ.getsArreglo().length; i++) {\n System.out.println(\"i = \" + i);\n if (princ.getsArreglo()[i][6] != null) {\n try {\n llegada = sdf.parse(princ.getsArreglo()[i][6] + \"03-00-00\");\n } catch (ParseException ex) {\n Logger.getLogger(FrmDetalles.class.getName()).log(Level.SEVERE, null, ex);\n }\n agregarNodo(new NodoArbol(llegada));\n }\n }\n imprimeInOrder();\n \n \n }", "public void sortHub(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}", "private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }", "private static void sortByVerified( ArrayList<Volunteer> list)\n {\n // Find the string reference that should go in each cell of\n // the array, from cell 0 to the end\n for ( int j = 0; j < list.size();j++ )\n {\n // Find min: the index of the string reference that should go into cell j.\n // Look through the unsorted strings (those at j or higher) for the one that is first in lexicographic order\n int min = j;\n for ( int k=j+1; k < list.size(); k++ ) {\n if (list.get(k).compareTo(list.get(min)) > 0) {\n min = k;\n }\n\n }\n\n // Swap the reference at j with the reference at min\n Collections.swap(list, j, min);\n }\n }", "public void jsort() {\n\tArrays.sort(data);\n }", "public static ArrayList<Entry<String, Double>> sortValue(HashMap<String, Double> t_e_f2){\n\t ArrayList<Map.Entry<String, Double>> l = new ArrayList(t_e_f2.entrySet());\n\t Collections.sort(l, new Comparator<Map.Entry<String, Double>>(){\n\n\t public int compare(Map.Entry<String, Double> o1, Map.Entry<String, Double> o2) {\n\t return o1.getValue().compareTo(o2.getValue());\n\t }});\n\t Collections.reverse(l);\n//\t System.out.println(l);\n\t\t return l;\n\t}", "public void sortMatches();", "public void sort() {\n\t\tArrays.sort(contactList, 0, contactCounter);\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tprotected void publishResults(CharSequence constraint,\n\t\t\t\tFilterResults results) {\n\t\t\tfilteredList = (ArrayList<RowItem>) results.values;\n\t\t\tCollections.sort(filteredList, convertStringToDateAndCompare);\n\t\t\tnotifyDataSetChanged();\n\t\t}", "@Override\n public int compare(Date date1, Date date2) {\n if (date1.getDay() < date2.getDay() || date1.getMonth() < date2.getMonth() || date1.getYear() < date2.getYear())\n return -1;\n\n else if (date1.getDay() > date2.getDay() || date1.getMonth() > date2.getMonth() || date1.getYear() > date2.getYear())\n return 1;\n\n return 0;\n\n //Finally sort wins according to the -1, 0, 1 ascending order\n }", "public void sortCompetitors(){\n\t\t}", "public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }", "private void sortEScores() {\n LinkedHashMap<String, Double> sorted = eScores\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n eScores = sorted;\n }", "public void sort() {\n }", "private boolean sort(long codeSystemVersionId){\n org.hibernate.Session hb_session = HibernateUtil.getSessionFactory().openSession();\n hb_session.getTransaction().begin();\n boolean s = false;\n try\n {\n String hql = \"select distinct csev from CodeSystemEntityVersion csev\";\n hql += \" join fetch csev.codeSystemMetadataValues csmv\";\n hql += \" join fetch csmv.metadataParameter mp\";\n hql += \" join fetch csev.codeSystemEntity cse\";\n hql += \" join fetch cse.codeSystemVersionEntityMemberships csvem\";\n hql += \" join fetch csvem.codeSystemVersion csv\";\n \n \n HQLParameterHelper parameterHelper = new HQLParameterHelper();\n parameterHelper.addParameter(\"csv.\", \"versionId\", codeSystemVersionId);\n\n // Parameter hinzufügen (immer mit AND verbunden)\n hql += parameterHelper.getWhere(\"\");\n logger.debug(\"HQL: \" + hql);\n\n // Query erstellen\n org.hibernate.Query q = hb_session.createQuery(hql);\n\n // Die Parameter können erst hier gesetzt werden (übernimmt Helper)\n parameterHelper.applyParameter(q);\n \n List<CodeSystemEntityVersion> csevList = q.list();\n \n HashMap<Integer,CodeSystemEntityVersion> workList = new HashMap<Integer, CodeSystemEntityVersion>();\n ArrayList<Integer> sortList = new ArrayList<Integer>();\n \n Iterator<CodeSystemEntityVersion> iter = csevList.iterator();\n while(iter.hasNext()){\n boolean found = false;\n CodeSystemEntityVersion csev = (CodeSystemEntityVersion)iter.next();\n \n //Get the Level\n int level = 0;\n Iterator<CodeSystemMetadataValue> iter1 = csev.getCodeSystemMetadataValues().iterator();\n while(iter1.hasNext()){\n CodeSystemMetadataValue csmv = (CodeSystemMetadataValue)iter1.next();\n if(csmv.getMetadataParameter().getParamName().equals(\"Level\")){\n\n String cleaned = csmv.getParameterValue();\n \n if(cleaned.contains(\" \"))\n cleaned = cleaned.replace(\" \", \"\");\n\n level = Integer.valueOf(cleaned);\n }\n }\n \n if(level == lowestLevel){\n \n CodeSystemVersionEntityMembershipId csvemId = null;\n Set<CodeSystemVersionEntityMembership> csvemSet = csev.getCodeSystemEntity().getCodeSystemVersionEntityMemberships();\n Iterator<CodeSystemVersionEntityMembership> it = csvemSet.iterator();\n while(it.hasNext()){\n \n CodeSystemVersionEntityMembership member = (CodeSystemVersionEntityMembership)it.next();\n if(member.getCodeSystemEntity().getId().equals(csev.getCodeSystemEntity().getId())\n && member.getCodeSystemVersion().getVersionId().equals(codeSystemVersionId)){\n \n csvemId = member.getId();\n }\n }\n \n CodeSystemVersionEntityMembership c = (CodeSystemVersionEntityMembership)hb_session.get(CodeSystemVersionEntityMembership.class, csvemId);\n c.setIsMainClass(Boolean.TRUE);\n hb_session.update(c);\n \n workList.put(level, csev);\n sortList.add(level);\n }else{\n \n int size = sortList.size();\n int count = 0;\n while(!found){\n \n if((sortList.get(size-(1+count))-level) == -1){\n \n //Setting MemberShip isMainClass false\n CodeSystemVersionEntityMembershipId csvemId = null;\n Set<CodeSystemVersionEntityMembership> csvemSet = csev.getCodeSystemEntity().getCodeSystemVersionEntityMemberships();\n Iterator<CodeSystemVersionEntityMembership> it = csvemSet.iterator();\n while(it.hasNext()){\n\n CodeSystemVersionEntityMembership member = (CodeSystemVersionEntityMembership)it.next();\n if(member.getCodeSystemEntity().getId().equals(csev.getCodeSystemEntity().getId())\n && member.getCodeSystemVersion().getVersionId().equals(codeSystemVersionId)){\n\n csvemId = member.getId();\n }\n }\n\n CodeSystemVersionEntityMembership c = (CodeSystemVersionEntityMembership)hb_session.get(CodeSystemVersionEntityMembership.class, csvemId);\n c.setIsMainClass(Boolean.FALSE);\n hb_session.update(c);\n \n found = true;\n sortList.add(level);\n workList.put(level, csev);\n CodeSystemEntityVersion csevPrev = workList.get(sortList.get(size-(1+count)));\n \n CodeSystemEntityVersionAssociation association = new CodeSystemEntityVersionAssociation(); \n association.setCodeSystemEntityVersionByCodeSystemEntityVersionId1(new CodeSystemEntityVersion());\n association.getCodeSystemEntityVersionByCodeSystemEntityVersionId1().setVersionId(csevPrev.getVersionId());\n association.setCodeSystemEntityVersionByCodeSystemEntityVersionId2(new CodeSystemEntityVersion());\n association.getCodeSystemEntityVersionByCodeSystemEntityVersionId2().setVersionId(csev.getVersionId());\n association.setAssociationKind(2); // 1 = ontologisch, 2 = taxonomisch, 3 = cross mapping \n association.setLeftId(csevPrev.getVersionId()); // immer linkes Element also csev1\n association.setAssociationType(new AssociationType()); // Assoziationen sind ja auch CSEs und hier muss die CSEVid der Assoziation angegben werden.\n association.getAssociationType().setCodeSystemEntityVersionId(4L);\n // Weitere Attribute setzen\n association.setStatus(Definitions.STATUS_CODES.ACTIVE.getCode());\n association.setStatusDate(new Date());\n association.setInsertTimestamp(new Date());\n // Beziehung abspeichern\n hb_session.save(association);\n \n CodeSystemEntityVersion csevLoc = (CodeSystemEntityVersion)hb_session.get(CodeSystemEntityVersion.class, csevPrev.getVersionId());\n if(csevLoc.getIsLeaf() != Boolean.FALSE){\n csevLoc.setIsLeaf(Boolean.FALSE);\n hb_session.update(csevLoc);\n }\n\n }else{\n count++; \n found=false;\n }\n } \n }\n }\n \n hb_session.getTransaction().commit();\n s = true;\n }\n catch (Exception e)\n {\n hb_session.getTransaction().rollback();\n s = false;\n logger.error(\"[\" + this.getClass().getCanonicalName() + \"] Fehler bei initList(): \" + e.getMessage());\n }\n finally\n {\n hb_session.close();\n }\n return s;\n }", "private void sortParents() {\n String[] MonthsArray = getResources().getStringArray(R.array.months);//gets an array that contains all the months\n Calendar cal = Calendar.getInstance();\n int monthPosition = cal.get(Calendar.MONTH);//gets the current month as an integer to be used as a position (ie. November would be 10)\n int i = monthPosition;//will be used to iterate, starting at the current month\n\n //After i reaches 11 (December) it's next loop will cause it to reset to 0 (January) and fill in the months before the current one\n do {\n if (i <= 11)\n ParentList.add(MonthsArray[i++]);\n else\n i = 0;\n } while (i != monthPosition); // will stop once it reaches the current month\n }", "private void sort() {\n setFiles(getFileStreamFromView());\n }", "private static int compareAddresses(Address addr1, Address addr2) {\n Date end1 = null;\n if (addr1.hasPeriod() && addr1.getPeriod().hasEnd()) {\n end1 = addr1.getPeriod().getEnd(); \n }\n\n Date end2 = null;\n if (addr2.hasPeriod() && addr2.getPeriod().hasEnd()) {\n end2 = addr2.getPeriod().getEnd();\n }\n \n if (end1 == null && end2 == null) {\n //if neither has an end, then let the below sorting by start date apply\n \n } else if (end1 != null && end2 == null) {\n //if 1 is ended but 2 is not, then 1 goes before 2 (null end counts as later)\n return -1;\n \n } else if (end1 == null && end2 != null) {\n //if 1 is not ended but 2 is, then 2 goes before 1\n return 1;\n \n } else {\n //if both are ended, then sort by end date\n int comp = end1.compareTo(end2);\n if (comp != 0) {\n return comp;\n } else {\n //if the end dates are the same, then drop into the below sorting by start date\n }\n }\n \n Date start1 = null;\n if (addr1.hasPeriod() && addr1.getPeriod().hasStart()) {\n start1 = addr1.getPeriod().getStart();\n }\n\n Date start2 = null;\n if (addr2.hasPeriod() && addr2.getPeriod().hasStart()) {\n start2 = addr2.getPeriod().getStart();\n }\n\n if (start1 == null && start2 == null) {\n //if neither has a start date, then we can't sort any more\n return 0;\n\n } else if (start1 != null && start2 == null) {\n //if 1 has a date and 2 doesn't, then place 2 first (null start counts as earlier)\n return 1;\n\n } else if (start1 == null && start2 != null) {\n //if 1 doesn't have a start, but 2 does, then place 1 first\n return -1;\n\n } else {\n //if both have starts, then it's a straight date comparison\n return start1.compareTo(start2);\n }\n }", "@Override\n public int compare(Chapter t, Chapter t1) {\n //return Long.valueOf(t.getDate()).compareTo(t1.getDate());\n return Integer.valueOf(t1.getNumber()).compareTo(t.getNumber());\n }", "public DateSortingUsingAlgorithm() throws IOException {\n\t\t//initialize the classes local variables\n\t\tmap = new HashMap<LocalDate, Integer>();\n\t\tString[] mapData = new String[3];\n\t\t\n\t\t//using a BufferedReader to read in data from the SortingDates.txt file\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"SortingDates.txt\"));\n\t\t\n\t\t//begin reading in the data from the file\n\t\tString dataLine = br.readLine().trim();\n\t\t\n\t\t//the format of the SortingDates.txt dates\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n\t\tInteger value = 0;\n\t\t/*\n\t\t * this while loop continues to read from the file while there is still data to read in. it \n\t\t * takes the data as a String and parses it into a LocalDate date using the formatter above. Lastly,\n\t\t * it adds the LocalDate to the HashMap to be sorted later\n\t\t */\n\t\twhile (dataLine != null) {\n\t\t\tString result = \"\";\n\t\t\tmapData = dataLine.trim().split(\"-\");\n\t\t\t\n\t\t\t//using a for loop to trim any whitespace in the yyyy-dd-MM format\n\t\t\tfor (int index = 0; index < mapData.length; ++index) {\n\t\t\t\tmapData[index] = mapData[index].trim(); //trimming any white spaces in the yyyyddMM format\n\t\t\t\tif (index == 2) {\n\t\t\t\t\tresult += mapData[index];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult += mapData[index] + \"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tLocalDate mapDataLDT = LocalDate.parse(result, format);\n\t\t\tmap.put(mapDataLDT, value++);\n\t\t\tdataLine = br.readLine();\n\t\t}\n\t\tbr.close();\n\t}", "static void doSort(int location) throws Exception {\n\n\t\tList<String> sortedList = null;\n\n\t\tsortedList = readDataFile(DividedfileList.get(location));\n\t\tCollections.sort(sortedList);\n\t\twriteFile(sortedList, location);\n\t\tsortedList.clear();\n\n\t}", "private void sortArticleByViews() {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"Views\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Map<Integer,ArrayList<Article>> articlesTreeMap;\n articlesTreeMap = new TreeMap<>(Collections.reverseOrder());\n for(Article a : articles) {\n DataSnapshot viewArticleSnapShot = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if (a.getLink() != null && a.getLink() != \"\" && snapshot.child(\"Link\").getValue().equals(a.getLink())) {\n viewArticleSnapShot = snapshot;\n break;\n }\n }\n int views = 0;\n if (viewArticleSnapShot != null) {\n views = Integer.parseInt(viewArticleSnapShot.child(\"Count\").getValue().toString());\n }\n if(!articlesTreeMap.containsKey(views)) {\n articlesTreeMap.put(views, new ArrayList<Article>());\n }\n articlesTreeMap.get(views).add(a);\n }\n\n articles.clear();\n for(Map.Entry<Integer,ArrayList<Article>> entry : articlesTreeMap.entrySet()) {\n ArrayList<Article> list = entry.getValue();\n articles.addAll(list);\n }\n mSectionsPagerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }", "protected void sortCode() {\n for (int i = 1; i < codeCount; i++) {\n int who = i;\n for (int j = i + 1; j < codeCount; j++) {\n if (code[j].getFileName().compareTo(code[who].getFileName()) < 0) {\n who = j; // this guy is earlier in the alphabet\n }\n }\n if (who != i) { // swap with someone if changes made\n SketchCode temp = code[who];\n code[who] = code[i];\n code[i] = temp;\n }\n }\n }", "public long getSortTime(){ \n return endTime - startTime;\n }", "public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n while (j > 0) {\n\n // if the current element, is less than the previous, then....\n if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) < 0) {\n\n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n else if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) == 0) {\n \n if (compareTimes(finalsList.get(j).getBeginTime(), finalsList.get(j - 1).getBeginTime()) < 0) {\n \n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n }\n\n // decrement j\n j--;\n }\n }\n }", "public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }", "protected void sort(@NotNull ArrayList<Event<?>> events) {\n\t\tevents.sort(new Comparator<Event<?>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Event<?> e1, Event<?> e2) {\n\t\t\t\tif (e1.getEnd() < e2.getStart())\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\tsnap(this.events);\n\t}", "public static void sort(Map<String, Long> map){\n\t\t\n\t\t Set<Entry<String, Long>> entrySet = map.entrySet();\n\t\t ArrayList<Entry<String, Long>> arrayList = new ArrayList<>(entrySet);\n\t\t// Collections.sort(arrayList, Comparator.comparing(null).reversed().t\n\t\t \n\t\t \n\t\t\n\t\tSystem.out.println(arrayList);\n\t}", "public int compareTo(Paper otherPaper)\n \t{\n \t\tint offset = 0;\n \t\t\n \t\tswitch (sortCriteria)\n \t\t{\n \t\tcase \"BI\":\n \t\t\tsortCriteria = \"AN\";\n \t\t\tcompareTo(otherPaper);\n \t\t\tbreak;\n \t\tcase \"AN\":\n \t\t\toffset = compare(otherPaper, 1);\n \t\t\tbreak;\n \t\tcase \"PT\":\n \t\t\toffset = compare(otherPaper, 2);\n \t\t\tbreak;\n \t\tcase \"ST\":\n \t\t\toffset = compare(otherPaper, 3);\n \t\t\tbreak;\n \t\tcase \"CH\":\n \t\t\tString thisDate = this.toString().split(\" // \")[5];\n \t\t\tString otherDate = otherPaper.toString().split(\" // \")[5];\n \t\t\t//This ugly (but code-lines efficient) replace line turns the date in \"MMM YYYY\" format to \"YYYYMM\". Ex. \"May 2011 Becomes 201105. This becomes sortable by year then month.\n \t\t\tthisDate = thisDate.split(\" \")[1] + \" \" + thisDate.split(\" \")[0].replace(\"January\", \"01\").replace(\"February\", \"02\").replace(\"March\", \"03\").replace(\"April\", \"04\").replace(\"May\", \"05\").replace(\"June\",\"06\").replace(\"July\", \"07\").replace(\"August\", \"08\").replace(\"September\", \"09\").replace(\"October\", \"10\").replace(\"November\", \"11\").replace(\"December\", \"12\");\n \t\t\totherDate = otherDate.split(\" \")[1] + \" \" + otherDate.split(\" \")[0].replace(\"January\", \"01\").replace(\"February\", \"02\").replace(\"March\", \"03\").replace(\"April\", \"04\").replace(\"May\", \"05\").replace(\"June\",\"06\").replace(\"July\", \"07\").replace(\"August\", \"08\").replace(\"September\", \"09\").replace(\"October\", \"10\").replace(\"November\", \"11\").replace(\"December\", \"12\");\n \t\t\toffset = thisDate.compareToIgnoreCase(otherDate);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tSystem.out.println(\"Please specify a searchable criteria.\");\n \t\t\tbreak;\n \t\t}\n \t\treturn offset;\n \t}" ]
[ "0.6691224", "0.6630784", "0.66227955", "0.66059977", "0.6596296", "0.65893143", "0.6554003", "0.6434165", "0.6202342", "0.6201763", "0.6182071", "0.6168744", "0.6159904", "0.61578053", "0.6120382", "0.60800344", "0.60773444", "0.59648716", "0.5932675", "0.5904547", "0.58660257", "0.5818553", "0.5813305", "0.58130056", "0.57736903", "0.57545483", "0.5750012", "0.5665522", "0.56605405", "0.56517094", "0.56512946", "0.56213677", "0.5611805", "0.56045973", "0.55833197", "0.5582874", "0.55744356", "0.5571352", "0.5570959", "0.5559995", "0.5547985", "0.554646", "0.5532755", "0.5532081", "0.5505926", "0.54744965", "0.5451104", "0.5413946", "0.5410751", "0.54090065", "0.5402586", "0.540242", "0.5389244", "0.53754914", "0.53689736", "0.53673744", "0.53586423", "0.535555", "0.5354444", "0.53530324", "0.5339947", "0.532099", "0.5320355", "0.5310755", "0.53079045", "0.5305393", "0.53016603", "0.529228", "0.52780753", "0.52748686", "0.5267332", "0.5265195", "0.52625394", "0.5255244", "0.5252957", "0.52445394", "0.5244258", "0.5241536", "0.5240191", "0.52312094", "0.5229972", "0.52241784", "0.52234477", "0.52140504", "0.52113587", "0.5210591", "0.5204788", "0.5203725", "0.5202914", "0.5198918", "0.5191219", "0.5164097", "0.5161988", "0.51576614", "0.5155469", "0.5150518", "0.5149727", "0.5147863", "0.5140727", "0.5140227" ]
0.8073883
0
Testing function to draw circles on maps to show the geofences we are currently monitoring. Helps to ensure that we are getting geofences from server
public void drawGeofences(GeofenceObjectContent[] geofences) { MainActivity mainActivity = (MainActivity) getActivity(); mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences; if(debugMode) { if(geofences != null) { mMap.clear(); for (int i = 0; i < geofences.length; i++) { carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence = geofences[i].getGeofence(); CircleOptions circleOptions = new CircleOptions(); GeofenceObjectLocation location = geofence.getLocation(); double lat = location.getLat(); double lon = location.getLng(); circleOptions.center(new LatLng(lat, lon)); circleOptions.radius(geofence.getRadius()); circleOptions.strokeColor(R.color.colorPrimary); circleOptions.strokeWidth(5); mMap.addCircle(circleOptions); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "public void drawCircle() {\n mMap.clear();\n // Generate the points\n mMap.addPolygon(new PolygonOptions().addAll(points).strokeWidth(5).strokeColor(Color.RED).fillColor(Color.TRANSPARENT));\n // Create and return the polygon\n for (int i=0;i<points.size();i++){\n Log.v(\"DrawCircle\",\"drwaakmdaskfmlsmn\"+points.get(i));\n }\n\n\n\n }", "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 }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng clickedPoint) {\n\n CircleOptions circleOptions = new CircleOptions()\n .center(clickedPoint)\n .zIndex(20)\n .radius(1)\n .fillColor(Color.CYAN)\n .strokeColor(Color.TRANSPARENT);\n\n switch (mCrowdStates)\n {\n case NO_POINTS_SELECTED:\n c1 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.ONE_POINT_SELECTED;\n buttonDelete.setEnabled(true);\n break;\n case ONE_POINT_SELECTED:\n c2 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.TWO_POINTS_SELECTED;\n\n PolygonOptions polygonOptions = new PolygonOptions()\n .add(\n c1.getCenter() //NW C1.latlng\n , new LatLng(c1.getCenter().latitude, c2.getCenter().longitude) //NE C1.lat C2.lon\n , c2.getCenter() //SE C2.latlon\n , new LatLng(c2.getCenter().latitude, c1.getCenter().longitude)) //SW C2.lat C1.lon\n .fillColor(Color.TRANSPARENT)\n .strokeColor(Color.RED);\n\n crowdPolygone = mMap.addPolygon(polygonOptions);\n textViewInfo.setText(\"Crowd Defined!\\n Save or Delete the Crowd\");\n buttonSave.setEnabled(true);\n buttonDrawPixels.setEnabled(true);\n break;\n case TWO_POINTS_SELECTED:\n\n break;\n }\n }\n });\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "@Test(priority = 9)\n\tpublic void clickGeofence() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.geofence(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 9, 1);\n\t\t\n\t}", "private void loadCrimes(LatLng Loc){\n //create a new instance of parser class. Parser class queries Data.octo.dc.gov for crime data\n mParser = new Parser();\n\n //try and parse data\n try {\n mParser.parse(getResources().getAssets().open(DATA, 0));\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //get the data from the parser and stores in TreeSet\n mCrimesList= mParser.nearestCrimes(Loc.latitude, Loc.longitude, mRadius);\n\n //Loop through and plot crimes\n List<Address> address;\n int i = 1;\n\n //iterate through crimes and querey google to get latitude and longitude of particular addresses\n for(Crime c: mCrimesList){\n try {\n address = mGeocoder.getFromLocationName(c.address ,1,\n mBounds[0], mBounds[1],mBounds[2], mBounds[3]);\n if(address == null || address.size() == 0){\n Log.i(TAG, \"***Crime:\" + c.offense + \" @ \" + c.address + \" NOT PLOTTED\");\n /*Crimes with addresses that can't be found are added to bad crimes list\n to be removed */\n mBadCrimesList.add(c);\n Log.i(TAG, mBadCrimesList.toString());\n if(i<=MAX_CRIMES) {\n continue;\n }else{\n removeBadCrimes();\n return;\n }\n }\n LatLng coor = new LatLng(address.get(0).getLatitude(), address.get(0).getLongitude());\n\n //Create pin\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n\n //this put geofence around crime points. Team decided to comment out to remove clutter\n /*Circle crime_circle = mMap.addCircle(new CircleOptions()\n .center(new LatLng(coor.latitude, coor.longitude))\n .radius(CIRCLE_SIZE)\n .strokeColor(Color.RED)\n .fillColor(RED_COLOR));\n c.circle = crime_circle;*/\n\n\n //crime object gets reference to its own pin\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"null marker\");\n }\n if(c.circle == null){\n Log.i(TAG, \"null circle\");\n }\n c.Lat = coor.latitude;\n c.Long = coor.longitude;\n\n //start out crime by being invisible\n c.setVisable(false);\n Log.i(TAG, \"Crime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }catch(IOException e){\n //catch any issue that google throws\n Log.i(TAG, \"I/O EXCEPTION while plotting crime\");\n mBadCrimesList.add(c);\n continue;\n }\n i++;\n if(i > MAX_CRIMES ){\n removeBadCrimes();\n return;\n }\n }\n\n }", "private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }", "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 addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\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}", "@Override\n public void onMapClick( LatLng latLng ) {\n googleMap.clear();\n Log.d( \"LAT/LONG\", latLng.toString() );\n googleMap.addCircle( new CircleOptions()\n .center( latLng )\n .radius( 10000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) ) );\n\n googleMap.addMarker( new MarkerOptions().position( latLng )\n .icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory.HUE_VIOLET ) ) );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( latLng, 10.0f ) );\n cLocate = latLng;\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "public void paintCircle(Point2D pt1, Point2D pt2, Graphics graphics) {\n // do all this only if want to display the rubberband circle\n if (displayCircle) {\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 // first convert degrees to radians\n float radphi1 = (float) ProjMath.degToRad(pt1.getY());\n float radlambda0 = (float) ProjMath.degToRad(pt1.getX());\n float radphi = (float) ProjMath.degToRad(pt2.getY());\n float radlambda = (float) ProjMath.degToRad(pt2.getX());\n // calculate the circle radius\n double dRad = GreatCircle.sphericalDistance(radphi1,\n radlambda0,\n radphi,\n radlambda);\n // convert into decimal degrees\n float rad = (float) ProjMath.radToDeg(dRad);\n // make the circle\n OMCircle circle = new OMCircle((float) pt1.getY(), (float) pt1.getX(), rad);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the circle for rendering\n circle.generate(proj);\n // render the circle graphic\n circle.render(g);\n }\n } // end if(displayCircle)\n }", "@Test\r\n\tpublic void testLocationCircleQuery() {\r\n\t\tlog.debug(\"<<<<<<<<<<<<<<<<< testLocationCircleQuery >>>>>>>>>>>>>>>>>>>>\");\r\n\r\n\t\t/*\r\n\t\t * List<Location> locations = locationService.findByCityAndState(\r\n\t\t * \"Wheeling\", \"WV\");\r\n\t\t */\r\n\r\n\t\tList<Location> locations = locationService\r\n\t\t\t\t.findByCityAndStateAndZipCode(\"Wheeling\", \"WV\", \"26003\");\r\n\r\n\t\tlog.debug(\"List Size: \" + locations.size());\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\t// Used to troubleshoot Location Repo\r\n\t\t/*\r\n\t\t * DBObject query = new BasicDBObject(); query.put(\"city\", \"Wheeling\");\r\n\t\t * query.put(\"state\", \"WV\");\r\n\t\t * \r\n\t\t * DBObject fields = new BasicDBObject(); fields.put(\"_id\", 0);\r\n\t\t * fields.put(\"city\", 1); fields.put(\"state\", 2);\r\n\t\t * \r\n\t\t * DBCollection collection = this.mongoOps.getCollection(\"locations\");\r\n\t\t * DBCursor cursor = collection.find(query, fields);\r\n\t\t * \r\n\t\t * log.info(cursor.size()+\"\");\r\n\t\t * \r\n\t\t * log.info(cursor.toString());\r\n\t\t * \r\n\t\t * while (cursor.hasNext()) { log.info(cursor.next().toString()); }\r\n\t\t */\r\n\r\n\t\tList<Location> locales = this.locationService\r\n\t\t\t\t.findByGeoWithin(new Circle(locations.get(0).getLongitude(),\r\n\t\t\t\t\t\tlocations.get(0).getLatitude(), 1));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Aliquippa\", locales.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Conway\", locales.get(19)\r\n\t\t\t\t.getCity());\r\n\r\n\t}", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(LAT_CENTER,LONG_CENTER) , 14.0f) );\n mMap.setOnMapClickListener(this);\n FloatingActionButton buttonCancel = (FloatingActionButton) findViewById(R.id.resetButton);\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mMap.clear();\n pointsCounter = 0;\n buttonStart.setVisibility(View.GONE);\n }\n }\n\n );\n buttonStart = (FloatingActionButton) findViewById(R.id.startButton);\n buttonStart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestPaths(start, end);\n }\n }\n\n );\n }", "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 }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng balungao = new LatLng(15.902635, 120.701193);\n mMap.addMarker(new MarkerOptions().position(balungao).title(\"Balungao\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(balungao));\n\n mMap.addCircle(new CircleOptions()\n .center(new LatLng(15.902635, 120.701193))\n .radius(100)\n .strokeWidth(10)\n .strokeColor(Color.GREEN)\n .fillColor(Color.argb(128, 0, 0, 255)));\n mMap.addCircle(new CircleOptions()\n .center(new LatLng(15.980597,120.56069))\n .radius(100)\n .strokeWidth(10)\n .strokeColor(Color.GREEN)\n .fillColor(Color.argb(128, 0, 0, 255)));\n mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(15.902635, 120.701193),\n new LatLng(15.90226, 120.701244),\n new LatLng(15.90137, 120.69949),\n new LatLng(15.899913, 120.697461),\n new LatLng(15.898531, 120.694349),\n new LatLng(15.898087, 120.694102),\n new LatLng(15.898077, 120.693024),\n new LatLng(15.897334, 120.697231),\n new LatLng(15.896364, 120.683690),\n new LatLng(15.896735, 120.680429),\n new LatLng(15.897932, 120.673970),\n new LatLng(15.895476, 120.666958),\n new LatLng(15.894434, 120.665596),\n new LatLng(15.893144, 120.660457),\n new LatLng(15.893784, 120.656155),\n new LatLng(15.895530, 120.652107),\n new LatLng(15.895466, 120.650688),\n new LatLng(15.896663, 120.644594),\n new LatLng(15.895714, 120.641826),\n new LatLng(15.895312, 120.640099),\n new LatLng(15.89294, 120.63436),\n new LatLng(15.970590, 120.568950),\n new LatLng(15.970161, 120.585141),\n new LatLng(15.973376, 120.584515),\n new LatLng(15.973578, 120.584728),\n new LatLng(15.974606, 120.584783),\n new LatLng(15.976805, 120.585020),\n new LatLng(15.975866, 120.574357),\n new LatLng(15.975928, 120.570730),\n new LatLng(15.979253, 120.570991),\n new LatLng(15.978930, 120.565683),\n new LatLng(15.98171, 120.560137),\n new LatLng(15.980597,120.56069))\n .width(10)\n .color(Color.BLUE));\n\n\n\n\n }", "public void paintCircle(Point2D pt1, Point2D pt2) {\n if (theMap != null) {\n paintCircle(pt1, pt2, theMap.getGraphics());\n }\n }", "List<GeodeticPoint> getVisibilityCircle(ICoordinate coordinate, int points) throws OrekitException;", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "public void getCircles() {\n\t\tlong startTime = System.nanoTime();\n\t\tif (circleImage != null) {\n\t\t\tcircleFrame.getContentPane().remove(circleImage);\n\t\t}\n//\t\tcircles = ProcessOpenCV.getCircles(cannyMat, cannyImage.getWidth()/5);\n\t\tcircles = ProcessOpenCV.getCircles(zoomImage.getImage(), cannyImage.getWidth()/4);\n\t\tcircleImage = new SignImage(cannyImage.getWidth(), cannyImage.getHeight() );\n\t\tcircleImage.setCircles(circles);\n\t\tcircleFrame.getContentPane().add(circleImage);\n\t\tcircleFrame.setSize(lineImage.getWidth(), lineImage.getHeight());\n//\t\tcircleFrame.setVisible(true);\t\n\t}", "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 }", "public Maps()\n\t{\t\n\t\tsetOnMapReadyHandler( new MapReadyHandler() {\n\t\t\t@Override\n\t\t\tpublic void onMapReady(MapStatus status)\n\t\t\t{\n\t\t\t\tmodelo = new MVCModelo();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmodelo.cargarInfo();\n\t\t\t\t\tArregloDinamico<Coordenadas> aux = modelo.sacarCoordenadasVertices();\n\t\t\t\t\tLatLng[] rta = new LatLng[aux.darTamano()];\n\t\t\t\t\tfor(int i=0; i< aux.darTamano();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCoordenadas actual = aux.darElementoPos(i);\n\t\t\t\t\t\trta[i] = new LatLng(actual.darLatitud(), actual.darLongitud());\n\t\t\t\t\t}\n\t\t\t\t\tlocations = rta;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif ( status == MapStatus.MAP_STATUS_OK )\n\t\t\t\t\t{\n\t\t\t\t\t\tmap = getMap();\n\n\t\t\t\t\t\t// Configuracion de localizaciones intermedias del path (circulos)\n\t\t\t\t\t\tCircleOptions middleLocOpt= new CircleOptions(); \n\t\t\t\t\t\tmiddleLocOpt.setFillColor(\"#00FF00\"); // color de relleno\n\t\t\t\t\t\tmiddleLocOpt.setFillOpacity(0.5);\n\t\t\t\t\t\tmiddleLocOpt.setStrokeWeight(1.0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i=0; i<locations.length;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCircle middleLoc1 = new Circle(map);\n\t\t\t\t\t\t\tmiddleLoc1.setOptions(middleLocOpt);\n\t\t\t\t\t\t\tmiddleLoc1.setCenter(locations[i]); \n\t\t\t\t\t\t\tmiddleLoc1.setRadius(20); //Radio del circulo\n\t\t\t\t\t\t}\n\n\t\t\t \t //Configuracion de la linea del camino\n\t\t\t \t PolylineOptions pathOpt = new PolylineOptions();\n\t\t\t \t pathOpt.setStrokeColor(\"#FFFF00\");\t // color de linea\t\n\t\t\t \t pathOpt.setStrokeOpacity(1.75);\n\t\t\t \t pathOpt.setStrokeWeight(1.5);\n\t\t\t \t pathOpt.setGeodesic(false);\n\t\t\t \t \n\t\t\t \t Polyline path = new Polyline(map); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \t path.setOptions(pathOpt); \n\t\t\t \t path.setPath(locations);\n\t\t\t\t\t\tinitMap( map );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t);\n\n\n\t}", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n try {\n Thread.sleep(1500);\n } catch(InterruptedException e) {\n }\n for(int i = 0; i < crimes.size(); i++) {\n LatLng currentCrime = new LatLng(crimes.get(i).getY(),crimes.get(i).getX());\n mMap.addMarker(new MarkerOptions().position(currentCrime).title(crimes.get(i).getOffense()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentCrime));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentCrime, zoomLevel));\n }\n\n }", "public Circle drawCircle(GoogleMap map, LatLng latLng){\n map.clear();\n return map.addCircle(new CircleOptions()\n .center(latLng)\n .strokeColor(Color.BLUE)\n .strokeWidth(1)\n .radius(0)\n .fillColor(Color.parseColor(\"#500084d3\")));\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "public void startDrawing() {\n try {\n LocationRequest locationRequest = LocationRequest.create()\n .setInterval(10 * 1000)\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, locationRequest, this);\n isDrawing = true;\n } catch (SecurityException e) {\n Log.e(TAG, \"Failed to start location updates \" + e.getLocalizedMessage());\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n // 34.042709, -118.432666 = home\n // 34.044736, -118.433889\n Polygon polygon = googleMap.addPolygon(new PolygonOptions()\n .clickable(true)\n .add(\n new LatLng(34.044736, -118.433889),\n new LatLng(34.046736, -118.429889),\n new LatLng(34.043736, -118.428889),\n new LatLng(34.042736, -118.431889),\n new LatLng(34.041736, -118.434889),\n new LatLng(34.044736, -118.433889)));\n\n // Store a data object with the polygon, used here to indicate an arbitrary type.\n polygon.setTag(\"Search Area\");\n polygon.setFillColor(COLOR_ORANGE_ARGB);\n\n Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (location == null) { return; }\n }\n double curLatitude = location.getLatitude();\n double curLongitude = location.getLongitude();\n\n if (initialLat == 0) {\n initialLat = curLatitude;\n initialLon = curLongitude;\n }\n\n myLatitude = (forceLat == 0) ? curLatitude : forceLat;\n myLongitude = (forceLon == 0) ? curLongitude : forceLon;\n\n\n this.googleMap = googleMap;\n\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n// LatLng sydney = new LatLng(-33.852, 151.211);\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n\n BitmapDescriptor bm = BitmapDescriptorFactory.fromResource(R.drawable.tracking);\n MarkerOptions marker = new MarkerOptions()\n .position(myLoc)\n .alpha((float) 0.5)\n .anchor(0.5f,0.5f)\n .icon(bm)\n// .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))\n .title(\"My Location\")\n ;\n myMarker = googleMap.addMarker(marker);\n googleMap.animateCamera(CameraUpdateFactory.newLatLng(myLoc));\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLoc, 17));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLng(myLoc));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc, 16));\n\n\n new Timer().scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n updateLocation();\n }\n }, 0, 2000);\n\n }", "private void getLocations() {\n TripSave tripSave = TripHelper.tripOngoing();\n if (tripSave != null) {\n for (LocationSave locationSave : tripSave.getLocations()) {\n if (locationSave != null) {\n tripTabFragment.drawPolyLine(new LatLng(locationSave.getLatitude(), locationSave.getLongitude()));\n }\n }\n }\n }", "void mo5802a(LatLng latLng);", "public void getLandmarksToBeDrawn(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n CostedPath path=shortestRouteDij(lm1,lm2); \n GraphNodeAL<MapPoint> prev=null;\n for(GraphNodeAL<?> n : path.pathList) { \n drawLandmarks((GraphNodeAL<MapPoint>) n);\n if(prev!=null) lineDraw(prev, (GraphNodeAL<MapPoint>) n);\n prev= (GraphNodeAL<MapPoint>) n;\n }\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mGeocoder = new Geocoder(this, Locale.getDefault());\n\n updateScreenLoc(movement[0]);\n\n loadCrimes(movement[0]);\n //Start MockLocationManager and inject first point\n turnOnLocationManager();\n updateLocation(movement[0]);\n updateRadiusCircle();\n\n\n }", "private void showBounds(){\n\n LatLngBounds.Builder boundBuilder = new LatLngBounds.Builder();\n\n\n for (int i = 0; i < points.size(); i++) {\n LatLng b_position = new LatLng(points.get(i).getLatitude(),points.get(i).getLongitude());\n boundBuilder.include(b_position);\n }\n\n LatLngBounds bounds = boundBuilder.build();\n\n int deviceWidth = getResources().getDisplayMetrics().widthPixels;\n int deviceHeight = getResources().getDisplayMetrics().heightPixels;\n int devicePadding = (int) (deviceHeight * 0.20); // offset from edges of the map 10% of screen\n\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, deviceWidth, deviceHeight, devicePadding);\n mMap.animateCamera(cu);\n\n }", "private void DrawDots(List<HashMap<String, String>> result,ArrayList point2) {\n map.clear();\n MarkerOptions options = new MarkerOptions();\n\n // this is the start location marker in green\n options.position(origin);\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n // the is the end location marker in red\n map.addMarker(options);\n options.position(dest);\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n map.addMarker(options);\n ArrayList points = null;\n\n PolylineOptions lineOptions = null;\n\n MarkerOptions markerOptions = new MarkerOptions();\n points = new ArrayList();\n\n\n lineOptions = new PolylineOptions();\n List<HashMap<String, String>> path = result;\n\n for (int j = 1; j < path.size(); j++) {\n HashMap<String, String> point = path.get(j);\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n LatLng position = new LatLng(lat, lng);\n points.add(position);\n\n }\n\n lineOptions.addAll(points);\n lineOptions.width(12);\n\n lineOptions.color(Color.RED);\n\n lineOptions.geodesic(true);\n map.addPolyline(lineOptions);\n\n for (Object k : points2) {\n map.addCircle(new CircleOptions()\n .center((LatLng) k)\n .radius(3)\n .strokeColor(Color.BLUE)\n .fillColor(Color.BLUE));\n }\n }", "private void doCircle()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t//Radianten des Winkels berechnen\n\t\tdouble radiant = Math.toRadians(arc);\n\t\t\n\t\t// Distanz d berechnen, die auf dem Kreis zurückgelegt werden soll\n\t\tdouble d = Math.PI * radius * (arc / 180);\n\t\t\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\n\t\t//Startkoordinaten berechnen\n\t\tint startX, startY;\n\t\tstartX = x1;\n\t\tstartY = y1 + radius;\n\t\t\n\t\twhile(steps > 0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0, currentArc = 0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\n\t\t\tcurrentArc = radiant * currentTime;\n\t\t\t\n\t\t\tx = (startX - x1) * Math.cos(currentArc) - (startY - y1) * Math.sin(currentArc) + x1;\n\t\t\ty = (startX - x1) * Math.sin(currentArc) + (startY - y1) * Math.cos(currentArc) + y1;\n\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long) (elapsedTime*SLEEP_INTERVAL));\n\t\t\t\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\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}\n\t}", "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<LatLng> cluster = (ArrayList<LatLng>)intent.getSerializableExtra(\"cluster\");\n Log.i(\"cluster\", \"Got cluster: \" + cluster.size());\n for(LatLng center : cluster) {\n drawGeofence(center);\n }\n }", "public void drawRandomCircles() {\n Line[] lines = makeTenRandomLines();\n GUI gui = new GUI(\"Random Circles Example\", 400, 300);\n DrawSurface d = gui.getDrawSurface();\n drawLinesAndMiddle(lines, d);\n Point[] points = findAllIntersectPoints(lines);\n drawAllIntersections(points, d);\n\n gui.show(d);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mcircleOptions = mcircleOptions.center(sydney);\n mcircleOptions = mcircleOptions.radius(500);\n mcircleOptions = mcircleOptions.strokeWidth(2);\n mcircleOptions = mcircleOptions.strokeColor(Color.argb(100, 255, 73, 73));\n mcircleOptions = mcircleOptions.fillColor(Color.argb(100, 255, 73, 73));\n mMap.addCircle(mcircleOptions);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n !=\n PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mlatLng = latLng;\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(mlatLng));\n mcircleOptions = mcircleOptions.center(mlatLng);\n mMap.addCircle(mcircleOptions);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n geocoder = new Geocoder(Maps.this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(mlatLng.latitude, mlatLng.longitude, 1);\n for (int i=0; i < addresses.get(0).getMaxAddressLineIndex(); i++) {\n Log.e(\"Address\", addresses.get(0).getAddressLine(i) + \"\");\n caddress = addresses.get(0).getAddressLine(i);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n loc_data = getSharedPreferences(\"loc_data\", MODE_PRIVATE);\n SharedPreferences.Editor loc_data_editor = loc_data.edit();\n loc_data_editor.putString(\"lat\", Double.toString(mlatLng.latitude));\n loc_data_editor.putString(\"lng\", Double.toString(mlatLng.longitude));\n loc_data_editor.putString(\"add\", caddress + \"\");\n loc_data_editor.commit();\n }\n });\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "@Override\n public void onMapReady(final GoogleMap googleMap) {\n this.googleMap = googleMap;\n this.googleMap.getUiSettings().setZoomControlsEnabled(true);\n this.googleMap.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener() {\n @Override\n public void onCameraChange(CameraPosition cameraPosition) {\n boolean markersVisibility = false;\n if(cameraPosition.zoom>minZoomLevel){\n// googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(cameraPosition.target, minZoomLevel));\n markersVisibility = true;\n }\n for(Marker marker : mapMarkers){\n marker.setVisible(markersVisibility);\n }\n }\n });\n this.googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(25.0449695d, 121.5087531d), minZoomLevel));\n// this.mapItemClusterManager = new ClusterManager<>(this,this.googleMap);\n// this.googleMap.setOnCameraChangeListener(this.mapItemClusterManager);\n// this.googleMap.setOnMarkerClickListener(this.mapItemClusterManager);\n// this.googleMap.setOnInfoWindowClickListener(this.mapItemClusterManager);\n// this.mapItemClusterManager.setRenderer(new DefaultClusterRenderer<ClusterItem>(this,this.googleMap,this.mapItemClusterManager){\n// @Override\n// protected boolean shouldRenderAsCluster(Cluster<ClusterItem> cluster) {\n// return cluster.getSize()>20;\n// }\n// });\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n assetReadHandler.sendEmptyMessage(0);\n BufferedReader busInfoFileBufferReader = new BufferedReader(new InputStreamReader(getAssets().open(\"GetStopLocation.json\")));\n JSONObject busInfoRawJsonObject = new JSONObject(busInfoFileBufferReader.readLine());\n Message message = new Message();\n message.obj = busInfoRawJsonObject;\n assetReadHandler.sendEmptyMessage(1);\n busStateJJsonArrayHandler.sendMessage(message);\n } catch (JSONException e){\n Log.e(\"y3k\", e.getMessage());\n e.printStackTrace();\n } catch (IOException e1){\n Log.e(\"y3k\", e1.getMessage());\n e1.printStackTrace();\n }\n }\n }).start();\n\n// LatLng sydney = new LatLng(-34, 151);\n// googleMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "private void createGraphics() {\n\n Graphic graphic;\n // create spatial reference for the points\n SpatialReference spatialReference = SpatialReference.create(4326);\n\n // create points to place markers\n List<Point> points = new ArrayList<>();\n points.add(new Point(-2.641, 56.077, spatialReference));\n points.add(new Point(-2.669, 56.058, spatialReference));\n points.add(new Point(-2.718, 56.060, spatialReference));\n points.add(new Point(-2.720, 56.073, spatialReference));\n\n // create simple marker symbols for the points\n markers = new ArrayList<>();\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, RED, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.TRIANGLE, PURPLE, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CROSS, GREEN, 10));\n markers.add(new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.DIAMOND, BLUE, 10));\n\n // create a list of names for graphics\n List<String> names = new ArrayList<>();\n names.add(\"LAMB\");\n names.add(\"CANTY BAY\");\n names.add(\"NORTH BERWICK\");\n names.add(\"FIDRA\");\n\n // create a list of descriptions for graphics\n List<String> descriptions = new ArrayList<>();\n descriptions.add(\"Just opposite of Bass Rock.\");\n descriptions.add(\"100m long and 50m wide.\");\n descriptions.add(\"Lighthouse in northern section.\");\n descriptions.add(\"Also known as Barley Farmstead.\");\n\n // create four graphics with attributes and add to graphics overlay\n for (int i = 0; i < 4; i++) {\n graphic = new Graphic(points.get(i), markers.get(i));\n graphic.getAttributes().put(\"NAME\", names.get(i));\n graphic.getAttributes().put(\"DESCRIPTION\", descriptions.get(i));\n graphicsOverlay.getGraphics().add(graphic);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 14.0f));\n mMap.addMarker(new MarkerOptions().position(center).title(title));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 14.0f));\n//\n Log.i(\"tag\", otherPoints.size() + \"\");\n for (LatLng p : otherPoints) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.baseline_album_black_18);\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(p.latitude, p.longitude))\n .title(\"\")\n .icon(icon));\n }\n }", "public void fetchNearbyLocations(final float latitude, final float longitude,\n final OperationCallback<Location[]> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n // Prepare request.\n String getParams = String.format(LOCATIONS_ENDPOINT_FORMAT, latitude, longitude, mAccessToken);\n String url = API_URL + getParams;\n String response = getRequest(url);\n \n Log.i(TAG, \"response \" + response);\n \n // Parse JSON answer and notify caller.\n Gson gson = new Gson();\n JSONObject responseJson = (JSONObject) new JSONTokener(response).nextValue();\n List<Location> locations = new ArrayList<Location>(3);\n JSONArray locationsJson = responseJson.getJSONArray(\"data\");\n for (int i = 0; i < locationsJson.length(); i++) {\n locations.add(gson.fromJson(locationsJson.get(i).toString(), Location.class));\n }\n \n callback.notifyCompleted(locations.toArray(new Location[locations.size()]));\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }", "public static void instantiate(){\n listOfpoints = new ArrayList<>(12);\n listOfPolygons = new ArrayList<>(listOfpoints.size());\n\n for ( int i= 0 ; i < 70; i++ ){\n listOfpoints.add(new ArrayList<LatLng>());\n }\n\n listOfpoints.get(0).add(new LatLng(44.4293595,26.1035863));\n listOfpoints.get(0).add(new LatLng(44.4295434,26.1035434));\n listOfpoints.get(0).add(new LatLng(44.4297579,26.103479));\n listOfpoints.get(0).add(new LatLng(44.431566,26.1033503));\n listOfpoints.get(0).add(new LatLng(44.4327305,26.1031572));\n listOfpoints.get(0).add(new LatLng(44.4337724,26.1029211));\n listOfpoints.get(0).add(new LatLng(44.4342474,26.1028138));\n listOfpoints.get(0).add(new LatLng( 44.4348756,26.1025563));\n listOfpoints.get(0).add(new LatLng(44.4353199,26.1023203));\n listOfpoints.get(0).add(new LatLng( 44.4353046,26.101977));\n listOfpoints.get(0).add(new LatLng( 44.4352893,26.1015478));\n listOfpoints.get(0).add(new LatLng(44.4351974,26.1010758));\n listOfpoints.get(0).add(new LatLng(44.4350595,26.100432));\n listOfpoints.get(0).add(new LatLng(44.4348756,26.0995523));\n listOfpoints.get(0).add(new LatLng(44.4346458,26.0983292));\n listOfpoints.get(0).add(new LatLng(44.4343547,26.098415));\n listOfpoints.get(0).add(new LatLng( 44.4340176,26.0983506));\n listOfpoints.get(0).add(new LatLng( 44.4327918,26.0975996));\n listOfpoints.get(0).add(new LatLng(44.4318878,26.0972134));\n listOfpoints.get(0).add(new LatLng( 44.4307692,26.0968701));\n listOfpoints.get(0).add(new LatLng( 44.4300644,26.0968271));\n listOfpoints.get(0).add(new LatLng( 44.4298498,26.0972992));\n listOfpoints.get(0).add(new LatLng(44.4297732,26.0977713));\n listOfpoints.get(0).add(new LatLng(44.4296966,26.0985867));\n listOfpoints.get(0).add(new LatLng (44.4296506,26.0994235));\n listOfpoints.get(0).add(new LatLng (44.4295587,26.1002389));\n listOfpoints.get(0).add(new LatLng (44.4294361,26.1007754));\n listOfpoints.get(0).add(new LatLng (44.4292369,26.1016766));\n listOfpoints.get(0).add(new LatLng (44.429099,26.1025778));\n listOfpoints.get(0).add(new LatLng (44.4289917,26.1033717));\n\n\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n listOfpoints.get(1).add(new LatLng (44.43630606,26.1017829));\n listOfpoints.get(1).add(new LatLng (44.4370654,26.101461));\n listOfpoints.get(1).add(new LatLng (44.4382451,26.1007958));\n listOfpoints.get(1).add(new LatLng (44.4393176,26.1002379));\n listOfpoints.get(1).add(new LatLng (44.4406045,26.0996371));\n listOfpoints.get(1).add(new LatLng (44.4418301,26.0990792));\n listOfpoints.get(1).add(new LatLng (44.4415084,26.0983067));\n listOfpoints.get(1).add(new LatLng (44.4412173,26.0977059));\n listOfpoints.get(1).add(new LatLng (44.4409875,26.097148));\n listOfpoints.get(1).add(new LatLng (44.4406811,26.0965472));\n listOfpoints.get(1).add(new LatLng (44.4404207,26.0959893));\n listOfpoints.get(1).add(new LatLng (44.4400989,26.0963326));\n listOfpoints.get(1).add(new LatLng (44.4393636,26.0968691));\n listOfpoints.get(1).add(new LatLng (44.4390725,26.0969549));\n listOfpoints.get(1).add(new LatLng (44.4381532,26.0971051));\n listOfpoints.get(1).add(new LatLng (44.4372952,26.0975557));\n listOfpoints.get(1).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(1).add(new LatLng (44.4358244,26.0977918));\n listOfpoints.get(1).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(1).add(new LatLng (44.4348132,26.0979205));\n listOfpoints.get(1).add(new LatLng (44.4348591,26.0983497));\n listOfpoints.get(1).add(new LatLng (44.4352115,26.1003452));\n listOfpoints.get(1).add(new LatLng (44.435472,26.1017185));\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n\n\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n listOfpoints.get(2).add(new LatLng (44.435899,26.1039688));\n listOfpoints.get(2).add(new LatLng (44.4360216,26.1044623));\n listOfpoints.get(2).add(new LatLng (44.4360982,26.1049988));\n listOfpoints.get(2).add(new LatLng (44.4362361,26.1055781));\n listOfpoints.get(2).add(new LatLng (44.4363127,26.1059));\n listOfpoints.get(2).add(new LatLng (44.4364506,26.1063721));\n listOfpoints.get(2).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(2).add(new LatLng (44.4367264,26.1068441));\n listOfpoints.get(2).add(new LatLng (44.4369715,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4374312,26.1073591));\n listOfpoints.get(2).add(new LatLng (44.4380593,26.1076381));\n listOfpoints.get(2).add(new LatLng (44.4386722,26.1078741));\n listOfpoints.get(2).add(new LatLng (44.439239,26.1080672));\n listOfpoints.get(2).add(new LatLng (44.4399744,26.1083033));\n listOfpoints.get(2).add(new LatLng (44.4406485,26.1084106));\n listOfpoints.get(2).add(new LatLng (44.4407557,26.1080458));\n listOfpoints.get(2).add(new LatLng (44.440817,26.1075737));\n listOfpoints.get(2).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(2).add(new LatLng (44.4410928,26.1070587));\n listOfpoints.get(2).add(new LatLng (44.4419814,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4422877,26.1071875));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.107445));\n listOfpoints.get(2).add(new LatLng (44.443498,26.107402));\n listOfpoints.get(2).add(new LatLng (44.4433754,26.10693));\n listOfpoints.get(2).add(new LatLng (44.4432988,26.1065008));\n listOfpoints.get(2).add(new LatLng (44.4431763,26.1059858));\n listOfpoints.get(2).add(new LatLng (44.4429465,26.1052992));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1044838));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1036469));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1029818));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.1027457));\n listOfpoints.get(2).add(new LatLng (44.4431303,26.1025311));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1022737));\n listOfpoints.get(2).add(new LatLng (44.4427627,26.101866));\n listOfpoints.get(2).add(new LatLng (44.4426707,26.1015656));\n listOfpoints.get(2).add(new LatLng (44.4426554,26.101072));\n listOfpoints.get(2).add(new LatLng (44.4427014,26.1002781));\n listOfpoints.get(2).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(2).add(new LatLng (44.4420426,26.0993125));\n listOfpoints.get(2).add(new LatLng (44.4412,26.0997202));\n listOfpoints.get(2).add(new LatLng (44.4400663,26.100321));\n listOfpoints.get(2).add(new LatLng (44.4390399,26.100836));\n listOfpoints.get(2).add(new LatLng (44.4382279,26.1012651));\n listOfpoints.get(2).add(new LatLng (44.4374924,26.1016514));\n listOfpoints.get(2).add(new LatLng (44.4366038,26.1021449));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1026384));\n listOfpoints.get(2).add(new LatLng (44.4357305,26.1027886));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n\n\n listOfpoints.get(3).add(new LatLng (44.4290806,26.1040332));\n listOfpoints.get(3).add(new LatLng (44.4295709,26.1054494));\n listOfpoints.get(3).add(new LatLng (44.4302604,26.1070373));\n listOfpoints.get(3).add(new LatLng (44.4307508,26.1080887));\n listOfpoints.get(3).add(new LatLng (44.432804,26.111994));\n listOfpoints.get(3).add(new LatLng (44.4329113,26.1123373));\n listOfpoints.get(3).add(new LatLng (44.4330798,26.1136248));\n listOfpoints.get(3).add(new LatLng (44.4332483,26.1150195));\n listOfpoints.get(3).add(new LatLng (44.433325,26.1158349));\n listOfpoints.get(3).add(new LatLng (44.4347959,26.1162855));\n listOfpoints.get(3).add(new LatLng (44.4359143,26.1166288));\n listOfpoints.get(3).add(new LatLng (44.4365272,26.1168005));\n listOfpoints.get(3).add(new LatLng (44.4367723,26.1168434));\n listOfpoints.get(3).add(new LatLng (44.4373852,26.1166503));\n listOfpoints.get(3).add(new LatLng (44.43809,26.1163713));\n listOfpoints.get(3).add(new LatLng (44.4378755,26.1154272));\n listOfpoints.get(3).add(new LatLng (44.435516,26.1027672));\n listOfpoints.get(3).add(new LatLng (44.433708,26.1034109));\n listOfpoints.get(3).add(new LatLng (44.4330032,26.1035826));\n listOfpoints.get(3).add(new LatLng (44.4321451,26.1038401));\n listOfpoints.get(3).add(new LatLng (44.4309959,26.1039259));\n listOfpoints.get(3).add(new LatLng (44.4302451,26.1039903));\n listOfpoints.get(3).add(new LatLng (44.4296628,26.1039903));\n listOfpoints.get(3).add(new LatLng(44.4290806,26.1040332));\n\n\n\n listOfpoints.get(4).add(new LatLng ( 44.4343669 ,26.0798289));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0801508));\n listOfpoints.get(4).add(new LatLng (44.4335088 ,26.0905363));\n listOfpoints.get(4).add(new LatLng (44.4333862 ,26.092124));\n listOfpoints.get(4).add(new LatLng ( 44.433233 ,26.0926177));\n listOfpoints.get(4).add(new LatLng ( 44.4329879 ,26.0932614));\n listOfpoints.get(4).add(new LatLng (44.4327427 , 26.0936906));\n listOfpoints.get(4).add(new LatLng (44.4301838 ,26.0965659));\n listOfpoints.get(4).add(new LatLng (44.4301685 ,26.0967161));\n listOfpoints.get(4).add(new LatLng (44.4305209 ,26.096759));\n listOfpoints.get(4).add(new LatLng (44.4311338 ,26.0968878));\n listOfpoints.get(4).add(new LatLng (44.4317468 ,26.097038));\n listOfpoints.get(4).add(new LatLng (44.4323137 ,26.0972955));\n listOfpoints.get(4).add(new LatLng (44.4327427 ,26.0974457));\n listOfpoints.get(4).add(new LatLng (44.4333709 ,26.0978534));\n listOfpoints.get(4).add(new LatLng (44.4338919 ,26.0981538));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0982611));\n listOfpoints.get(4).add(new LatLng ( 44.4345354 ,26.0982611));\n listOfpoints.get(4).add(new LatLng (44.4346886 ,26.0981752));\n listOfpoints.get(4).add(new LatLng (44.4345814, 26.0918667));\n listOfpoints.get(4).add(new LatLng (44.4343669 ,26.0798289));\n\n\n listOfpoints.get(5).add(new LatLng (44.4348405,26.097773));\n listOfpoints.get(5).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(5).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(5).add(new LatLng (44.4372952, 26.0975557));\n listOfpoints.get(5).add(new LatLng (44.4381532, 26.0971051));\n listOfpoints.get(5).add(new LatLng ( 44.4393636,26.0968691));\n listOfpoints.get(5).add(new LatLng(44.4397739, 26.0964855));\n listOfpoints.get(5).add(new LatLng (44.4402029,26.0960993));\n listOfpoints.get(5).add(new LatLng (44.4406778,26.0956487));\n listOfpoints.get(5).add(new LatLng(44.4405706,26.0952195));\n listOfpoints.get(5).add(new LatLng (44.4403408 ,26.0942539));\n listOfpoints.get(5).add(new LatLng (44.440065 ,26.0931811));\n listOfpoints.get(5).add(new LatLng (44.4400497, 26.0919151));\n listOfpoints.get(5).add(new LatLng (44.4398199 ,26.0897693));\n listOfpoints.get(5).add(new LatLng (44.4397893 ,26.0891041));\n listOfpoints.get(5).add(new LatLng (44.4399271 , 26.0879668));\n listOfpoints.get(5).add(new LatLng (44.4399731 ,26.0873017));\n listOfpoints.get(5).add(new LatLng (44.4399884 ,26.0867223));\n listOfpoints.get(5).add(new LatLng (44.4365719, 26.0887179));\n listOfpoints.get(5).add(new LatLng (44.434672 ,26.0898337));\n listOfpoints.get(5).add(new LatLng (44.4348405 ,26.097773));\n\n\n listOfpoints.get(6).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(6).add(new LatLng (44.4365354,26.1075151));\n listOfpoints.get(6).add(new LatLng (44.4375926,26.113137));\n listOfpoints.get(6).add(new LatLng (44.4378224,26.114167));\n listOfpoints.get(6).add(new LatLng (44.4435828,26.1191452));\n listOfpoints.get(6).add(new LatLng (44.4440117, 26.1184585));\n listOfpoints.get(6).add(new LatLng (44.4448849, 26.1172784));\n listOfpoints.get(6).add(new LatLng (44.4457888,26.1161411));\n listOfpoints.get(6).add(new LatLng (44.4462483, 26.1149395));\n listOfpoints.get(6).add(new LatLng (44.4466773, 26.113137));\n listOfpoints.get(6).add(new LatLng (44.4467998, 26.1121929));\n listOfpoints.get(6).add(new LatLng (44.4467539, 26.1112917));\n listOfpoints.get(6).add(new LatLng (44.4469683, 26.1101973));\n listOfpoints.get(6).add(new LatLng (44.4458041, 26.1093176));\n listOfpoints.get(6).add(new LatLng (44.4453905, 26.1091888));\n listOfpoints.get(6).add(new LatLng (44.4448083, 26.1089099));\n listOfpoints.get(6).add(new LatLng (44.4442109, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4435828, 26.1076224));\n listOfpoints.get(6).add(new LatLng (44.4433377, 26.107558));\n listOfpoints.get(6).add(new LatLng (44.4420662,26.1072791));\n listOfpoints.get(6).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(6).add(new LatLng (44.4407946,26.1082018));\n listOfpoints.get(6).add(new LatLng ( 44.4406107,26.1085451));\n listOfpoints.get(6).add(new LatLng (44.43986, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4384659, 26.1079014));\n listOfpoints.get(6).add(new LatLng (44.4372095, 26.1073864));\n listOfpoints.get(6).add(new LatLng (44.4365425, 26.1067583));\n\n\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n listOfpoints.get(7).add(new LatLng ( 44.4265883,26.1107511));\n listOfpoints.get(7).add(new LatLng (44.4261898,26.118905));\n listOfpoints.get(7).add(new LatLng (44.4274311,26.1189909));\n listOfpoints.get(7).add(new LatLng (44.4276303,26.1189265));\n listOfpoints.get(7).add(new LatLng (44.4285497,26.1191625));\n listOfpoints.get(7).add(new LatLng (44.4288408,26.1193342));\n listOfpoints.get(7).add(new LatLng (44.4294997,26.1199564));\n listOfpoints.get(7).add(new LatLng (44.4297909, 26.1200852));\n listOfpoints.get(7).add(new LatLng (44.4303272,26.1203427));\n listOfpoints.get(7).add(new LatLng (44.431124, 26.1205787));\n listOfpoints.get(7).add(new LatLng (44.4328861, 26.1207289));\n listOfpoints.get(7).add(new LatLng (44.4329933, 26.1206431));\n listOfpoints.get(7).add(new LatLng (44.4331159, 26.1194844));\n listOfpoints.get(7).add(new LatLng (44.4331925,26.118154));\n listOfpoints.get(7).add(new LatLng (44.4332844,26.1160512));\n listOfpoints.get(7).add(new LatLng (44.4328094,26.112339));\n listOfpoints.get(7).add(new LatLng (44.4327022, 26.1120171));\n listOfpoints.get(7).add(new LatLng (44.4299135, 26.1064596));\n listOfpoints.get(7).add(new LatLng (44.4289634,26.1040778));\n listOfpoints.get(7).add(new LatLng (44.4281819,26.1039705));\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n\n\n\n\n listOfpoints.get(8).add (new LatLng (44.4262461,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4260163,26.1014488));\n listOfpoints.get(8).add (new LatLng (44.4259397,26.1023715));\n listOfpoints.get(8).add (new LatLng (44.4258784,26.103616));\n listOfpoints.get(8).add (new LatLng (44.426001,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.42643,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.4272882,26.1038735));\n listOfpoints.get(8).add (new LatLng (44.4282995,26.1038306));\n listOfpoints.get(8).add (new LatLng (44.4289278,26.1035731));\n listOfpoints.get(8).add (new LatLng (44.4289431,26.1028006));\n listOfpoints.get(8).add (new LatLng (44.4291423,26.1015132));\n listOfpoints.get(8).add (new LatLng (44.4286366,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4284834,26.1010196));\n listOfpoints.get(8).add (new LatLng (44.4271043,26.1008694));\n listOfpoints.get(8).add (new LatLng (44.4262461, 26.1007836));\n\n\n\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n listOfpoints.get(9).add(new LatLng (44.4284834,26.1010196));\n listOfpoints.get(9).add(new LatLng (44.4290094,26.1000479));\n listOfpoints.get(9).add(new LatLng (44.4292545,26.0986961));\n listOfpoints.get(9).add(new LatLng (44.4293465,26.0971726));\n listOfpoints.get(9).add(new LatLng (44.4294844,26.0964216));\n listOfpoints.get(9).add(new LatLng (44.4301739,26.0956276));\n listOfpoints.get(9).add(new LatLng (44.432411,26.0931385));\n listOfpoints.get(9).add(new LatLng (44.4327022,26.0925163));\n listOfpoints.get(9).add(new LatLng (44.4328401,26.0919584));\n listOfpoints.get(9).add(new LatLng (44.4329014, 26.0913576));\n listOfpoints.get(9).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(9).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(9).add(new LatLng (44.4265882, 26.0922588));\n listOfpoints.get(9).add(new LatLng (44.4269867,26.0926879));\n listOfpoints.get(9).add(new LatLng (44.4267108,26.0998763));\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n\n\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(10).add(new LatLng (44.4215507, 26.0903665));\n listOfpoints.get(10).add(new LatLng (44.4255811,26.0980483));\n listOfpoints.get(10).add(new LatLng ( 44.4265772,26.0999795));\n listOfpoints.get(10).add(new LatLng (44.4266998,26.099722));\n listOfpoints.get(10).add(new LatLng (44.4269867, 26.0926879));\n listOfpoints.get(10).add(new LatLng (44.4265882,26.0922588));\n listOfpoints.get(10).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n\n\n listOfpoints.get(11).add(new LatLng (44.4214281, 26.0905382));\n listOfpoints.get(11).add(new LatLng (44.4207385, 26.0915467));\n listOfpoints.get(11).add(new LatLng (44.4199568, 26.0929629));\n listOfpoints.get(11).add(new LatLng (44.4192059,26.0943576));\n listOfpoints.get(11).add(new LatLng (44.4187155,26.095409));\n listOfpoints.get(11).add(new LatLng (44.4186235,26.0957524));\n listOfpoints.get(11).add(new LatLng (44.4189607, 26.0968253));\n listOfpoints.get(11).add(new LatLng (44.4212442,26.1039063));\n listOfpoints.get(11).add(new LatLng (44.4227001,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.4251367,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.425765,26.103799));\n listOfpoints.get(11).add(new LatLng (44.425811,26.1027476));\n listOfpoints.get(11).add(new LatLng (44.4259182,26.101503));\n listOfpoints.get(11).add(new LatLng (44.4260715,26.1009237));\n listOfpoints.get(11).add(new LatLng (44.4264086,26.1001297));\n listOfpoints.get(11).add(new LatLng (44.4260255, 26.0993143));\n listOfpoints.get(11).add(new LatLng (44.4252899, 26.0978981));\n listOfpoints.get(11).add(new LatLng (44.424064,26.0955593));\n listOfpoints.get(11).add(new LatLng (44.4230372,26.0935851));\n listOfpoints.get(11).add(new LatLng (44.4214281,26.0905382));\n\n\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n listOfpoints.get(12).add(new LatLng (44.4216123,26.1052654));\n listOfpoints.get(12).add(new LatLng (44.4226851,26.1084411));\n listOfpoints.get(12).add(new LatLng (44.4237731,26.1117241));\n listOfpoints.get(12).add(new LatLng (44.4244168,26.11181));\n listOfpoints.get(12).add(new LatLng (44.4263629,26.1118743));\n listOfpoints.get(12).add(new LatLng (44.4264242,26.1109946));\n listOfpoints.get(12).add(new LatLng (44.4265315,26.1078832));\n listOfpoints.get(12).add(new LatLng (44.4267154,26.1041496));\n listOfpoints.get(12).add(new LatLng (44.4254588, 26.1042354));\n listOfpoints.get(12).add(new LatLng (44.4242482,26.1041925));\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n\n\n\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n listOfpoints.get(13).add(new LatLng (44.4208987, 26.1041756));\n listOfpoints.get(13).add(new LatLng (44.4155345,26.1045404));\n listOfpoints.get(13).add(new LatLng (44.4156111, 26.1051198));\n listOfpoints.get(13).add(new LatLng (44.4156724, 26.106257));\n listOfpoints.get(13).add(new LatLng (44.4157184,26.1068793));\n listOfpoints.get(13).add(new LatLng (44.4157797, 26.1071153));\n listOfpoints.get(13).add(new LatLng (44.415841, 26.1077805));\n listOfpoints.get(13).add(new LatLng (44.4159024,26.1090465));\n listOfpoints.get(13).add(new LatLng (44.416025,26.1110635));\n listOfpoints.get(13).add(new LatLng (44.4161629,26.1116643));\n listOfpoints.get(13).add(new LatLng (44.4163468, 26.112072));\n listOfpoints.get(13).add(new LatLng (44.4166993,26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4170518, 26.1133595));\n listOfpoints.get(13).add(new LatLng (44.4177109, 26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4184006,26.1118575));\n listOfpoints.get(13).add(new LatLng (44.4190136,26.1112566));\n listOfpoints.get(13).add(new LatLng (44.4199331, 26.1107846));\n listOfpoints.get(13).add(new LatLng (44.4215883,26.1101838));\n listOfpoints.get(13).add(new LatLng (44.4229369,26.10954));\n listOfpoints.get(13).add(new LatLng (44.422753, 26.1089178));\n listOfpoints.get(13).add(new LatLng (44.4222626,26.1074372));\n listOfpoints.get(13).add(new LatLng (44.4217262,26.1059137));\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n\n\n\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n listOfpoints.get(14).add(new LatLng (44.4169314,26.1139266));\n listOfpoints.get(14).add(new LatLng (44.4177284,26.1143128));\n listOfpoints.get(14).add(new LatLng (44.4185253,26.1147205));\n listOfpoints.get(14).add(new LatLng (44.4237666,26.1189047));\n listOfpoints.get(14).add(new LatLng (44.4237819,26.1191408));\n listOfpoints.get(14).add(new LatLng (44.4240425,26.1191622));\n listOfpoints.get(14).add(new LatLng (44.4258814,26.1192481));\n listOfpoints.get(14).add(new LatLng (44.425912,26.1188404));\n listOfpoints.get(14).add(new LatLng (44.426004,26.1167804));\n listOfpoints.get(14).add(new LatLng (44.4261113,26.1148063));\n listOfpoints.get(14).add(new LatLng (44.4262798,26.1120812));\n listOfpoints.get(14).add(new LatLng (44.4238739,26.1119525));\n listOfpoints.get(14).add(new LatLng (44.4235674,26.1115662));\n listOfpoints.get(14).add(new LatLng (44.4230157,26.109914));\n listOfpoints.get(14).add(new LatLng (44.4218817,26.1103646));\n listOfpoints.get(14).add(new LatLng (44.4200733,26.1110512));\n listOfpoints.get(14).add(new LatLng (44.4187246,26.1118666));\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n\n\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n listOfpoints.get(15).add(new LatLng (44.4334184,26.0843973));\n listOfpoints.get(15).add(new LatLng (44.4305378,26.0839467));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0840969));\n listOfpoints.get(15).add(new LatLng (44.4305531,26.0845475));\n listOfpoints.get(15).add(new LatLng (44.4306604,26.0853844));\n listOfpoints.get(15).add(new LatLng (44.4302773,26.0908131));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0910277));\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n\n\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n listOfpoints.get(16).add(new LatLng (44.4252956,26.0790543));\n listOfpoints.get(16).add(new LatLng (44.4246213,26.0901265));\n listOfpoints.get(16).add(new LatLng (44.4247746,26.0905127));\n listOfpoints.get(16).add(new LatLng (44.4298621,26.0909634));\n listOfpoints.get(16).add(new LatLng (44.4300919,26.0907273));\n listOfpoints.get(16).add(new LatLng (44.430475,26.0853414));\n listOfpoints.get(16).add(new LatLng ( 44.4291112,26.0806422));\n listOfpoints.get(16).add(new LatLng (44.428391,26.0795693));\n listOfpoints.get(16).add(new LatLng (44.4277781,26.0794835));\n listOfpoints.get(16).add(new LatLng (44.42574,26.0784535));\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n\n\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n listOfpoints.get(17).add(new LatLng (44.433312,26.1178736));\n listOfpoints.get(17).add(new LatLng (44.4331128,26.1208562));\n listOfpoints.get(17).add(new LatLng (44.4327757,26.1238603));\n listOfpoints.get(17).add(new LatLng (44.4325765,26.1256413));\n listOfpoints.get(17).add(new LatLng (44.4354264,26.1251477));\n listOfpoints.get(17).add(new LatLng (44.4389196,26.122723));\n listOfpoints.get(17).add(new LatLng (44.4391954,26.1224012));\n listOfpoints.get(17).add(new LatLng (44.4381383,26.1165003));\n listOfpoints.get(17).add(new LatLng (44.4368666,26.1169724));\n listOfpoints.get(17).add(new LatLng (44.4364683,26.1169295));\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n\n\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n listOfpoints.get(18).add(new LatLng (44.4453896, 26.0909388));\n listOfpoints.get(18).add(new LatLng (44.4444245,26.0918185));\n listOfpoints.get(18).add(new LatLng (44.4428313, 26.093342));\n listOfpoints.get(18).add(new LatLng (44.4413912,26.0947797));\n listOfpoints.get(18).add(new LatLng (44.4405333,26.0959169));\n listOfpoints.get(18).add(new LatLng (44.4419274,26.0990069));\n listOfpoints.get(18).add(new LatLng (44.4433368,26.0983202));\n listOfpoints.get(18).add(new LatLng (44.4452824,26.0973761));\n listOfpoints.get(18).add(new LatLng (44.446707,26.0966894));\n listOfpoints.get(18).add(new LatLng (44.4468296,26.0961959));\n listOfpoints.get(18).add(new LatLng (44.4465385,26.0945651));\n listOfpoints.get(18).add(new LatLng (44.4462628,26.0935351));\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n\n\n listOfpoints.get(19).add(new LatLng (44.4401196,26.0817507));\n listOfpoints.get(19).add(new LatLng (44.4401043,26.0831669));\n listOfpoints.get(19).add(new LatLng (44.4402115,26.0846046));\n listOfpoints.get(19).add(new LatLng (44.440089,26.0863641));\n listOfpoints.get(19).add(new LatLng (44.4399358,26.0894755));\n listOfpoints.get(19).add(new LatLng ( 44.4402115, 26.0932949));\n listOfpoints.get(19).add(new LatLng (44.4407937,26.0953763));\n listOfpoints.get(19).add(new LatLng (44.440855,26.0952047));\n listOfpoints.get(19).add(new LatLng (44.4450832,26.0910419));\n listOfpoints.get(19).add(new LatLng (44.4454509,26.0905698));\n listOfpoints.get(19).add(new LatLng (44.4445011,26.0879949));\n listOfpoints.get(19).add(new LatLng (44.4437964,26.0862783));\n listOfpoints.get(19).add(new LatLng (44.4434287,26.0840681));\n listOfpoints.get(19).add(new LatLng (44.443061, 26.0812143));\n listOfpoints.get(19).add(new LatLng (44.4423257, 26.0809997));\n listOfpoints.get(19).add(new LatLng (44.4419887, 26.0810211));\n listOfpoints.get(19).add(new LatLng (44.4411767, 26.0813215));\n listOfpoints.get(19).add(new LatLng (44.4401196, 26.0817507));\n\n\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n listOfpoints.get(20).add(new LatLng (44.4145114,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.0990294));\n listOfpoints.get(20).add(new LatLng (44.4143735, 26.0993727));\n listOfpoints.get(20).add(new LatLng (44.4144195, 26.0998233));\n listOfpoints.get(20).add(new LatLng (44.4142969, 26.1008104));\n listOfpoints.get(20).add(new LatLng (44.4140976,26.1009177));\n listOfpoints.get(20).add(new LatLng (44.4138983,26.1008962));\n listOfpoints.get(20).add(new LatLng (44.4138064,26.1006602));\n listOfpoints.get(20).add(new LatLng (44.4137451,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4130247,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4127335,26.0984286));\n listOfpoints.get(20).add(new LatLng (44.4113386,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4102503, 26.0985788));\n listOfpoints.get(20).add(new LatLng (44.414021,26.1043509));\n listOfpoints.get(20).add(new LatLng (44.4143122,26.1043938));\n listOfpoints.get(20).add(new LatLng (44.4159522,26.1042865));\n listOfpoints.get(20).add(new LatLng (44.4191554,26.104029));\n listOfpoints.get(20).add(new LatLng (44.4210711,26.1038574));\n listOfpoints.get(20).add(new LatLng (44.4208259,26.1030205));\n listOfpoints.get(20).add(new LatLng (44.4203508,26.1016258));\n listOfpoints.get(20).add(new LatLng (44.4198297,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4192167, 26.0981067));\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n\n\n listOfpoints.get(21).add(new LatLng (44.410189,26.0984071));\n listOfpoints.get(21).add(new LatLng (44.4103883,26.0984715));\n listOfpoints.get(21).add(new LatLng (44.4128867,26.0983213));\n listOfpoints.get(21).add(new LatLng (44.4138524, 26.1000594));\n listOfpoints.get(21).add(new LatLng (44.4138524,26.1004671));\n listOfpoints.get(21).add(new LatLng (44.4139597,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4141742,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.1003812));\n listOfpoints.get(21).add(new LatLng (44.4143275,26.0996946));\n listOfpoints.get(21).add(new LatLng (44.4141589,26.0986646));\n listOfpoints.get(21).add(new LatLng (44.418435,26.0957464));\n listOfpoints.get(21).add(new LatLng (44.4190021,26.0946306));\n listOfpoints.get(21).add(new LatLng (44.4183737,26.0934504));\n listOfpoints.get(21).add(new LatLng (44.4176534, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4165652, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4155996,26.0927423));\n listOfpoints.get(21).add(new LatLng (44.4149406,26.0921415));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.0919055));\n listOfpoints.get(21).add(new LatLng (44.412994, 26.0920986));\n listOfpoints.get(21).add(new LatLng (44.4098211,26.0943945));\n listOfpoints.get(21).add(new LatLng (44.4096679,26.0947164));\n listOfpoints.get(21).add(new LatLng (44.4096985, 26.0953816));\n listOfpoints.get(21).add(new LatLng (44.4088401, 26.0962399));\n listOfpoints.get(21).add(new LatLng (44.4088248,26.0966047));\n listOfpoints.get(21).add(new LatLng (44.410189, 26.0984071));\n\n\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n listOfpoints.get(22).add(new LatLng (44.4252745,26.0779102));\n listOfpoints.get(22).add(new LatLng (44.426102,26.0783394));\n listOfpoints.get(22).add(new LatLng (44.4286458, 26.079541));\n listOfpoints.get(22).add(new LatLng (44.4293813,26.0807855));\n listOfpoints.get(22).add(new LatLng (44.4303313,26.0837038));\n listOfpoints.get(22).add(new LatLng (44.4329668,26.08409));\n listOfpoints.get(22).add(new LatLng (44.4335797,26.0839613));\n listOfpoints.get(22).add(new LatLng (44.4337023,26.0821159));\n listOfpoints.get(22).add(new LatLng (44.4339474,26.0797556));\n listOfpoints.get(22).add(new LatLng (44.434499,26.078039));\n listOfpoints.get(22).add(new LatLng (44.4358473,26.0748632));\n listOfpoints.get(22).add(new LatLng (44.4351732,26.073962));\n listOfpoints.get(22).add(new LatLng (44.433212,26.0710867));\n listOfpoints.get(22).add(new LatLng (44.4312201,26.0683401));\n listOfpoints.get(22).add(new LatLng (44.4299329,26.067396));\n listOfpoints.get(22).add(new LatLng (44.4283087,26.0655506));\n listOfpoints.get(22).add(new LatLng (44.4274812,26.0668381));\n listOfpoints.get(22).add(new LatLng (44.4261633,26.0691984));\n listOfpoints.get(22).add(new LatLng (44.4249374,26.0715587));\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n\n\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n listOfpoints.get(23).add(new LatLng (44.4169069,26.0695417));\n listOfpoints.get(23).add(new LatLng (44.4131364,26.073447));\n listOfpoints.get(23).add(new LatLng (44.4139948,26.0749491));\n listOfpoints.get(23).add(new LatLng (44.4156807,26.0782106));\n listOfpoints.get(23).add(new LatLng (44.4178265,26.0819443));\n listOfpoints.get(23).add(new LatLng (44.4184089,26.0840471));\n listOfpoints.get(23).add(new LatLng (44.4213514,26.0900982));\n listOfpoints.get(23).add(new LatLng (44.4240486, 26.0903986));\n listOfpoints.get(23).add(new LatLng (44.424447,26.0897978));\n listOfpoints.get(23).add(new LatLng (44.4252132,26.0783394));\n listOfpoints.get(23).add(new LatLng (44.4236808, 26.0737474));\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n\n\n\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(24).add(new LatLng (44.442854,26.1011417));\n listOfpoints.get(24).add(new LatLng (44.4434668,26.1027725));\n listOfpoints.get(24).add(new LatLng (44.4430685, 26.1033304));\n listOfpoints.get(24).add(new LatLng (44.4430685,26.1047895));\n listOfpoints.get(24).add(new LatLng (44.4437732,26.1076648));\n listOfpoints.get(24).add(new LatLng (44.4446617,26.1085661));\n listOfpoints.get(24).add(new LatLng (44.4461629,26.1092956));\n listOfpoints.get(24).add(new LatLng (44.447174,26.1100252));\n listOfpoints.get(24).add(new LatLng (44.4473272,26.108609));\n listOfpoints.get(24).add(new LatLng (44.4480624,26.107064));\n listOfpoints.get(24).add(new LatLng (44.4480931,26.1060341));\n listOfpoints.get(24).add(new LatLng (44.4476948,26.1029871));\n listOfpoints.get(24).add(new LatLng (44.448522, 26.1028583));\n listOfpoints.get(24).add(new LatLng (44.4499006,26.102515));\n listOfpoints.get(24).add(new LatLng (44.4509729, 26.101485));\n listOfpoints.get(24).add(new LatLng (44.4529335,26.1007555));\n listOfpoints.get(24).add(new LatLng (44.452719,26.0935457));\n listOfpoints.get(24).add(new LatLng (44.4521063,26.0865934));\n listOfpoints.get(24).add(new LatLng (44.4506359,26.0897262));\n listOfpoints.get(24).add(new LatLng (44.4472046,26.0966785));\n listOfpoints.get(24).add(new LatLng (44.4465306,26.0971077));\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n\n\n listOfpoints.get(25).add(new LatLng (44.3944544,26.1201103));\n listOfpoints.get(25).add(new LatLng (44.3948837,26.1205394));\n listOfpoints.get(25).add(new LatLng (44.400587,26.1207969));\n listOfpoints.get(25).add(new LatLng (44.4069336,26.1209686));\n listOfpoints.get(25).add(new LatLng (44.4075468,26.1204536));\n listOfpoints.get(25).add(new LatLng (44.4081599,26.119252));\n listOfpoints.get(25).add(new LatLng (44.4083439, 26.1177499));\n listOfpoints.get(25).add(new LatLng (44.4084665, 26.1148317));\n listOfpoints.get(25).add(new LatLng (44.4090183,26.1131151));\n listOfpoints.get(25).add(new LatLng (44.4102139, 26.1109693));\n listOfpoints.get(25).add(new LatLng (44.411992,26.106549));\n listOfpoints.get(25).add(new LatLng (44.4128197, 26.105562));\n listOfpoints.get(25).add(new LatLng (44.4140152, 26.1047037));\n listOfpoints.get(25).add(new LatLng (44.4105512, 26.099468));\n listOfpoints.get(25).add(new LatLng (44.4088344, 26.0971077));\n listOfpoints.get(25).add(new LatLng (44.4074854,26.0960777));\n listOfpoints.get(25).add(new LatLng (44.4067803, 26.0957773));\n listOfpoints.get(25).add(new LatLng (44.4047262, 26.096936));\n listOfpoints.get(25).add(new LatLng (44.4024267, 26.098481));\n listOfpoints.get(25).add(new LatLng (44.4015068, 26.0996826));\n listOfpoints.get(25).add(new LatLng (44.3998818, 26.1055191));\n listOfpoints.get(25).add(new LatLng (44.3944544, 26.1201103));\n\n\n\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4526408,26.0898486));\n listOfpoints.get(26).add(new LatLng (44.4530697,26.0983887));\n listOfpoints.get(26).add(new LatLng (44.4558573,26.0971013));\n listOfpoints.get(26).add(new LatLng ( 44.4622592,26.0925522));\n listOfpoints.get(26).add(new LatLng ( 44.4635762, 26.0910073));\n listOfpoints.get(26).add(new LatLng (44.4658121,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4631474,26.0864153));\n listOfpoints.get(26).add(new LatLng (44.4534067,26.0861578));\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n\n\n\n listOfpoints.get(27).add(new LatLng (44.4346864, 26.0895482));\n listOfpoints.get(27).add(new LatLng (44.4398343, 26.0864583));\n listOfpoints.get(27).add(new LatLng (44.439865,26.0816947));\n listOfpoints.get(27).add(new LatLng (44.4420098,26.0807076));\n listOfpoints.get(27).add(new LatLng (44.4429903, 26.0808793));\n listOfpoints.get(27).add(new LatLng (44.4426532,26.0791626));\n listOfpoints.get(27).add(new LatLng (44.4405084, 26.0729399));\n listOfpoints.get(27).add(new LatLng (44.440202, 26.0727253));\n listOfpoints.get(27).add(new LatLng (44.4384555, 26.0702363));\n listOfpoints.get(27).add(new LatLng (44.4362186, 26.0744849));\n listOfpoints.get(27).add(new LatLng (44.4344413,26.0792914));\n listOfpoints.get(27).add(new LatLng (44.4346864,26.0895482));\n\n\n\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n listOfpoints.get(28).add(new LatLng (44.443061,26.0812143));\n listOfpoints.get(28).add(new LatLng (44.4437562,26.0855141));\n listOfpoints.get(28).add(new LatLng (44.4440626,26.0866299));\n listOfpoints.get(28).add(new LatLng (44.444798, 26.0884753));\n listOfpoints.get(28).add(new LatLng (44.4465443,26.0937539));\n listOfpoints.get(28).add(new LatLng (44.4468813,26.0958138));\n listOfpoints.get(28).add(new LatLng (44.4471264,26.0961142));\n listOfpoints.get(28).add(new LatLng (44.4492097, 26.0919943));\n listOfpoints.get(28).add(new LatLng (44.4507109,26.0889473));\n listOfpoints.get(28).add(new LatLng (44.4519056, 26.0864153));\n listOfpoints.get(28).add(new LatLng (44.4518137,26.0848275));\n listOfpoints.get(28).add(new LatLng (44.4481987, 26.0827246));\n listOfpoints.get(28).add(new LatLng (44.4455026,26.081523));\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n\n\n\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n listOfpoints.get(29).add(new LatLng (44.437967, 26.115168));\n listOfpoints.get(29).add(new LatLng (44.4410924, 26.131905));\n listOfpoints.get(29).add(new LatLng (44.4413375,26.1327204));\n listOfpoints.get(29).add(new LatLng (44.443758, 26.1284717));\n listOfpoints.get(29).add(new LatLng (44.4467299, 26.1259827));\n listOfpoints.get(29).add(new LatLng (44.4480167,26.1254248));\n listOfpoints.get(29).add(new LatLng (44.4491809, 26.124266));\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n\n\n listOfpoints.get(30).add(new LatLng (44.4129016,26.0735409));\n listOfpoints.get(30).add(new LatLng (44.4072915,26.0791628));\n listOfpoints.get(30).add(new LatLng (44.4031525,26.0816948));\n listOfpoints.get(30).add(new LatLng (44.4003317,26.0844414));\n listOfpoints.get(30).add(new LatLng (44.3973268,26.0850422));\n listOfpoints.get(30).add(new LatLng (44.4005463,26.0880463));\n listOfpoints.get(30).add(new LatLng (44.4017115, 26.0912221));\n listOfpoints.get(30).add(new LatLng (44.4043176,26.0963719));\n listOfpoints.get(30).add(new LatLng (44.4048695, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4060652,26.0956423));\n listOfpoints.get(30).add(new LatLng (44.4070462,26.0953848));\n listOfpoints.get(30).add(new LatLng (44.4084871, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4094682, 26.0951703));\n listOfpoints.get(30).add(new LatLng (44.4094375, 26.0944836));\n listOfpoints.get(30).add(new LatLng (44.4132388, 26.09178));\n listOfpoints.get(30).add(new LatLng (44.4145263, 26.091737));\n listOfpoints.get(30).add(new LatLng (44.4163656,26.0929387));\n listOfpoints.get(30).add(new LatLng (44.4183273,26.0930674));\n listOfpoints.get(30).add(new LatLng (44.4189404,26.0941832));\n listOfpoints.get(30).add(new LatLng (44.4212086, 26.0904067));\n listOfpoints.get(30).add(new LatLng (44.4210553,26.0898488));\n listOfpoints.get(30).add(new LatLng (44.4186339, 26.0850852));\n listOfpoints.get(30).add(new LatLng (44.4181741,26.0840123));\n listOfpoints.get(30).add(new LatLng (44.4176836, 26.0822527));\n listOfpoints.get(30).add(new LatLng (44.4171932,26.0813944));\n listOfpoints.get(30).add(new LatLng (44.4150781, 26.077575));\n listOfpoints.get(30).add(new LatLng (44.4129016, 26.0735409));\n\n\n\n listOfpoints.get(31).add(new LatLng (44.4152528, 26.1045537));\n listOfpoints.get(31).add(new LatLng (44.4142412, 26.1048541));\n listOfpoints.get(31).add(new LatLng (44.4125552,26.1062274));\n listOfpoints.get(31).add(new LatLng (44.4118501,26.1074291));\n listOfpoints.get(31).add(new LatLng (44.4107158,26.1103473));\n listOfpoints.get(31).add(new LatLng (44.4093976,26.1127935));\n listOfpoints.get(31).add(new LatLng (44.4087844, 26.1144243));\n listOfpoints.get(31).add(new LatLng (44.4085392, 26.1156259));\n listOfpoints.get(31).add(new LatLng (44.4085392,26.1170421));\n listOfpoints.get(31).add(new LatLng (44.4083246, 26.1195741));\n listOfpoints.get(31).add(new LatLng (44.4074355, 26.1209903));\n listOfpoints.get(31).add(new LatLng (44.409183, 26.1223636));\n listOfpoints.get(31).add(new LatLng (44.4168774, 26.1136518));\n listOfpoints.get(31).add(new LatLng (44.4158658, 26.1113344));\n listOfpoints.get(31).add(new LatLng (44.4156513, 26.1077295));\n listOfpoints.get(31).add(new LatLng (44.4152528,26.1045537));\n\n\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n listOfpoints.get(32).add(new LatLng (44.4164766, 26.114537));\n listOfpoints.get(32).add(new LatLng (44.4110201,26.120631));\n listOfpoints.get(32).add(new LatLng (44.4094872,26.122648));\n listOfpoints.get(32).add(new LatLng (44.4131046, 26.1296003));\n listOfpoints.get(32).add(new LatLng (44.4151891, 26.1329906));\n listOfpoints.get(32).add(new LatLng (44.4171203, 26.1348789));\n listOfpoints.get(32).add(new LatLng (44.4201242, 26.1365526));\n listOfpoints.get(32).add(new LatLng (44.4204001,26.1351364));\n listOfpoints.get(32).add(new LatLng (44.4206759, 26.1333339));\n listOfpoints.get(32).add(new LatLng (44.42181,26.1313169));\n listOfpoints.get(32).add(new LatLng (44.4228827, 26.1314028));\n listOfpoints.get(32).add(new LatLng (44.4255799, 26.1284845));\n listOfpoints.get(32).add(new LatLng (44.4256412, 26.1274975));\n listOfpoints.get(32).add(new LatLng (44.4257638, 26.1234634));\n listOfpoints.get(32).add(new LatLng (44.425917, 26.1195152));\n listOfpoints.get(32).add(new LatLng (44.4238635, 26.1194294));\n listOfpoints.get(32).add(new LatLng (44.4193273,26.115567));\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n\n\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n listOfpoints.get(33).add(new LatLng (44.4255799,26.1284845));\n listOfpoints.get(33).add(new LatLng (44.4318104,26.1386596));\n listOfpoints.get(33).add(new LatLng (44.4320863,26.1385309));\n listOfpoints.get(33).add(new LatLng (44.4313814,26.1329948));\n listOfpoints.get(33).add(new LatLng (44.4316879,26.129819));\n listOfpoints.get(33).add(new LatLng (44.4326992,26.1229526));\n listOfpoints.get(33).add(new LatLng (44.4328861,26.1207289));\n listOfpoints.get(33).add(new LatLng (44.4300024, 26.1205493));\n listOfpoints.get(33).add(new LatLng (44.4288684,26.1196481));\n listOfpoints.get(33).add(new LatLng (44.4275797,26.1191541));\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n\n\n listOfpoints.get(34).add(new LatLng (44.4202782, 26.1364709));\n listOfpoints.get(34).add(new LatLng (44.4204314,26.1366855));\n listOfpoints.get(34).add(new LatLng (44.4255806,26.1375009));\n listOfpoints.get(34).add(new LatLng (44.4293579,26.1390888));\n listOfpoints.get(34).add(new LatLng (44.4303615,26.139196));\n listOfpoints.get(34).add(new LatLng (44.4317406,26.1386596));\n listOfpoints.get(34).add(new LatLng (44.4266686,26.1303877));\n listOfpoints.get(34).add(new LatLng (44.4255882,26.128596));\n listOfpoints.get(34).add(new LatLng (44.4250212,26.1291968));\n listOfpoints.get(34).add(new LatLng (44.4230214, 26.1315571));\n listOfpoints.get(34).add(new LatLng (44.4227685,26.1316644));\n listOfpoints.get(34).add(new LatLng (44.4217877,26.1315678));\n listOfpoints.get(34).add(new LatLng (44.4207762,26.1334668));\n listOfpoints.get(34).add(new LatLng (44.4202782,26.1364709));\n\n\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n listOfpoints.get(35).add(new LatLng (44.4437985,26.1194425));\n listOfpoints.get(35).add(new LatLng (44.4469926,26.1222749));\n listOfpoints.get(35).add(new LatLng (44.4492443, 26.1240881));\n listOfpoints.get(35).add(new LatLng (44.4504315,26.123144));\n listOfpoints.get(35).add(new LatLng (44.4512893,26.1217492));\n listOfpoints.get(35).add(new LatLng (44.451421, 26.1212347));\n listOfpoints.get(35).add(new LatLng (44.4523401, 26.1180161));\n listOfpoints.get(35).add(new LatLng (44.4527077, 26.1145399));\n listOfpoints.get(35).add(new LatLng (44.452944, 26.1009052));\n listOfpoints.get(35).add(new LatLng (44.4516573,26.1013558));\n listOfpoints.get(35).add(new LatLng (44.4510217,26.1016777));\n listOfpoints.get(35).add(new LatLng (44.4500413,26.1025574));\n listOfpoints.get(35).add(new LatLng (44.449712,26.1027291));\n listOfpoints.get(35).add(new LatLng (44.4477666,26.1031153));\n listOfpoints.get(35).add(new LatLng (44.4479198,26.1042526));\n listOfpoints.get(35).add(new LatLng (44.448027,26.1051967));\n listOfpoints.get(35).add(new LatLng (44.4481419,26.1058619));\n listOfpoints.get(35).add(new LatLng (44.4481189, 26.1070206));\n listOfpoints.get(35).add(new LatLng (44.448004,26.1073425));\n listOfpoints.get(35).add(new LatLng (44.4473836,26.1088338));\n listOfpoints.get(35).add(new LatLng (44.4472917,26.1100569));\n listOfpoints.get(35).add(new LatLng (44.4471385, 26.1102929));\n listOfpoints.get(35).add(new LatLng (44.4469241,26.1116877));\n listOfpoints.get(35).add(new LatLng (44.4469394,26.1122456));\n listOfpoints.get(35).add(new LatLng (44.4467403,26.1136403));\n listOfpoints.get(35).add(new LatLng (44.445959,26.1161938));\n listOfpoints.get(35).add(new LatLng (44.4448254,26.1176744));\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n\n\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n listOfpoints.get(36).add(new LatLng (44.4372662,26.123983));\n listOfpoints.get(36).add(new LatLng (44.4356115, 26.1252275));\n listOfpoints.get(36).add(new LatLng (44.4344471, 26.1254207));\n listOfpoints.get(36).add(new LatLng (44.4324705,26.1258069));\n listOfpoints.get(36).add(new LatLng (44.4315052, 26.1327377));\n listOfpoints.get(36).add(new LatLng (44.432256,26.1385742));\n listOfpoints.get(36).add(new LatLng (44.4351059,26.1373511));\n listOfpoints.get(36).add(new LatLng (44.4376339, 26.1363641));\n listOfpoints.get(36).add(new LatLng (44.4389822, 26.1353985));\n listOfpoints.get(36).add(new LatLng (44.4401772,26.1345402));\n listOfpoints.get(36).add(new LatLng (44.4411883, 26.1334458));\n listOfpoints.get(36).add(new LatLng (44.4402231, 26.1281458));\n listOfpoints.get(36).add(new LatLng (44.4398861,26.126279));\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n\n\n\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n listOfpoints.get(37).add(new LatLng (44.3977135, 26.1097995));\n listOfpoints.get(37).add(new LatLng (44.3909519,26.1099282));\n listOfpoints.get(37).add(new LatLng (44.3874558, 26.1100784));\n listOfpoints.get(37).add(new LatLng (44.3877779, 26.1129538));\n listOfpoints.get(37).add(new LatLng (44.3881766, 26.1154428));\n listOfpoints.get(37).add(new LatLng (44.3886059, 26.1165586));\n listOfpoints.get(37).add(new LatLng (44.3894799, 26.1180178));\n listOfpoints.get(37).add(new LatLng (44.3906606, 26.1193052));\n listOfpoints.get(37).add(new LatLng (44.3927152, 26.1205927));\n listOfpoints.get(37).add(new LatLng (44.3936352, 26.1206785));\n listOfpoints.get(37).add(new LatLng (44.3940339, 26.1202279));\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n\n\n\n listOfpoints.get(38).add(new LatLng (44.389256,26.0917973));\n listOfpoints.get(38).add(new LatLng (44.3892556,26.0920523));\n listOfpoints.get(38).add(new LatLng (44.4003643, 26.0970731));\n listOfpoints.get(38).add(new LatLng (44.4008548, 26.0971482));\n listOfpoints.get(38).add(new LatLng (44.4030625, 26.0971601));\n listOfpoints.get(38).add(new LatLng (44.4043195,26.0965593));\n listOfpoints.get(38).add(new LatLng (44.4019587, 26.0920531));\n listOfpoints.get(38).add(new LatLng (44.4005636,26.0883195));\n listOfpoints.get(38).add(new LatLng (44.3987104,26.0864919));\n listOfpoints.get(38).add(new LatLng (44.3972443, 26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3961557,26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3946992,26.0841584));\n listOfpoints.get(38).add(new LatLng (44.3918473,26.0856819));\n listOfpoints.get(38).add(new LatLng (44.3912493,26.08639));\n listOfpoints.get(38).add(new LatLng (44.389256, 26.0917973));\n\n\n\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n listOfpoints.get(39).add(new LatLng (44.4011008,26.0974224));\n listOfpoints.get(39).add(new LatLng (44.399997,26.0972078));\n listOfpoints.get(39).add(new LatLng (44.389065,26.0922189));\n listOfpoints.get(39).add(new LatLng (44.3863339,26.0922418));\n listOfpoints.get(39).add(new LatLng (44.387806,26.0981212));\n listOfpoints.get(39).add(new LatLng (44.3887261,26.1004386));\n listOfpoints.get(39).add(new LatLng (44.3889714,26.1023269));\n listOfpoints.get(39).add(new LatLng (44.3887567,26.1040435));\n listOfpoints.get(39).add(new LatLng (44.3875607,26.1097513));\n listOfpoints.get(39).add(new LatLng (44.3977341,26.1097306));\n listOfpoints.get(39).add(new LatLng (44.3979142,26.1101973));\n listOfpoints.get(39).add(new LatLng (44.397964,26.1101222));\n listOfpoints.get(39).add(new LatLng (44.3996198,26.1059165));\n listOfpoints.get(39).add(new LatLng (44.4016128,26.0990715));\n listOfpoints.get(39).add(new LatLng (44.4030402,26.0978593));\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n\n\n\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n listOfpoints.get(40).add(new LatLng (44.4494277,26.1245701));\n listOfpoints.get(40).add(new LatLng (44.4610682, 26.1325953));\n listOfpoints.get(40).add(new LatLng (44.4618646,26.1326811));\n listOfpoints.get(40).add(new LatLng (44.4644374, 26.1345265));\n listOfpoints.get(40).add(new LatLng (44.4660607, 26.1368439));\n listOfpoints.get(40).add(new LatLng (44.4665813,26.1365435));\n listOfpoints.get(40).add(new LatLng (44.4663976,26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4667345, 26.1349985));\n listOfpoints.get(40).add(new LatLng (44.4681739, 26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4701952, 26.1371014));\n listOfpoints.get(40).add(new LatLng (44.4719714, 26.1368868));\n listOfpoints.get(40).add(new LatLng (44.4730739, 26.1358998));\n listOfpoints.get(40).add(new LatLng (44.4731964,26.1346981));\n listOfpoints.get(40).add(new LatLng (44.4687252,26.1305783));\n listOfpoints.get(40).add(new LatLng (44.466857,26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4662751, 26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4658769, 26.1300633));\n listOfpoints.get(40).add(new LatLng (44.4666426, 26.129162));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1285183));\n listOfpoints.get(40).add(new LatLng (44.4697971, 26.1290333));\n listOfpoints.get(40).add(new LatLng (44.4723389, 26.1319945));\n listOfpoints.get(40).add(new LatLng (44.4743294,26.1327669));\n listOfpoints.get(40).add(new LatLng (44.4750338,26.1320374));\n listOfpoints.get(40).add(new LatLng (44.4756462,26.1297199));\n listOfpoints.get(40).add(new LatLng (44.4742376,26.1249563));\n listOfpoints.get(40).add(new LatLng (44.4742988, 26.1238835));\n listOfpoints.get(40).add(new LatLng (44.4741457,26.1231968));\n listOfpoints.get(40).add(new LatLng (44.4676533,26.1269734));\n listOfpoints.get(40).add(new LatLng (44.4668876,26.1267588));\n listOfpoints.get(40).add(new LatLng (44.4649275,26.1207506));\n listOfpoints.get(40).add(new LatLng (44.4648662,26.120064));\n listOfpoints.get(40).add(new LatLng (44.4674389,26.118562));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1177895));\n listOfpoints.get(40).add(new LatLng (44.4710833,26.1160729));\n listOfpoints.get(40).add(new LatLng (44.4714202,26.1163304));\n listOfpoints.get(40).add(new LatLng (44.4722777,26.116502));\n listOfpoints.get(40).add(new LatLng (44.4729208,26.1131117));\n listOfpoints.get(40).add(new LatLng (44.4723083,26.1107084));\n listOfpoints.get(40).add(new LatLng (44.4725227,26.1095926));\n listOfpoints.get(40).add(new LatLng (44.4733801,26.1087343));\n listOfpoints.get(40).add(new LatLng (44.4735945, 26.1082194));\n listOfpoints.get(40).add(new LatLng (44.4700727,26.1101076));\n listOfpoints.get(40).add(new LatLng (44.4533184,26.1047861));\n listOfpoints.get(40).add(new LatLng (44.4531039,26.105344));\n listOfpoints.get(40).add(new LatLng (44.4528589,26.1152146));\n listOfpoints.get(40).add(new LatLng (44.4526138,26.1174891));\n listOfpoints.get(40).add(new LatLng (44.452093,26.1197207));\n listOfpoints.get(40).add(new LatLng (44.4508982,26.1229822));\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n\n\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n listOfpoints.get(41).add(new LatLng (44.4550165,26.1051764));\n listOfpoints.get(41).add(new LatLng (44.4698103,26.1097469));\n listOfpoints.get(41).add(new LatLng (44.4709588,26.1093392));\n listOfpoints.get(41).add(new LatLng (44.4739216,26.1077299));\n listOfpoints.get(41).add(new LatLng (44.4734929,26.1050262));\n listOfpoints.get(41).add(new LatLng (44.4721455,26.105155));\n listOfpoints.get(41).add(new LatLng (44.4701242,26.1040392));\n listOfpoints.get(41).add(new LatLng (44.467521, 26.101593));\n listOfpoints.get(41).add(new LatLng (44.4673067, 26.1001768));\n listOfpoints.get(41).add(new LatLng (44.4664185,26.099061));\n listOfpoints.get(41).add(new LatLng (44.4660816,26.0979023));\n listOfpoints.get(41).add(new LatLng (44.4662041,26.0968294));\n listOfpoints.get(41).add(new LatLng (44.4671535,26.0960569));\n listOfpoints.get(41).add(new LatLng (44.4677661,26.0958853));\n listOfpoints.get(41).add(new LatLng (44.4680723,26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4691748,26.0952415));\n listOfpoints.get(41).add(new LatLng (44.4720536,26.0967865));\n listOfpoints.get(41).add(new LatLng (44.4742278,26.0964861));\n listOfpoints.get(41).add(new LatLng (44.4749015, 26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4747178,26.0948124));\n listOfpoints.get(41).add(new LatLng (44.4719617,26.0923662));\n listOfpoints.get(41).add(new LatLng (44.4714717,26.0908642));\n listOfpoints.get(41).add(new LatLng (44.4717167,26.0897913));\n listOfpoints.get(41).add(new LatLng (44.4723598,26.0888901));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0894909));\n listOfpoints.get(41).add(new LatLng (44.4732785,26.0900917));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0907783));\n listOfpoints.get(41).add(new LatLng (44.4735235,26.0912075));\n listOfpoints.get(41).add(new LatLng (44.4740135,26.0907354));\n listOfpoints.get(41).add(new LatLng (44.4734316,26.0891046));\n listOfpoints.get(41).add(new LatLng (44.4724211,26.0881176));\n listOfpoints.get(41).add(new LatLng (44.4661428,26.0866585));\n listOfpoints.get(41).add(new LatLng (44.4639989,26.09095));\n listOfpoints.get(41).add(new LatLng (44.4621305,26.0931387));\n listOfpoints.get(41).add(new LatLng (44.4558053,26.0973375));\n listOfpoints.get(41).add(new LatLng (44.4531632,26.0985928));\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n\n\n\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n listOfpoints.get(42).add(new LatLng (44.4404676, 26.072638));\n listOfpoints.get(42).add(new LatLng (44.4426125, 26.0786676));\n listOfpoints.get(42).add(new LatLng (44.4427656, 26.0791182));\n listOfpoints.get(42).add(new LatLng (44.4429801, 26.0806202));\n listOfpoints.get(42).add(new LatLng (44.4461972, 26.0758781));\n listOfpoints.get(42).add(new LatLng ( 44.4465955, 26.0753846));\n listOfpoints.get(42).add(new LatLng ( 44.4468405, 26.0753202));\n listOfpoints.get(42).add(new LatLng (44.4474227, 26.0759639));\n listOfpoints.get(42).add(new LatLng (44.4501186, 26.0695052));\n listOfpoints.get(42).add(new LatLng ( 44.4472848, 26.063776));\n listOfpoints.get(42).add(new LatLng ( 44.4461972,26.0623597));\n listOfpoints.get(42).add(new LatLng (44.4454925, 26.0618233));\n listOfpoints.get(42).add(new LatLng ( 44.4442057,26.0612654));\n listOfpoints.get(42).add(new LatLng (44.4432099,26.0609435));\n listOfpoints.get(42).add(new LatLng ( 44.4429035,26.062467));\n listOfpoints.get(42).add(new LatLng (44.4385679, 26.0699558));\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n\n\n\n listOfpoints.get(43).add(new LatLng ( 44.4430787,26.0806953));\n listOfpoints.get(43).add(new LatLng ( 44.443126, 26.0810753));\n listOfpoints.get(43).add(new LatLng ( 44.4455924,26.0813757));\n listOfpoints.get(43).add(new LatLng (44.4467107,26.0816761));\n listOfpoints.get(43).add(new LatLng (44.4514593,26.0842939));\n listOfpoints.get(43).add(new LatLng (44.4518575,26.0844441));\n listOfpoints.get(43).add(new LatLng (44.4519188,26.0818906));\n listOfpoints.get(43).add(new LatLng (44.4520107,26.0813971));\n listOfpoints.get(43).add(new LatLng (44.452026,26.0767193));\n listOfpoints.get(43).add(new LatLng (44.4527, 26.0732861));\n listOfpoints.get(43).add(new LatLng ( 44.4511682,26.0706039));\n listOfpoints.get(43).add(new LatLng (44.4503219, 26.069692));\n listOfpoints.get(43).add(new LatLng (44.4502719,26.0698017));\n listOfpoints.get(43).add(new LatLng (44.4475595, 26.0760068));\n listOfpoints.get(43).add(new LatLng (44.447414, 26.0761356));\n listOfpoints.get(43).add(new LatLng (44.4468242, 26.0754811));\n listOfpoints.get(43).add(new LatLng (44.4465485, 26.0755562));\n listOfpoints.get(43).add(new LatLng (44.4462728, 26.0759746));\n listOfpoints.get(43).add(new LatLng (44.4430787,26.0806953));\n\n\n\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n listOfpoints.get(44).add(new LatLng (44.4299706,26.0672689));\n listOfpoints.get(44).add(new LatLng (44.431342,26.068213));\n listOfpoints.get(44).add(new LatLng (44.4358314, 26.0745752));\n listOfpoints.get(44).add(new LatLng (44.4382828,26.0698974));\n listOfpoints.get(44).add(new LatLng (44.4353105,26.0630095));\n listOfpoints.get(44).add(new LatLng (44.435096,26.0616792));\n listOfpoints.get(44).add(new LatLng (44.4344678, 26.0595763));\n listOfpoints.get(44).add(new LatLng (44.4320315, 26.0595334));\n listOfpoints.get(44).add(new LatLng (44.4316178, 26.0600913));\n listOfpoints.get(44).add(new LatLng (44.4291968, 26.0639));\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n\n\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n listOfpoints.get(45).add(new LatLng (44.441285, 26.1333359));\n listOfpoints.get(45).add(new LatLng (44.4414535,26.1345376));\n listOfpoints.get(45).add(new LatLng (44.4428936,26.1475195));\n listOfpoints.get(45).add(new LatLng (44.443154,26.1493863));\n listOfpoints.get(45).add(new LatLng (44.4434451, 26.149794));\n listOfpoints.get(45).add(new LatLng (44.4437515,26.1497082));\n listOfpoints.get(45).add(new LatLng (44.4445175,26.1494721));\n listOfpoints.get(45).add(new LatLng (44.4454979,26.1488713));\n listOfpoints.get(45).add(new LatLng (44.4459574,26.1481847));\n listOfpoints.get(45).add(new LatLng (44.447091,26.147262));\n listOfpoints.get(45).add(new LatLng (44.448148,26.1456527));\n listOfpoints.get(45).add(new LatLng (44.4520847, 26.1353101));\n listOfpoints.get(45).add(new LatLng (44.4529577,26.1321129));\n listOfpoints.get(45).add(new LatLng (44.4531262,26.1316623));\n listOfpoints.get(45).add(new LatLng (44.4536776, 26.1311473));\n listOfpoints.get(45).add(new LatLng (44.4547192, 26.1298813));\n listOfpoints.get(45).add(new LatLng (44.455148,26.1288513));\n listOfpoints.get(45).add(new LatLng (44.449833, 26.1251177));\n listOfpoints.get(45).add(new LatLng (44.4491437, 26.12471));\n listOfpoints.get(45).add(new LatLng (44.4477038,26.1259545));\n listOfpoints.get(45).add(new LatLng (44.4462332, 26.1266841));\n listOfpoints.get(45).add(new LatLng (44.4447013, 26.1279501));\n listOfpoints.get(45).add(new LatLng (44.4436596, 26.129259));\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n\n\n\n listOfpoints.get(46).add(new LatLng (44.4322314,26.1388506));\n listOfpoints.get(46).add(new LatLng (44.4335155,26.1535014));\n listOfpoints.get(46).add(new LatLng (44.4338066,26.1552395));\n listOfpoints.get(46).add(new LatLng (44.434971,26.1596598));\n listOfpoints.get(46).add(new LatLng (44.4350966, 26.1598576));\n listOfpoints.get(46).add(new LatLng (44.4421748,26.1571969));\n listOfpoints.get(46).add(new LatLng (44.4425731, 26.1570252));\n listOfpoints.get(46).add(new LatLng (44.4429102, 26.1561669));\n listOfpoints.get(46).add(new LatLng (44.443477, 26.1502231));\n listOfpoints.get(46).add(new LatLng (44.4429255, 26.1494077));\n listOfpoints.get(46).add(new LatLng (44.442328, 26.144215));\n listOfpoints.get(46).add(new LatLng (44.4418837, 26.1404384));\n listOfpoints.get(46).add(new LatLng (44.4412556, 26.1349882));\n listOfpoints.get(46).add(new LatLng (44.4411331, 26.1338295));\n listOfpoints.get(46).add(new LatLng (44.4406428,26.1344732));\n listOfpoints.get(46).add(new LatLng (44.4388656, 26.1357821));\n listOfpoints.get(46).add(new LatLng (44.4374868, 26.1367048));\n listOfpoints.get(46).add(new LatLng (44.4350813, 26.137606));\n listOfpoints.get(46).add(new LatLng (44.4322314, 26.1388506));\n\n\n\n listOfpoints.get(47).add(new LatLng (44.4202257, 26.1368063));\n listOfpoints.get(47).add(new LatLng (44.4179627,26.1463187));\n listOfpoints.get(47).add(new LatLng (44.4227749, 26.149709));\n listOfpoints.get(47).add(new LatLng (44.4231734, 26.1503527));\n listOfpoints.get(47).add(new LatLng (44.4237251, 26.1504386));\n listOfpoints.get(47).add(new LatLng (44.4261157, 26.1495373));\n listOfpoints.get(47).add(new LatLng (44.4262996, 26.1508463));\n listOfpoints.get(47).add(new LatLng (44.4268206, 26.1524341));\n listOfpoints.get(47).add(new LatLng (44.4283937, 26.1547449));\n listOfpoints.get(47).add(new LatLng (44.433251, 26.1534574));\n listOfpoints.get(47).add(new LatLng (44.4320712, 26.1388662));\n listOfpoints.get(47).add(new LatLng (44.430401,26.139467));\n listOfpoints.get(47).add(new LatLng (44.4295736, 26.1393812));\n listOfpoints.get(47).add(new LatLng (44.4254668, 26.137686));\n listOfpoints.get(47).add(new LatLng (44.4241642,26.1374929));\n listOfpoints.get(47).add(new LatLng (44.4202257,26.1368063));\n\n\n\n listOfpoints.get(48).add(new LatLng (44.4234516,26.1510693));\n listOfpoints.get(48).add(new LatLng (44.425076, 26.1630856));\n listOfpoints.get(48).add(new LatLng (44.4292135,26.1619484));\n listOfpoints.get(48).add(new LatLng(44.4286618, 26.1578285));\n listOfpoints.get(48).add(new LatLng (44.4287078,26.156026));\n listOfpoints.get(48).add(new LatLng (44.4286925,26.1557042));\n listOfpoints.get(48).add(new LatLng (44.4269762, 26.1532151));\n listOfpoints.get(48).add(new LatLng (44.4262407, 26.151713));\n listOfpoints.get(48).add(new LatLng (44.4259189, 26.1499535));\n listOfpoints.get(48).add(new LatLng (44.4237122, 26.1506402));\n listOfpoints.get(48).add(new LatLng (44.4234516, 26.1510693));\n\n\n\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n listOfpoints.get(49).add(new LatLng (44.4286925, 26.1557042));\n listOfpoints.get(49).add(new LatLng (44.4287964, 26.1580645));\n listOfpoints.get(49).add(new LatLng (44.4290876, 26.1602317));\n listOfpoints.get(49).add(new LatLng (44.4302981,26.1670124));\n listOfpoints.get(49).add(new LatLng (44.4357222, 26.1692654));\n listOfpoints.get(49).add(new LatLng (44.4362584,26.1689865));\n listOfpoints.get(49).add(new LatLng (44.4366108, 26.1683857));\n listOfpoints.get(49).add(new LatLng (44.4367794,26.1675274));\n listOfpoints.get(49).add(new LatLng (44.433332, 26.1536442));\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n\n\n\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.14650));\n listOfpoints.get(50).add(new LatLng (44.4142265, 26.15554));\n listOfpoints.get(50).add(new LatLng (44.41369, 26.1578359));\n listOfpoints.get(50).add(new LatLng (44.4131842,26.1635008));\n listOfpoints.get(50).add(new LatLng (44.4133221, 26.1636295));\n listOfpoints.get(50).add(new LatLng (44.4154679, 26.1645951));\n listOfpoints.get(50).add(new LatLng (44.4169393, 26.1648526));\n listOfpoints.get(50).add(new LatLng (44.4181654, 26.1648097));\n listOfpoints.get(50).add(new LatLng (44.420403, 26.1642732));\n listOfpoints.get(50).add(new LatLng (44.4248319, 26.1631574));\n listOfpoints.get(50).add(new LatLng (44.4232688, 26.151227));\n listOfpoints.get(50).add(new LatLng (44.4226558, 26.1500253));\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.1465063));\n\n\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n listOfpoints.get(51).add(new LatLng (44.4079354,26.1261736));\n listOfpoints.get(51).add(new LatLng (44.3993506, 26.1595188));\n listOfpoints.get(51).add(new LatLng (44.4000559,26.1602484));\n listOfpoints.get(51).add(new LatLng (44.407077,26.1638962));\n listOfpoints.get(51).add(new LatLng (44.4081807, 26.1641108));\n listOfpoints.get(51).add(new LatLng (44.4091004, 26.1638104));\n listOfpoints.get(51).add(new LatLng (44.4114916, 26.162995));\n listOfpoints.get(51).add(new LatLng (44.4129018, 26.16351));\n listOfpoints.get(51).add(new LatLng (44.413147, 26.1608063));\n listOfpoints.get(51).add(new LatLng (44.4135762, 26.1567723));\n listOfpoints.get(51).add(new LatLng (44.4148943, 26.1529957));\n listOfpoints.get(51).add(new LatLng (44.4176838,26.1461722));\n listOfpoints.get(51).add(new LatLng (44.4183121,26.1435329));\n listOfpoints.get(51).add(new LatLng (44.4200133, 26.1367523));\n listOfpoints.get(51).add(new LatLng (44.4175152,26.1354433));\n listOfpoints.get(51).add(new LatLng (44.4159825, 26.1342417));\n listOfpoints.get(51).add(new LatLng (44.4146031,26.1324822));\n listOfpoints.get(51).add(new LatLng (44.4113383,26.1266242));\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n\n\n listOfpoints.get(52).add(new LatLng (44.3988714,26.159323));\n listOfpoints.get(52).add(new LatLng (44.4079468,26.1248191));\n listOfpoints.get(52).add(new LatLng (44.4088665, 26.1225875));\n listOfpoints.get(52).add(new LatLng (44.4080694,26.1217721));\n listOfpoints.get(52).add(new LatLng (44.4065059,26.1213858));\n listOfpoints.get(52).add(new LatLng (44.3941185, 26.120785));\n listOfpoints.get(52).add(new LatLng (44.3862678, 26.1391528));\n listOfpoints.get(52).add(new LatLng (44.3887826,26.1415131));\n listOfpoints.get(52).add(new LatLng (44.3886293, 26.1448605));\n listOfpoints.get(52).add(new LatLng (44.3891813, 26.1464484));\n listOfpoints.get(52).add(new LatLng (44.389304, 26.1472209));\n listOfpoints.get(52).add(new LatLng (44.3927079, 26.155761));\n listOfpoints.get(52).add(new LatLng (44.3941492, 26.1572631));\n listOfpoints.get(52).add(new LatLng (44.3985648, 26.16031));\n listOfpoints.get(52).add(new LatLng (44.3988714, 26.159323));\n\n\n\n listOfpoints.get(53).add(new LatLng (44.3886499, 26.1177499));\n listOfpoints.get(53).add(new LatLng (44.3892939, 26.1179645));\n listOfpoints.get(53).add(new LatLng (44.3881592, 26.1159046));\n listOfpoints.get(53).add(new LatLng (44.3876838,26.1132224));\n listOfpoints.get(53).add(new LatLng (44.3873311, 26.1100895));\n listOfpoints.get(53).add(new LatLng (44.3887879, 26.1032445));\n listOfpoints.get(53).add(new LatLng (44.3888645, 26.1022789));\n listOfpoints.get(53).add(new LatLng (44.3886192, 26.1005838));\n listOfpoints.get(53).add(new LatLng (44.3883738,26.0998542));\n listOfpoints.get(53).add(new LatLng (44.3876225,26.097923));\n listOfpoints.get(53).add(new LatLng (44.3869478, 26.0954554));\n listOfpoints.get(53).add(new LatLng (44.3862577, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3860584, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3789427, 26.0917003));\n listOfpoints.get(53).add(new LatLng (44.3757526,26.1157758));\n listOfpoints.get(53).add(new LatLng (44.375998,26.1173208));\n listOfpoints.get(53).add(new LatLng (44.3765195,26.1189945));\n listOfpoints.get(53).add(new LatLng (44.3769183,26.1194665));\n listOfpoints.get(53).add(new LatLng (44.3775624, 26.1194236));\n listOfpoints.get(53).add(new LatLng (44.3786973,26.1184366));\n listOfpoints.get(53).add(new LatLng (44.3824393,26.1150248));\n listOfpoints.get(53).add(new LatLng (44.3831447, 26.114939));\n listOfpoints.get(53).add(new LatLng (44.3840802, 26.1151106));\n listOfpoints.get(53).add(new LatLng (44.3879598, 26.1175568));\n listOfpoints.get(53).add(new LatLng (44.3886499,26.1177499));\n\n\n listOfpoints.get(54).add(new LatLng ( 44.3939843, 26.1207857));\n listOfpoints.get(54).add(new LatLng (44.3928679,26.120861));\n listOfpoints.get(54).add(new LatLng (44.3916643, 26.1202602));\n listOfpoints.get(54).add(new LatLng (44.3901386, 26.1189727));\n listOfpoints.get(54).add(new LatLng (44.3894869, 26.1181573));\n listOfpoints.get(54).add(new LatLng (44.3881836, 26.1178784));\n listOfpoints.get(54).add(new LatLng (44.3839589, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3830541, 26.1151318));\n listOfpoints.get(54).add(new LatLng (44.382479, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3814899, 26.1160544));\n listOfpoints.get(54).add(new LatLng (44.3792585,26.1181466));\n listOfpoints.get(54).add(new LatLng (44.3765793, 26.1204638));\n listOfpoints.get(54).add(new LatLng (44.3792479, 26.1275449));\n listOfpoints.get(54).add(new LatLng (44.379524,26.135098));\n listOfpoints.get(54).add(new LatLng (44.3856888, 26.1398616));\n listOfpoints.get(54).add(new LatLng (44.3939843,26.1207857));\n\n\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n listOfpoints.get(55).add(new LatLng (44.3767422, 26.0507223));\n listOfpoints.get(55).add(new LatLng (44.3901146,26.0632536));\n listOfpoints.get(55).add(new LatLng (44.4006018,26.0712359));\n listOfpoints.get(55).add(new LatLng (44.4064272, 26.0638544));\n listOfpoints.get(55).add(new LatLng (44.4054461,26.0626528));\n listOfpoints.get(55).add(new LatLng (44.3997432, 26.0485766));\n listOfpoints.get(55).add(new LatLng (44.3817726,26.0459158));\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n\n\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n listOfpoints.get(56).add(new LatLng (44.4007746, 26.0715552));\n listOfpoints.get(56).add(new LatLng (44.3971564,26.0688944));\n listOfpoints.get(56).add(new LatLng (44.3905634, 26.0639591));\n listOfpoints.get(56).add(new LatLng (44.3862699, 26.078207));\n listOfpoints.get(56).add(new LatLng (44.38124,26.0855027));\n listOfpoints.get(56).add(new LatLng (44.3802585, 26.0858031));\n listOfpoints.get(56).add(new LatLng (44.3797064, 26.0867901));\n listOfpoints.get(56).add(new LatLng (44.3790009,26.091425));\n listOfpoints.get(56).add(new LatLng (44.3848591,26.091897));\n listOfpoints.get(56).add(new LatLng (44.3890301,26.0918541));\n listOfpoints.get(56).add(new LatLng (44.3909928, 26.0865755));\n listOfpoints.get(56).add(new LatLng (44.3915141,26.0856314));\n listOfpoints.get(56).add(new LatLng (44.3946727, 26.0839608));\n listOfpoints.get(56).add(new LatLng (44.3961445,26.0850122));\n listOfpoints.get(56).add(new LatLng (44.3967425,26.0849907));\n listOfpoints.get(56).add(new LatLng (44.4002074, 26.0843041));\n listOfpoints.get(56).add(new LatLng (44.4029362, 26.0816648));\n listOfpoints.get(56).add(new LatLng (44.4055576,26.0799267));\n listOfpoints.get(56).add(new LatLng (44.4070752,26.0791113));\n listOfpoints.get(56).add(new LatLng (44.4130379,26.0732319));\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n\n\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n listOfpoints.get(57).add(new LatLng (44.4056207, 26.0623124));\n listOfpoints.get(57).add(new LatLng (44.4131623,26.0729554));\n listOfpoints.get(57).add(new LatLng (44.4204884,26.0654452));\n listOfpoints.get(57).add(new LatLng (44.4181895,26.0583212));\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n\n\n listOfpoints.get(58).add(new LatLng (44.414413, 26.0354062));\n listOfpoints.get(58).add(new LatLng (44.415394, 26.0475512));\n listOfpoints.get(58).add(new LatLng (44.4158231,26.0502978));\n listOfpoints.get(58).add(new LatLng (44.4181221,26.0576363));\n listOfpoints.get(58).add(new LatLng (44.4207888, 26.0658331));\n listOfpoints.get(58).add(new LatLng (44.4237005, 26.0731287));\n listOfpoints.get(58).add(new LatLng (44.4298608,26.0624857));\n listOfpoints.get(58).add(new LatLng (44.4293091,26.0617562));\n listOfpoints.get(58).add(new LatLng (44.4290027,26.0610266));\n listOfpoints.get(58).add(new LatLng (44.4275316, 26.0600825));\n listOfpoints.get(58).add(new LatLng (44.426275, 26.0585375));\n listOfpoints.get(58).add(new LatLng (44.4259379,26.0566922));\n listOfpoints.get(58).add(new LatLng (44.4253862, 26.0520573));\n listOfpoints.get(58).add(new LatLng (44.4242829,26.0473366));\n listOfpoints.get(58).add(new LatLng (44.4229037,26.0406847));\n listOfpoints.get(58).add(new LatLng (44.4221374,26.0347624));\n listOfpoints.get(58).add(new LatLng (44.4165281,26.0346766));\n listOfpoints.get(58).add(new LatLng (44.414413,26.0354062));\n\n\n listOfpoints.get(59).add(new LatLng (44.4224216, 26.0344395));\n listOfpoints.get(59).add(new LatLng (44.422437, 26.0360274));\n listOfpoints.get(59).add(new LatLng (44.423004,26.040276));\n listOfpoints.get(59).add(new LatLng (44.4255632,26.0522065));\n listOfpoints.get(59).add(new LatLng (44.4259156,26.055468));\n listOfpoints.get(59).add(new LatLng (44.42636,26.0583219));\n listOfpoints.get(59).add(new LatLng (44.4274787,26.059781));\n listOfpoints.get(59).add(new LatLng (44.4290264, 26.0608325));\n listOfpoints.get(59).add(new LatLng (44.4293328,26.0616264));\n listOfpoints.get(59).add(new LatLng (44.4299764,26.0623989));\n listOfpoints.get(59).add(new LatLng (44.4319071,26.0594162));\n listOfpoints.get(59).add(new LatLng (44.4345885, 26.0593948));\n listOfpoints.get(59).add(new LatLng (44.4342361, 26.0348472));\n listOfpoints.get(59).add(new LatLng (44.4273254, 26.0330877));\n listOfpoints.get(59).add(new LatLng (44.4237396,26.0342893));\n listOfpoints.get(59).add(new LatLng (44.4224216,26.0344395));\n\n\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n listOfpoints.get(60).add(new LatLng (44.4343687, 26.0351665));\n listOfpoints.get(60).add(new LatLng (44.4347671,26.059757));\n listOfpoints.get(60).add(new LatLng (44.435334, 26.0617097));\n listOfpoints.get(60).add(new LatLng (44.4355025, 26.0629327));\n listOfpoints.get(60).add(new LatLng (44.4356864,26.0635979));\n listOfpoints.get(60).add(new LatLng (44.4371728, 26.0669608));\n listOfpoints.get(60).add(new LatLng (44.4383602, 26.0697182));\n listOfpoints.get(60).add(new LatLng (44.4427184,26.0621798));\n listOfpoints.get(60).add(new LatLng (44.4429329,26.0609782));\n listOfpoints.get(60).add(new LatLng (44.447161,26.0392201));\n listOfpoints.get(60).add(new LatLng (44.4427491,26.0356152));\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n\n\n listOfpoints.get(61).add(new LatLng (44.4053059, 26.0112059));\n listOfpoints.get(61).add(new LatLng (44.384914, 26.0334789));\n listOfpoints.get(61).add(new LatLng (44.3778596, 26.0462677));\n listOfpoints.get(61).add(new LatLng (44.3811722,26.0454952));\n listOfpoints.get(61).add(new LatLng (44.399879, 26.0482418));\n listOfpoints.get(61).add(new LatLng (44.4002162, 26.0489714));\n listOfpoints.get(61).add(new LatLng (44.4169858,26.0575115));\n listOfpoints.get(61).add(new LatLng (44.4180893, 26.0579407));\n listOfpoints.get(61).add(new LatLng (44.4156984,26.0508167));\n listOfpoints.get(61).add(new LatLng (44.4151773,26.0472977));\n listOfpoints.get(61).add(new LatLng (44.414135,26.0356247));\n listOfpoints.get(61).add(new LatLng (44.4110082, 26.0104334));\n listOfpoints.get(61).add(new LatLng (44.4061643,26.0117208));\n listOfpoints.get(61).add(new LatLng (44.4053059,26.0112059));\n\n\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n listOfpoints.get(62).add(new LatLng (44.4103304, 26.0034906));\n listOfpoints.get(62).add(new LatLng (44.4127522,26.0228884));\n listOfpoints.get(62).add(new LatLng (44.4144076,26.0351192));\n listOfpoints.get(62).add(new LatLng (44.4167986,26.0343897));\n listOfpoints.get(62).add(new LatLng (44.4221013, 26.0343038));\n listOfpoints.get(62).add(new LatLng (44.4271277, 26.0328018));\n listOfpoints.get(62).add(new LatLng (44.4343295, 26.0347544));\n listOfpoints.get(62).add(new LatLng (44.4344597, 26.0345399));\n listOfpoints.get(62).add(new LatLng (44.436423, 26.0347646));\n listOfpoints.get(62).add(new LatLng (44.4424747, 26.0213321));\n listOfpoints.get(62).add(new LatLng (44.4459215, 26.0171264));\n listOfpoints.get(62).add(new LatLng (44.4457043,26.0167004));\n listOfpoints.get(62).add(new LatLng (44.4252662, 25.9987613));\n listOfpoints.get(62).add(new LatLng (44.4235193, 25.9990188));\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n\n\n listOfpoints.get(63).add(new LatLng (44.450683, 26.0692569));\n listOfpoints.get(63).add(new LatLng (44.4530725,26.0733768));\n listOfpoints.get(63).add(new LatLng (44.4523986, 26.0762092));\n listOfpoints.get(63).add(new LatLng (44.4522454,26.0783979));\n listOfpoints.get(63).add(new LatLng (44.4521842,26.0858652));\n listOfpoints.get(63).add(new LatLng (44.4658762, 26.0861656));\n listOfpoints.get(63).add(new LatLng (44.4661262, 26.0856151));\n listOfpoints.get(63).add(new LatLng (44.4670374, 26.0787379));\n listOfpoints.get(63).add(new LatLng (44.467496, 26.0777089));\n listOfpoints.get(63).add(new LatLng (44.4773875,26.0721728));\n listOfpoints.get(63).add(new LatLng (44.4779387,26.0720012));\n listOfpoints.get(63).add(new LatLng (44.482103,26.0611007));\n listOfpoints.get(63).add(new LatLng (44.4811232,26.0571525));\n listOfpoints.get(63).add(new LatLng (44.4748153, 26.0461661));\n listOfpoints.get(63).add(new LatLng (44.4716917, 26.0438487));\n listOfpoints.get(63).add(new LatLng (44.4690579,26.0436771));\n listOfpoints.get(63).add(new LatLng (44.4667916, 26.0449645));\n listOfpoints.get(63).add(new LatLng (44.4519663, 26.0668513));\n listOfpoints.get(63).add(new LatLng (44.450683,26.0692569));\n\n\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n listOfpoints.get(64).add(new LatLng (44.466193, 26.0862472));\n listOfpoints.get(64).add(new LatLng (44.4723947,26.0878994));\n listOfpoints.get(64).add(new LatLng (44.4731756,26.0883715));\n listOfpoints.get(64).add(new LatLng (44.4739718,26.090131));\n listOfpoints.get(64).add(new LatLng (44.4744158, 26.090882));\n listOfpoints.get(64).add(new LatLng (44.4748292,26.0909678));\n listOfpoints.get(64).add(new LatLng (44.4753498,26.0906889));\n listOfpoints.get(64).add(new LatLng (44.4774321, 26.0888006));\n listOfpoints.get(64).add(new LatLng (44.4801879,26.0864832));\n listOfpoints.get(64).add(new LatLng (44.4868014,26.0859682));\n listOfpoints.get(64).add(new LatLng (44.4880873,26.0854532));\n listOfpoints.get(64).add(new LatLng (44.489618,26.0824491));\n listOfpoints.get(64).add(new LatLng (44.4904753, 26.0788443));\n listOfpoints.get(64).add(new LatLng (44.4890057,26.0784151));\n listOfpoints.get(64).add(new LatLng (44.478167, 26.0727074));\n listOfpoints.get(64).add(new LatLng (44.4678468, 26.0779216));\n listOfpoints.get(64).add(new LatLng (44.467219, 26.0788228));\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n\n\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n listOfpoints.get(65).add(new LatLng (44.443222,26.0605852));\n listOfpoints.get(65).add(new LatLng (44.4450067,26.0611538));\n listOfpoints.get(65).add(new LatLng (44.4465463,26.062173));\n listOfpoints.get(65).add(new LatLng (44.4472816,26.0631386));\n listOfpoints.get(65).add(new LatLng (44.448913,26.0666577));\n listOfpoints.get(65).add(new LatLng (44.4502551,26.0690373));\n listOfpoints.get(65).add(new LatLng (44.4664896,26.0448331));\n listOfpoints.get(65).add(new LatLng (44.4688479,26.0434168));\n listOfpoints.get(65).add(new LatLng (44.469491,26.0403269));\n listOfpoints.get(65).add(new LatLng (44.4702566,26.037237));\n listOfpoints.get(65).add(new LatLng (44.4701035,26.0353058));\n listOfpoints.get(65).add(new LatLng (44.4613441,26.0305422));\n listOfpoints.get(65).add(new LatLng (44.4611297,26.0346621));\n listOfpoints.get(65).add(new LatLng (44.4606089,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.4595369,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.458618,26.0354775));\n listOfpoints.get(65).add(new LatLng (44.4545745,26.0376233));\n listOfpoints.get(65).add(new LatLng (44.4501632,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4494892,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4485701,26.039297));\n listOfpoints.get(65).add(new LatLng (44.4477429,26.0380953));\n listOfpoints.get(65).add(new LatLng (44.4466093,26.0430306));\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n\n\n\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0912642));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0917148));\n listOfpoints.get(66).add(new LatLng (44.4743313,26.0922513));\n listOfpoints.get(66).add(new LatLng (44.4750816,26.0927019));\n listOfpoints.get(66).add(new LatLng (44.4758471,26.0937962));\n listOfpoints.get(66).add(new LatLng (44.4762758,26.0947189));\n listOfpoints.get(66).add(new LatLng (44.4766127,26.0962853));\n listOfpoints.get(66).add(new LatLng (44.4765514,26.0971436));\n listOfpoints.get(66).add(new LatLng (44.4761227,26.0977444));\n listOfpoints.get(66).add(new LatLng (44.4753878,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4745457,26.0985384));\n listOfpoints.get(66).add(new LatLng (44.4734585,26.0989675));\n listOfpoints.get(66).add(new LatLng (44.4729073,26.0990104));\n listOfpoints.get(66).add(new LatLng (44.4718508,26.0986671));\n listOfpoints.get(66).add(new LatLng (44.471223,26.0980663));\n listOfpoints.get(66).add(new LatLng (44.469263,26.0970792));\n listOfpoints.get(66).add(new LatLng (44.4689567,26.0971651));\n listOfpoints.get(66).add(new LatLng (44.468773,26.0975728));\n listOfpoints.get(66).add(new LatLng (44.4687424,26.0981092));\n listOfpoints.get(66).add(new LatLng (44.4688955,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4692017,26.0986886));\n listOfpoints.get(66).add(new LatLng (44.4694774,26.0985598));\n listOfpoints.get(66).add(new LatLng (44.4704268,26.0990319));\n listOfpoints.get(66).add(new LatLng (44.4707483,26.0994396));\n listOfpoints.get(66).add(new LatLng (44.4719733,26.1024651));\n listOfpoints.get(66).add(new LatLng (44.4735963,26.1028943));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1035809));\n listOfpoints.get(66).add(new LatLng (44.4741322,26.1042676));\n listOfpoints.get(66).add(new LatLng (44.4735351,26.1047396));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1077866));\n listOfpoints.get(66).add(new LatLng (44.4738413,26.1079583));\n listOfpoints.get(66).add(new LatLng (44.473826,26.1085591));\n listOfpoints.get(66).add(new LatLng (44.4733667,26.1097822));\n listOfpoints.get(66).add(new LatLng (44.4732595,26.1107478));\n listOfpoints.get(66).add(new LatLng (44.4734432,26.1111555));\n listOfpoints.get(66).add(new LatLng (44.4763087,26.1089172));\n listOfpoints.get(66).add(new LatLng (44.4946789,26.1040249));\n listOfpoints.get(66).add(new LatLng (44.4968217,26.0792198));\n listOfpoints.get(66).add(new LatLng (44.490592,26.0788336));\n listOfpoints.get(66).add(new LatLng (44.4898573,26.0820737));\n listOfpoints.get(66).add(new LatLng (44.4894593,26.0830178));\n listOfpoints.get(66).add(new LatLng (44.4882229,26.0855306));\n listOfpoints.get(66).add(new LatLng (44.4870595,26.0860456));\n listOfpoints.get(66).add(new LatLng (44.4801439,26.0866335));\n listOfpoints.get(66).add(new LatLng (44.4761173,26.090174));\n listOfpoints.get(66).add(new LatLng (44.4751527,26.0912469));\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n\n listOfpoints.get(67).add(new LatLng (44.4671287, 26.121282));\n listOfpoints.get(67).add(new LatLng (44.46768,26.1231274));\n listOfpoints.get(67).add(new LatLng (44.4696095,26.1234278));\n listOfpoints.get(67).add(new LatLng (44.4712938,26.1224408));\n listOfpoints.get(67).add(new LatLng (44.4723657,26.1229557));\n listOfpoints.get(67).add(new LatLng (44.4727944, 26.1226553));\n listOfpoints.get(67).add(new LatLng (44.4740193, 26.1226982));\n listOfpoints.get(67).add(new LatLng (44.4745399,26.1236424));\n listOfpoints.get(67).add(new LatLng (44.4743668,26.1243164));\n listOfpoints.get(67).add(new LatLng (44.4747037, 26.1250031));\n listOfpoints.get(67).add(new LatLng (44.4751324,26.1257541));\n listOfpoints.get(67).add(new LatLng (44.4758673,26.1267626));\n listOfpoints.get(67).add(new LatLng (44.4761736, 26.127578));\n listOfpoints.get(67).add(new LatLng (44.491758,26.1285221));\n listOfpoints.get(67).add(new LatLng (44.4931662, 26.1377919));\n listOfpoints.get(67).add(new LatLng (44.494452,26.1444008));\n listOfpoints.get(67).add(new LatLng (44.4947581,26.1462033));\n listOfpoints.get(67).add(new LatLng (44.4958601, 26.1472332));\n listOfpoints.get(67).add(new LatLng (44.4969009, 26.1458599));\n listOfpoints.get(67).add(new LatLng (44.4984926, 26.1450875));\n listOfpoints.get(67).add(new LatLng (44.5000231,26.1446583));\n listOfpoints.get(67).add(new LatLng (44.5006353,26.1435425));\n listOfpoints.get(67).add(new LatLng (44.5012475,26.1424267));\n listOfpoints.get(67).add(new LatLng (44.5057774, 26.144315));\n listOfpoints.get(67).add(new LatLng (44.5070629, 26.137191));\n listOfpoints.get(67).add(new LatLng (44.5066956, 26.1233723));\n listOfpoints.get(67).add(new LatLng (44.502227,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4952479,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4782558,26.1086953));\n listOfpoints.get(67).add(new LatLng (44.4765716,26.1090386));\n listOfpoints.get(67).add(new LatLng (44.4734175,26.1114848));\n listOfpoints.get(67).add(new LatLng (44.4739994,26.1124289));\n listOfpoints.get(67).add(new LatLng (44.4744587,26.1137163));\n listOfpoints.get(67).add(new LatLng (44.474275,26.1152613));\n listOfpoints.get(67).add(new LatLng (44.4738156,26.1171067));\n listOfpoints.get(67).add(new LatLng (44.4729582,26.1180937));\n listOfpoints.get(67).add(new LatLng (44.4705695, 26.1195099));\n listOfpoints.get(67).add(new LatLng (44.4677826,26.1202395));\n listOfpoints.get(67).add(new LatLng (44.4671287,26.121282));\n\n\n //Stockholm\n listOfpoints.get(68).add(new LatLng(59.339281, 18.005316));\n listOfpoints.get(68).add(new LatLng(59.263986, 18.253591));\n listOfpoints.get(68).add(new LatLng(59.260869, 17.878596));\n\n //Stockholm\n listOfpoints.get(69).add(new LatLng(59.342841, 18.040179));\n listOfpoints.get(69).add(new LatLng(59.355275, 17.884694));\n listOfpoints.get(69).add(new LatLng(59.423065, 18.075748));\n\n\n for(int i = 0 ; i < listOfpoints.size(); i++){\n listOfPolygons.add( MapsActivity.instance.mMap.addPolygon(new PolygonOptions()\n .addAll(listOfpoints.get(i))\n .strokeWidth(0)\n .fillColor(Color.argb(50, 0, 250, 0))) );\n }\n\n\n\n\n }", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "private void setupMarkers() {\n \t\tGPSFilterPolygon polygon = this.area.getPolygon();\n \n \t\tif ( polygon != null ) {\n \t\t\tfinal LatLngBounds.Builder builder = LatLngBounds.builder();\n \n \t\t\t// Put markers for each edge.\n \t\t\tfor ( GPSLatLng pos : polygon.getPoints() ) {\n \t\t\t\tLatLng point = this.convertLatLng( pos );\n \n \t\t\t\tbuilder.include( point );\n \n \t\t\t\tthis.addMarker( point );\n \t\t\t}\n \n \t\t\t// Add listener that moves camera so that all markers are in users view.\n \t\t\tthis.googleMap.setOnCameraChangeListener( new OnCameraChangeListener() {\n \t\t\t\t@Override\n \t\t\t\tpublic void onCameraChange( CameraPosition arg0 ) {\n \t\t\t\t\t// Move camera.\n \t\t\t\t\tmoveCameraToPolygon( builder, false );\n \n \t\t\t\t\t// Remove listener to prevent position reset on camera move.\n \t\t\t\t\tgoogleMap.setOnCameraChangeListener( null );\n \t\t\t\t}\n \t\t\t} );\n \n \t\t\tthis.updateGuiPolygon();\n \t\t}\n \t}", "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}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Polyline polyline = googleMap.addPolyline(new PolylineOptions().width(4).color(Color.BLACK));\n if(postions.size() > 2){\n polyline.setPoints(postions);\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(getCenterOfPolygon(postions), 15));\n }\n else{\n Toast.makeText(this, \"Route too short\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n final TextView textLat = (TextView) this.findViewById(R.id.TextLat);\n final TextView textLong = (TextView) this.findViewById(R.id.TextLng);\n\n\n polygon = mMap.addPolygon(new PolygonOptions()\n .add(new LatLng(15, 95),\n new LatLng(15, 105.08),\n new LatLng(4.92, 105.08),\n new LatLng(4.92, 95))\n .strokeColor(Color.RED).strokeWidth(1)\n .fillColor(Color.parseColor(\"#30000000\")));\n\n float lat = 15;\n float lng = 95;\n int i = 0;\n for (i = 0; i < 122; i++) {\n line = mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(lat, 95), new LatLng(lat, 105.08))\n .width(1)\n .color(Color.RED));\n\n line = mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(15, lng), new LatLng(4.92, lng))\n .width(1)\n .color(Color.RED));\n\n lat = (float) (lat - 0.0826);\n lng = (float) (lng + 0.0826);\n }\n\n LatLng coordinateThailand = new LatLng(14, 100);\n mMap.addMarker(new MarkerOptions().position(coordinateThailand).title(\"Thailand\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(coordinateThailand));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinateThailand,10));\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n public void onMapClick(LatLng latLng) {\n\n Log.e(\"latlong\", latLng.latitude + \"-\" + latLng.longitude);\n textLat.setText(\"\"+latLng.latitude);\n textLong.setText(\"\"+latLng.longitude);\n\n Double f1 = latLng.latitude;\n Double f2 = latLng.longitude;\n\n\n pLng = f2%95;\n pLat = f1%15;\n Log.i(\"test\", pLat + \"-\" + pLng);\n\n pLng=pLng/0.0826;\n pLat=pLat/0.0826;\n kLng =pLng.intValue();\n kLat =pLat.intValue();\n kLat=kLat-60;\n Log.i(\"test2\", kLat + \"-\" + kLng);\n\n if (flag>0)\n {polygon2.remove();}\n\n\n if(kLat>=0&kLat<=121&kLng>=0&kLng<=121) {\n polygon2 = mMap.addPolygon(new PolygonOptions()\n .add(new LatLng(4.92 + (0.0826 * kLat), 95 + (0.0826 * kLng)),\n new LatLng(4.92 + (0.0826 * kLat), 95 + (0.0826 * kLng) + 0.0826),\n new LatLng(4.92 + (0.0826 * kLat) + 0.0826, 95 + (0.0826 * kLng) + 0.0826),\n new LatLng(4.92 + (0.0826 * kLat) + 0.0826, 95 + (0.0826 * kLng)))\n .strokeColor(Color.BLUE).strokeWidth(1)\n .fillColor(Color.parseColor(\"#283593\")));\n }\n flag=flag+1;\n\n\n kLat=121-kLat; //point array\n\n\n\n\n }\n\n\n\n });\n\n\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "public void initMapMarkers() {\n\t\tmyMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder myLocMarkerBuilder = new MapMarkerBuilder();\n\t\tmyLocMarkerBuilder.setMarkerId(MARKER_ID_MY_LOCATION);\n\t\tmyLocMarkerBuilder.setIsAccuracyCircleSupported(true);\n\t\tmyLocMarkerBuilder.setAccuracyCircleBaseColor(new FColorRGB(32/255f, 173/255f, 229/255f));\n\t\tmyLocMarkerBuilder.setBaseOrder(-206000);\n\t\tmyLocMarkerBuilder.setIsHidden(true);\n\t\tBitmap myLocationBitmap = OsmandResources.getBitmap(\"map_pedestrian_location\");\n\t\tif (myLocationBitmap != null) {\n\t\t\tmyLocMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tmyLocationBitmap.getWidth(), myLocationBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(myLocationBitmap)));\n\t\t}\n\t\tmyLocationMarker = myLocMarkerBuilder.buildAndAddToCollection(myMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(myMarkersCollection);\n\n\t\t// Create context pin marker\n\t\tcontextPinMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder contextMarkerBuilder = new MapMarkerBuilder();\n\t\tcontextMarkerBuilder.setMarkerId(MARKER_ID_CONTEXT_PIN);\n\t\tcontextMarkerBuilder.setIsAccuracyCircleSupported(false);\n\t\tcontextMarkerBuilder.setBaseOrder(-210000);\n\t\tcontextMarkerBuilder.setIsHidden(true);\n\t\tBitmap pinBitmap = OsmandResources.getBitmap(\"map_pin_context_menu\");\n\t\tif (pinBitmap != null) {\n\t\t\tcontextMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tpinBitmap.getWidth(), pinBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(pinBitmap)));\n\t\t\tcontextMarkerBuilder.setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.Top);\n\t\t\tcontextMarkerBuilder.setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal);\n\t\t}\n\t\tcontextPinMarker = contextMarkerBuilder.buildAndAddToCollection(contextPinMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(contextPinMarkersCollection);\n\t}", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "public void calling() {\n\t\tCircle tc = new Circle(new Coordinate(-73, 42), 0);\n\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n\t\t\tPaintShapes.paint.addCircle(tc);\n\t\t\tPaintShapes.paint.myRepaint();\n\t\t}\n\t\t\n//\t\tMap<Double, Coordinate>angle_coordinate=new HashMap<Double, Coordinate>();\n//\t\tLinkedList<double[]>coverangle=new LinkedList<double[]>();\n//\t\tMap<Double[], Coordinate[]>uncoverArc=new HashMap<Double[], Coordinate[]>();\n//\t\tdouble a1[]=new double[2];\n//\t\ta1[0]=80;\n//\t\ta1[1]=100;\n//\t\tangle_coordinate.put(a1[0], new Coordinate(1, 0));\n//\t\tangle_coordinate.put(a1[1], new Coordinate(0, 1));\n//\t\tcoverangle.add(a1);\n//\t\tdouble a2[]=new double[2];\n//\t\ta2[0]=0;\n//\t\ta2[1]=30;\n//\t\tangle_coordinate.put(a2[0], new Coordinate(2, 0));\n//\t\tangle_coordinate.put(a2[1], new Coordinate(0, 2));\n//\t\tcoverangle.add(a2);\n//\t\tdouble a3[]=new double[2];\n//\t\ta3[0]=330;\n//\t\ta3[1]=360;\n//\t\tangle_coordinate.put(a3[0], new Coordinate(3, 0));\n//\t\tangle_coordinate.put(a3[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a3);\n//\t\tdouble a4[]=new double[2];\n//\t\ta4[0]=20;\n//\t\ta4[1]=90;\n//\t\tangle_coordinate.put(a4[0], new Coordinate(4, 0));\n//\t\tangle_coordinate.put(a4[1], new Coordinate(0, 4));\n//\t\tcoverangle.add(a4);\n//\t\tdouble a5[]=new double[2];\n//\t\ta5[0]=180;\n//\t\ta5[1]=240;\n//\t\tangle_coordinate.put(a5[0], new Coordinate(5, 0));\n//\t\tangle_coordinate.put(a5[1], new Coordinate(0, 5));\n//\t\tcoverangle.add(a5);\n//\t\tdouble a6[]=new double[2];\n//\t\ta6[0]=270;\n//\t\ta6[1]=300;\n//\t\tangle_coordinate.put(a6[0], new Coordinate(6, 0));\n//\t\tangle_coordinate.put(a6[1], new Coordinate(0, 6));\n//\t\tcoverangle.add(a6);\n//\t\tdouble a7[]=new double[2];\n//\t\ta7[0]=360;\n//\t\ta7[1]=360;\n//\t\tangle_coordinate.put(a7[0], new Coordinate(7, 7));\n//\t\tangle_coordinate.put(a7[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a7);\n//\t\t// sort the cover arc\n//\t\tint minindex = 0;\n//\t\tfor (int j = 0; j < coverangle.size() - 1; j++) {\n//\t\t\tminindex = j;\n//\t\t\tfor (int k = j + 1; k < coverangle.size(); k++) {\n//\t\t\t\tif (coverangle.get(minindex)[0] > coverangle.get(k)[0]) {\n//\t\t\t\t\tminindex = k;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tdouble tem[] = new double[2];\n//\t\t\ttem = coverangle.get(j);\n//\t\t\tcoverangle.set(j, coverangle.get(minindex));\n//\t\t\tcoverangle.set(minindex, tem);\n//\t\t}\n//\t\tfor(int ii=0;ii<coverangle.size();ii++){\n//\t\t\tdouble aa[]=coverangle.get(ii);\n//\t\t\tSystem.out.println(aa[0]+\" \"+aa[1]);\n//\t\t}\n//\t\tSystem.out.println(\"----------------------------\");\n//\t\t// find the uncover arc\n//\t\tint startposition = 0;\n//\t\twhile (startposition < coverangle.size() - 1) {\n//\t\t\tdouble coverArc[] = coverangle.get(startposition);\n//\t\t\tboolean stop = false;\n//\t\t\tint m = 0;\n//\t\t\tfor (m = startposition + 1; m < coverangle.size() && !stop; m++) {\n//\t\t\t\tdouble bb[] = coverangle.get(m);\n//\t\t\t\tif (bb[0] <= coverArc[1]) {\n//\t\t\t\t\tcoverArc[0] = Math.min(coverArc[0], bb[0]);\n//\t\t\t\t\tcoverArc[1] = Math.max(coverArc[1], bb[1]);\n//\t\t\t\t} else {\n//\t\t\t\t\tCoordinate uncover[]=new Coordinate[2];\n//\t\t\t\t\t//record the consistant uncover angle\n//\t\t\t\t\tDouble[] uncoverA=new Double[2];\n//\t\t\t\t\tuncoverA[0]=coverArc[1];\n//\t\t\t\t\tuncoverA[1]=bb[0];\n//\t\t\t\t\tIterator<Map.Entry<Double, Coordinate>> entries = angle_coordinate\n//\t\t\t\t\t\t\t.entrySet().iterator();\n//\t\t\t\t\twhile (entries.hasNext()) {\n//\t\t\t\t\t\tMap.Entry<Double, Coordinate> entry = entries.next();\n//\t\t\t\t\t\tif (entry.getKey() == coverArc[1])\n//\t\t\t\t\t\t\tuncover[0] = entry.getValue();\n//\t\t\t\t\t\telse if (entry.getKey() == bb[0])\n//\t\t\t\t\t\t\tuncover[1] = entry.getValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tuncoverArc.put(uncoverA, uncover);\n//\t\t\t\t\tstartposition = m;\n//\t\t\t\t\tstop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif(m==coverangle.size()){\n//\t\t\t\tstartposition=m;\n//\t\t\t}\n//\t\t}\n//\t\n//\t\tSystem.out.println(uncoverArc.entrySet().size());\n//\t\tint n=uncoverArc.entrySet().size();\n//\t\tint k=2;\n//\t\twhile(n>0){\n//\t\t\tIterator<Map.Entry<Double[],Coordinate[]>>it=uncoverArc.entrySet().iterator();\n//\t\t\tMap.Entry<Double[], Coordinate[]>newneighbor=it.next();\n//\t\t\tSystem.out.println(newneighbor.getKey()[0]+\" \"+newneighbor.getValue()[0]);\n//\t\t\tSystem.out.println(newneighbor.getKey()[1]+\" \"+newneighbor.getValue()[1]);\n//\t\t uncoverArc.remove(newneighbor.getKey());\n//\t\t \n//\t\tif(k==2){\n//\t\tDouble[] a8=new Double[2];\n//\t\ta8[0]=(double)450;\n//\t\ta8[1]=(double)500;\n//\t\tCoordinate a9[]=new Coordinate[2];\n//\t\ta9[0]=new Coordinate(9, 0);\n//\t\ta9[1]=new Coordinate(0, 9);\n//\t\tuncoverArc.put(a8, a9);\n//\t\tk++;\n//\t\t}\n//\t\tn=uncoverArc.entrySet().size();\n//\t\tSystem.out.println(\"new size=\"+uncoverArc.entrySet().size());\n//\t\t}\n//\t\t\t\n\t\t\t\n\t\t\n\t\t/***************new test*************************************/\n//\t\tCoordinate startPoint=new Coordinate(500, 500);\n//\t\tLinkedList<VQP>visitedcircle_Queue=new LinkedList<VQP>();\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 500), 45));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(589, 540), 67));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 550), 95));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(439, 560), 124));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(460, 478), 69));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(580, 580), 70));\n//\t\tIterator<VQP>testiterator=visitedcircle_Queue.iterator();\n//\t\twhile(testiterator.hasNext()){\n//\t\t\tVQP m1=testiterator.next();\n//\t\t\tCircle tm=new Circle(m1.getCoordinate(), m1.getRadius());\n//\t\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n//\t\t\t\tPaintShapes.paint.addCircle(tm);\n//\t\t\t\tPaintShapes.paint.myRepaint();\n//\t\t\t}\n//\t\t\t\n//\t\t}\n//\t\tdouble coverradius=calculateIncircle(startPoint, visitedcircle_Queue);\n//\t\tCircle incircle=new Circle(startPoint, coverradius);\n//\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\tPaintShapes.paint.color = PaintShapes.paint.blueTranslucence;\n//\t\t\tPaintShapes.paint.addCircle(incircle);\n//\t\t\tPaintShapes.paint.myRepaint();\n//\t\t}\n//\t\t/***************end test*************************************/\n\t\tEnvelope envelope = new Envelope(-79.76259, -71.777491,\n\t\t\t\t40.477399, 45.015865);\n\t\tdouble area=envelope.getArea();\n\t\tdouble density=57584/area;\n\t\tSystem.out.println(\"density=\"+density);\n\t\tSystem.out.println(\"end calling!\");\n\t}", "@Override\n public void onMapReady( GoogleMap googleMap ) {\n this.googleMap = googleMap;\n SharedPreferences sp = Objects.requireNonNull( getActivity() )\n .getSharedPreferences( Weather_Preference, 0 );\n String lat = sp.getString( MAP_LAT_KEY, \"47.24515\" ); // val 0 if none\n String lon = sp.getString( MAP_LON_KEY, \"-122.437456\" );\n LatLng CurrentLocation;\n\n try {\n /*Attempt to retrieve shared preferences*/\n assert lat != null;\n assert lon != null;\n if ( !lat.equals( \"47.24515\" ) && !lon.equals( \"-122.437456\" ) ) {\n /*If the user had previously set the location preference, display a circle and pin correspondingly*/\n CurrentLocation = new LatLng( Float.valueOf( lat), Float.valueOf( lon ));\n mCircle = new CircleOptions()\n .center( CurrentLocation )\n .radius( 30000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) );\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Current Location\" );\n } else {\n /*No shared preferences? then get their gps coordinates and display that instead*/\n CurrentLocation = new LatLng( mMaster.getCurrentLat(), mMaster.getCurrentLon() );\n mCircle = new CircleOptions()\n .center( CurrentLocation )\n .radius( 30000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) );\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Current Location\" );\n }\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( CurrentLocation, 5.0f ) );\n googleMap.addCircle( mCircle );\n } catch ( Exception e ) {\n /*If we are unable to find the users current location nor the stored location then set the view\n to an over view of America*/\n CurrentLocation = new LatLng( AMERICA_CENTER_LAT, AMERICA_CENTER_LON );\n Toast.makeText( mMaster, \"Error Retrieving your current location! \" +\n \"\\nCheck your Settings and Notifications\", Toast.LENGTH_LONG ).show();\n currentMarker = new MarkerOptions().position( CurrentLocation ).title( \"Anerica\" );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( CurrentLocation, 1.0f ) );\n } finally {\n googleMap.setOnMapClickListener( this );\n googleMap.addMarker( currentMarker );\n }\n googleMap.setOnMapClickListener( this );\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getLocationInfo();\n setUpMap(mMap);\n //drawPath(googleMap, pathString);\n }", "public void placeMarker(String zone_name,String risk_level, String latitude, String longitude,String description,String markertime){\n double latitudeNumericVal = Double.valueOf(latitude);\n double longitudeNumericVal = Double.valueOf(longitude);\n\n String timePosted = markertime.substring(0,16);\n\n LatLng coordinates = new LatLng(latitudeNumericVal,longitudeNumericVal);\n System.out.println(\"RISK LEVELS ARE: \" + risk_level);\n if(risk_level.contains(\"Low\")){\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(250);\n circleOptions.strokeColor(Color.parseColor(\"#e0ee20\"));\n circleOptions.fillColor(Color.parseColor(\"#20e0ee20\"));\n circleOptions.strokeWidth(3f);\n // Adding the circle to the GoogleMap\n mMap.addCircle(circleOptions);\n final MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n // MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name).icon(BitmapDescriptorFactory.fromResource(R.drawable.yellowradius));\n dangerMarker.snippet(\"Low Danger:\\n\" + description + \"\\n\" + timePosted);\n mMap.addMarker(dangerMarker);\n }\n\n if (risk_level.contains(\"Medium\")) {\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(500);\n circleOptions.strokeColor(Color.parseColor(\"#FF9700\"));\n circleOptions.fillColor(Color.parseColor(\"#20FF9700\"));\n circleOptions.strokeWidth(3f);\n\n // Adding the circle to the GoogleMap\n mMap.addCircle(circleOptions);\n\n MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n\n dangerMarker.snippet(\"Medium Danger:\\n\" + description + \"\\n\" + timePosted);\n // dangerMarker.visible(false);\n mMap.addMarker(dangerMarker);\n }\n\n if(risk_level.contains(\"High\")) {\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(750);\n circleOptions.strokeColor(Color.parseColor(\"#cc0000\"));\n circleOptions.fillColor(Color.parseColor(\"#20cc0000\"));\n circleOptions.strokeWidth(3f);\n\n mMap.addCircle(circleOptions);\n\n MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n\n dangerMarker.snippet(\"High Danger:\\n\" + description + \"\\n\" + timePosted);\n\n mMap.addMarker(dangerMarker);\n\n /**\n * Check current Date and see if any of the high danger zones were posted within the hour\n */\n Date currentDate = new Date();\n String currentDateString = currentDate.toString();\n\n String markerHourComparator = markertime.substring(11,14);\n if(currentDateString.contains(markerHourComparator)) {\n displayHighDZDialog(markertime,latitudeNumericVal,longitudeNumericVal);\n }\n\n System.out.println(markerHourComparator);\n //Toast.makeText(MapsActivity.this, \"High Danger Zone Added!\", Toast.LENGTH_LONG).show();\n }\n\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n //Get our mapManager singleton and give it the context\n mapManager = new MapManager(getActivity(), mMap);\n /*mapManager.drawAllTrainLines();\n mapManager.setMap(mMap);*/\n\n //Set up gpsManager with context\n gpsManager = GPSManager.getInstance();\n //Get the location manager service\n locationManager = (LocationManager) getActivity().getSystemService(getActivity().LOCATION_SERVICE);\n\n //Get the permissions for the location service if needed\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PermissionConstants.LOCATION_TrackerFragment.getValue());\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, gpsManager);\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, gpsManager);\n gpsManager.InitLocationManager(getActivity(), locationManager, mapManager);\n Log.v(\"Tracker\", \"No Permissions Required, hooked up gpsManager\");\n\n }\n mapManager.moveCameraToMe();\n new LoadMapLines(mMap, mapManager).execute();\n\n }", "public void generateMarkers() {\n\t\tgooglemap.clear();\n\t\tgooglemap.setMyLocationEnabled(true);\n\t\t//generateRouteLine();\n\t\tdouble itinerary_latitude;\n\t\tdouble itinerary_longitude;\n\t\tString itinerary_name;\n\n\t\tLatLng latlng;\n\t\tmarkers = new ArrayList<Marker>();\n\n\t\t//zoom out to make sure all markers are displayed in screen\n\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder(); \n\t\tbuilder.include(new LatLng(parentActivity.getUserLat(),parentActivity.getUserLon()));\n\n\n\t\tfor( int x=parentActivity.getItinerary().itin.size(); x > 0; x-- ){\n\t\t\tEntity obj = parentActivity.getItinerary().itin.get(x-1);\n\t\t\titinerary_latitude = Double.parseDouble( obj.getLatitude() );\n\t\t\titinerary_longitude = Double.parseDouble( obj.getLongitude() );\n\t\t\titinerary_name = obj.getName();\n\t\t\tlatlng = new LatLng(itinerary_latitude, itinerary_longitude);\n\n\t\t\tint markerImage = supportClassObj.chooseMarkerImage(x);\n\t\t\t\n\t\t\tMarker marker = googlemap.addMarker(new MarkerOptions()\n\t\t\t\t.position(latlng)\n\t\t\t\t.snippet(\"Navigate\")\n\t\t\t\t.title(itinerary_name)\n\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(markerImage)));\n\t\t\t\n\t\t\tmarker.showInfoWindow();\n\t\t\tmarker.hideInfoWindow();\n\n\t\t\tmarkers.add(marker);\n\n\t\t\t//setting bounds for googlemap\n\t\t\tbuilder.include(latlng); \n\t\t}\n\t\t\n\t\tgooglemap.setOnMarkerClickListener(new OnMarkerClickListener(){\n\t\t\t@Override\n\t\t\tpublic boolean onMarkerClick(Marker marker) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor( String leg : parentActivity.getItinerary().getPolyline() ){\n\t\t\thandleGetDirectionsResult(decodePoly(leg));\n\t\t}\n\t\t\n\t\t// multipliers for height based off percentage of screen size map will use\n\t\tint width = this.getResources().getDisplayMetrics().widthPixels;\n\t\tint padding = (int) (width * .145);\n\t\tgooglemap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), \n width, \n (int)(this.getResources().getDisplayMetrics().heightPixels * 0.8 * 0.6 * 0.8), padding));\n\t\t\n\t}", "@Override\n public void run() {\n Map<String, Object> m = new HashMap<>();\n m.put(\"mAMapLocation\", \"mAMapLocation\");\n Graphic graphic = new Graphic(tapPoint, m, pinDestinationSymbol);\n\n finalMarkerOverlay.getGraphics().add(graphic);\n }", "private void buildArcLine(LatLng p1, LatLng p2, double arcCurvature) {\n double d = SphericalUtil.computeDistanceBetween(p1, p2);\n double h = SphericalUtil.computeHeading(p1, p2);\n\n if (h < 0) {\n LatLng tmpP1 = p1;\n p1 = p2;\n p2 = tmpP1;\n\n d = SphericalUtil.computeDistanceBetween(p1, p2);\n h = SphericalUtil.computeHeading(p1, p2);\n }\n\n //Midpoint position\n LatLng midPointLnt = SphericalUtil.computeOffset(p1, d * 0.5, h);\n\n //Apply some mathematics to calculate position of the circle center\n double x = (1 - arcCurvature * arcCurvature) * d * 0.5 / (2 * arcCurvature);\n double r = (1 + arcCurvature * arcCurvature) * d * 0.5 / (2 * arcCurvature);\n\n LatLng centerLnt = SphericalUtil.computeOffset(midPointLnt, x, h + 90.0);\n\n //Polyline options\n PolylineOptions options = new PolylineOptions();\n List<PatternItem> pattern = Arrays.<PatternItem>asList(new Dash(30), new Gap(20));\n\n //Calculate heading between circle center and two points\n double h1 = SphericalUtil.computeHeading(centerLnt, p1);\n double h2 = SphericalUtil.computeHeading(centerLnt, p2);\n\n //Calculate positions of points on circle border and add them to polyline options\n int numPoints = 100;\n double step = (h2 - h1) / numPoints;\n\n for (int i = 0; i < numPoints; i++) {\n LatLng middlePointTemp = SphericalUtil.computeOffset(centerLnt, r, h1 + i * step);\n options.add(middlePointTemp);\n }\n\n\n if (!eDisplayDottedLine.equalsIgnoreCase(\"\") && eDisplayDottedLine.equalsIgnoreCase(\"Yes\")) {\n //Draw polyline\n if (polyline != null) {\n polyline.remove();\n polyline = null;\n\n\n }\n polyline = gMap.addPolyline(options.width(10).color(Color.BLACK).geodesic(false).pattern(pattern));\n } else {\n if (polyline != null) {\n polyline.remove();\n polyline = null;\n\n\n }\n\n }\n }", "public static void addCircle(MapLocation center, float size, float desire) {\n switch (circleCount) {\n case 0:\n Z1c_desire = desire;\n Z1c_center = center;\n Z1c_size = size;\n circleCount++;\n break;\n case 1:\n Z2c_desire = desire;\n Z2c_center = center;\n Z2c_size = size;\n circleCount++;\n break;\n case 2:\n Z3c_desire = desire;\n Z3c_center = center;\n Z3c_size = size;\n circleCount++;\n break;\n case 3:\n Z4c_desire = desire;\n Z4c_center = center;\n Z4c_size = size;\n circleCount++;\n break;\n case 4:\n Z5c_desire = desire;\n Z5c_center = center;\n Z5c_size = size;\n circleCount++;\n break;\n case 5:\n Z6c_desire = desire;\n Z6c_center = center;\n Z6c_size = size;\n circleCount++;\n break;\n case 6:\n Z7c_desire = desire;\n Z7c_center = center;\n Z7c_size = size;\n circleCount++;\n break;\n case 7:\n Z8c_desire = desire;\n Z8c_center = center;\n Z8c_size = size;\n circleCount++;\n break;\n case 8:\n Z9c_desire = desire;\n Z9c_center = center;\n Z9c_size = size;\n circleCount++;\n break;\n case 9:\n Z10c_desire = desire;\n Z10c_center = center;\n Z10c_size = size;\n circleCount++;\n break;\n case 10:\n Z11c_desire = desire;\n Z11c_center = center;\n Z11c_size = size;\n circleCount++;\n break;\n case 11:\n Z12c_desire = desire;\n Z12c_center = center;\n Z12c_size = size;\n circleCount++;\n break;\n case 12:\n Z13c_desire = desire;\n Z13c_center = center;\n Z13c_size = size;\n circleCount++;\n break;\n case 13:\n Z14c_desire = desire;\n Z14c_center = center;\n Z14c_size = size;\n circleCount++;\n break;\n case 14:\n Z15c_desire = desire;\n Z15c_center = center;\n Z15c_size = size;\n circleCount++;\n break;\n case 15:\n Z16c_desire = desire;\n Z16c_center = center;\n Z16c_size = size;\n circleCount++;\n break;\n case 16:\n Z17c_desire = desire;\n Z17c_center = center;\n Z17c_size = size;\n circleCount++;\n break;\n case 17:\n Z18c_desire = desire;\n Z18c_center = center;\n Z18c_size = size;\n circleCount++;\n break;\n case 18:\n Z19c_desire = desire;\n Z19c_center = center;\n Z19c_size = size;\n circleCount++;\n break;\n case 19:\n Z20c_desire = desire;\n Z20c_center = center;\n Z20c_size = size;\n circleCount++;\n break;\n }\n }", "private void updateRadiusCircle(){\n if(mRadiusCircle != null) {\n mRadiusCircle.setVisible(false);\n }\n mRadiusCircle = mMap.addCircle(new CircleOptions()\n .center(new LatLng(mCurrentLoc.latitude, mCurrentLoc.longitude))\n .radius(mRadius * METERS_PER_MILE)\n .strokeColor(Color.BLUE)\n .fillColor(BLUE_COLOR));\n mRadiusCircle.setVisible(true);\n }", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mGoogleMap = map;\n\n // get the runner's path (serialized)\n String latLng = getIntent().getStringExtra(Session.LAT_LNG_EXTRA);\n List<LatLng> path = Session.getPathLatLng(latLng);\n\n if (path.size() < 2) {\n return;\n }\n\n addMarkers(path);\n addPolyLines(path);\n\n // set the center map fab here\n mCenterMapFab.setOnClickListener(view -> positionMapAtStart(path));\n\n positionMapAtStart(path);\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "public void handleGPS()\n {\n\t\t\n\t\tRunnable r2 = new Runnable() {\n\n public void run() {\n \ttry {\n BlackBerryCriteria criteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);\n\n try\n {\n BlackBerryLocationProvider myProvider =\n (BlackBerryLocationProvider)\n LocationProvider.getInstance(criteria);\n\n try\n {\n BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(300);\n\n int satCount = myLocation.getSatelliteCount();\n \n setLat(myLocation.getQualifiedCoordinates().getLatitude());\n setLongt(myLocation.getQualifiedCoordinates().getLongitude());\n \n //data.setVisibleNone();\n \t\tMapLocation test = new MapLocation(myLocation.getQualifiedCoordinates().getLatitude(), myLocation.getQualifiedCoordinates().getLongitude(), \"test\", null);\n \t\tint testId = data.add((Mappable) test, \"test\");\n \t\tdata.tag(testId, \"test\");\n \t\tdata.setVisibleNone();\n \t\tdata.setVisible( \"test\");\n// \t\tMapAction action = map.getAction();\n// \t\taction.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2);\n \t\tmap.getMapField().update(true);\n \n \n \n \n int signalQuality = myLocation.getAverageSatelliteSignalQuality();\n int dataSource = myLocation.getDataSource();\n int gpsMode = myLocation.getGPSMode();\n\n SatelliteInfo si;\n StringBuffer sb = new StringBuffer(\"[Id:SQ:E:A]\\n\");\n String separator = \":\";\n\n for (Enumeration e = myLocation.getSatelliteInfo();\n e!=null && e.hasMoreElements(); )\n {\n si = (SatelliteInfo)e.nextElement();\n sb.append(si.getId() + separator);\n sb.append(si.getSignalQuality() + separator);\n sb.append(si.getElevation() + separator);\n sb.append(si.getAzimuth());\n sb.append('\\n');\n System.out.println(sb);\n }\n }\n catch ( InterruptedException iex )\n {\n Logger.log(iex.toString());\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( UnsupportedOperationException uoex )\n {\n \tLogger.log(uoex.toString());\n }\n\n// return;\n }\n\t\t};\n\t\tcontroller.invokeLater(r2);\n }", "public void drawCircle(double radius,LatLng place, GoogleMap map){\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(place);\n circleOptions.radius(radius);\n circleOptions.strokeColor(Color.BLACK);\n circleOptions.fillColor(0x30000000);\n circleOptions.strokeWidth(1);\n circle=map.addCircle(circleOptions);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n boolean locMarker = prefs.getBoolean(\"locationMarkerSwitch\",true);\n\n mMap = googleMap;\n mMap.setOnMarkerClickListener( new GoogleMap.OnMarkerClickListener(){\n @Override\n public boolean onMarkerClick(Marker marker) {\n String title = marker.getTitle();\n latitude = marker.getPosition().latitude;\n longitude = marker.getPosition().longitude;\n// TreeLocation testing = new TreeLocation(latitude, longitude);\n if(marker.getTitle().equals(\"Unknown\")){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n Set<String> sources = prefs.getStringSet(\"databasesUsedSelector\", new HashSet<String>());\n Tree closestTree = null;\n for (String source : sources) {\n DataSource ds;\n if(source.equals(\"HopeCollegeDataSource\")){\n ds = new HopeCollegeDataSource();\n }else if(source.equals(\"CityOfHollandDataSource\")){\n ds = new CityOfHollandDataSource();\n }else if(source.equals(\"ExtendedCoHDataSource\")){\n ds = new ExtendedCoHDataSource();\n }else if(source.equals(\"UserTreeDataSource\")) {\n ds = MainActivity.userTreeDataSourceGlobal;\n }else if(source.equals(\"AllUsersDataSource\")){\n ds = new AllUsersDataSource();\n } else{\n ds = new ITreeDataSource();\n }\n ds.initialize(Maps_Activity.this, null);\n MainActivity.treesNearby.clear();\n Tree newTree = ds.search(new TreeLocation(marker.getPosition().latitude, marker.getPosition().longitude));\n if(newTree != null && !newTree.getCommonName().equals(\"Unknown\")){\n marker.setTitle(newTree.getCommonName());\n if(marker.getSnippet().equals(\"Holland, MI\") && newTree.getInfo(\"Park\") != null){\n marker.setSnippet(newTree.getInfo(\"Park\").toString());\n }\n break;\n }\n }\n }\n if(marker.getSnippet().equals(\"Holland, MI\")){\n DataSource ds = new CityOfHollandDataSource();\n ds.initialize(Maps_Activity.this, null);\n MainActivity.treesNearby.clear();\n Tree newTree = ds.search(new TreeLocation(marker.getPosition().latitude, marker.getPosition().longitude));\n if(newTree.getInfo(\"Park\") != null){\n marker.setSnippet(newTree.getInfo(\"Park\").toString());\n }\n }\n marker.showInfoWindow();\n return true;\n }\n });\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Bundle bundle = new Bundle();\n if(!marker.getTitle().equals(\"My Position\")) {\n if(!marker.getTitle().equals(\"Current Position\")) {\n latitude = marker.getPosition().latitude;\n longitude = marker.getPosition().longitude;\n\n TreeLocation testing = new TreeLocation(latitude, longitude);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n Set<String> sources = prefs.getStringSet(\"databasesUsedSelector\", new HashSet<String>());\n for (String source : sources) {\n Log.d(\"MainActivity\", \"Searching. Trying: \" + source);\n DataSource ds;\n if (source.equals(\"HopeCollegeDataSource\")) {\n ds = new HopeCollegeDataSource();\n } else if (source.equals(\"CityOfHollandDataSource\")) {\n ds = new CityOfHollandDataSource();\n } else if (source.equals(\"ExtendedCoHDataSource\")) {\n ds = new ExtendedCoHDataSource();\n } else if (source.equals(\"UserTreeDataSource\")) {\n ds = MainActivity.userTreeDataSourceGlobal;\n } else if (source.equals(\"AllUsersDataSource\")) {\n ds = new AllUsersDataSource();\n } else {\n ds = new ITreeDataSource();\n }\n if (ds instanceof AllUsersDataSource) {\n MainActivity.banana = MainActivity.allUsersDataSource.search(testing);\n }else if(ds instanceof UserTreeDataSource){\n MainActivity.userTreeDataSourceGlobal.setUserTrees(MainActivity.allUsersDataSource.getUserTrees());\n MainActivity.banana = MainActivity.userTreeDataSourceGlobal.search(testing);\n }else{\n ds.initialize(Maps_Activity.this, null);\n MainActivity.treesNearby.clear();\n MainActivity.banana = ds.search(testing);\n }\n if (MainActivity.banana != null) {\n if(MainActivity.banana.getClosestDist() < closest1) {\n closest1 = MainActivity.banana.getClosestDist();\n closestTree = MainActivity.banana;\n }\n }\n }\n\n if(closestTree != null) {\n MainActivity.banana = closestTree;\n }\n Intent intentA = new Intent(Maps_Activity.this, Tree_Info_First.class);\n mMap.clear();\n startActivity(intentA);\n }\n\n } else {\n android.support.v7.app.AlertDialog.Builder builder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n builder = new android.support.v7.app.AlertDialog.Builder(Maps_Activity.this, android.R.style.Theme_Material_Light_Dialog_Alert);\n } else {\n builder = new android.support.v7.app.AlertDialog.Builder(Maps_Activity.this);\n }\n builder.setTitle(\"No Tree Identified\")\n .setMessage(\"You must select a tree to receive the information!\")\n .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }\n }\n });\n\n Set<String> sources = prefs.getStringSet(\"databasesUsedSelector\",new HashSet<String>());\n Iterator<String> it = sources.iterator();\n for (String source : sources) {\n\n DataSource ds;\n if(source.equals(\"HopeCollegeDataSource\")){\n ds = new HopeCollegeDataSource();\n }else if(source.equals(\"CityOfHollandDataSource\")){\n ds = new CityOfHollandDataSource();\n }else if(source.equals(\"ExtendedCoHDataSource\")){\n ds = new ExtendedCoHDataSource();\n }else if(source.equals(\"UserTreeDataSource\")){\n ds = MainActivity.userTreeDataSourceGlobal;\n }else if(source.equals(\"AllUsersDataSource\")){\n ds = new AllUsersDataSource();\n }else{\n ds = new ITreeDataSource();\n }\n\n ds.initialize(Maps_Activity.this, null);\n MainActivity.treesNearby.clear();\n Iterable<CSVRecord> stuff = null;\n int treeField = 0;\n String location42 = \"\";\n\n if (ds instanceof CityOfHollandDataSource) {\n stuff = ds.getCoordinates(Maps_Activity.this, \"/data/user/0/com.example.treesapv2new/files/COHTreeData.csv\");\n treeField = 1;\n location42 = \"blah blah blah\";\n whichSource = false;\n } else if (ds instanceof HopeCollegeDataSource) {\n stuff = ds.getCoordinates(Maps_Activity.this, \"/data/user/0/com.example.treesapv2new/files/HCTreeData.csv\");\n treeField = 2;\n location42 = \"Hope College Pine Grove\";\n whichSource = true;\n } else if (ds instanceof ITreeDataSource) {\n stuff = ds.getCoordinates(Maps_Activity.this, \"/data/user/0/com.example.treesapv2new/files/iTreeTreeData.csv\");\n treeField = 2;\n location42 = \"Hope College Pine Grove\";\n whichSource = true;\n } else if (ds instanceof ExtendedCoHDataSource){\n stuff = ds.getCoordinates(Maps_Activity.this, \"/data/user/0/com.example.treesapv2new/files/ECOHdata.csv\");\n treeField = 1;\n location42= \"Holland, MI\";\n whichSource = false;\n } else if (ds instanceof UserTreeDataSource){\n stuff = null;\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n FirebaseAuth mAuth = FirebaseAuth.getInstance();\n FirebaseUser user = mAuth.getCurrentUser();\n db.collection(\"acceptedTrees\").get().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 ArrayList<String> pic = (ArrayList<String>) document.getData().get(\"pictures\");\n String a = (String) document.getData().get(\"userID\").toString();\n String b = \"\";\n try{\n b = user.getUid();\n }catch (NullPointerException e){\n\n }\n if(a.equals(b)) {\n try {\n Double latitude = Double.valueOf(document.getData().get(\"latitude\").toString());\n Double longitude = Double.valueOf(document.getData().get(\"longitude\").toString());\n if (latitude != null && longitude != null) {\n LatLng coords = new LatLng(Double.valueOf(latitude), Double.valueOf(longitude));\n if (ds.getClass().equals(CityOfHollandDataSource.class)) {\n }\n try {\n String name = document.getData().get(\"commonName\").toString();\n int iconInt = randomGenerator.nextInt(8);\n BitmapDescriptor icon;\n String user = (String) document.getData().get(\"userID\");\n if(mAuth.getCurrentUser().getUid().equals(user)){\n icon = BitmapDescriptorFactory.fromResource(R.drawable.user_tree_marker1);\n }else {\n switch (iconInt) {\n // Hey whoever works on this app next I would recommend making the icons better.\n // I couldn't see a way to set both the color and picture of the marker programmatically,\n // so I just made them myself in Paint3d and had the computer \"randomly\" choose one.\n // If you guys know how to make them better or some way of programmatically setting them that would be dope - Josie\n case 0:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n case 1:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker_1);\n break;\n case 2:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker2);\n break;\n case 3:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker3);\n break;\n case 4:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker4);\n break;\n case 5:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker5);\n break;\n case 6:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker6);\n break;\n case 7:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker7);\n break;\n default:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n }\n }\n mMap.addMarker(new MarkerOptions().position(coords).title(name).snippet(\"Your tree\").icon(icon));//BitmapDescriptorFactory.fromBitmap(bmp)));\n } catch (ArrayIndexOutOfBoundsException e) {\n\n }\n }\n } catch (Exception e) {\n continue;\n }\n }\n }\n } else {\n Toast toast = Toast.makeText(parent, \"Unable to load trees.\", Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n\n } else if (ds instanceof AllUsersDataSource){\n stuff = null;\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n CollectionReference users = db.collection(\"pendingTrees\");\n db.collection(\"acceptedTrees\").get().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 ArrayList<String> pic = (ArrayList<String>) document.getData().get(\"pictures\");\n try {\n Double latitude = Double.valueOf(document.getData().get(\"latitude\").toString());\n Double longitude = Double.valueOf(document.getData().get(\"longitude\").toString());\n if (latitude != null && longitude != null) {\n LatLng coords = new LatLng(Double.valueOf(latitude), Double.valueOf(longitude));\n try {\n String user = (String) document.getData().get(\"userID\");\n if(!mAuth.getCurrentUser().getUid().equals(user)) {\n String name = document.getData().get(\"commonName\").toString();\n\n BitmapDescriptor icon;\n String snippet = \"\";\n int iconInt = randomGenerator.nextInt(8);\n switch (iconInt) {\n case 0:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n case 1:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker_1);\n break;\n case 2:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker2);\n break;\n case 3:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker3);\n break;\n case 4:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker4);\n break;\n case 5:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker5);\n break;\n case 6:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker6);\n break;\n case 7:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker7);\n break;\n default:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n }\n\n if (snippet.equals(\"\")) {\n snippet = \"User submitted\";\n }\n mMap.addMarker(new MarkerOptions().position(coords).title(name).snippet(snippet).icon(icon));//BitmapDescriptorFactory.fromBitmap(bmp)));\n\n }\n }catch (ArrayIndexOutOfBoundsException e) {\n\n }\n }\n } catch (Exception e) {\n continue;\n }\n }\n } else {\n Toast toast = Toast.makeText(parent, \"Unable to load trees.\", Toast.LENGTH_LONG);\n }\n }\n });\n }\n if (stuff == null) {\n continue;\n }\n int count =-1;\n for (CSVRecord record : stuff) {\n count++;\n if(count>2278){\n break;\n }\n String latitude;\n String longitude;\n if(!whichSource) {\n if(ds instanceof ExtendedCoHDataSource){\n latitude = record.get(\"y_coord\");\n longitude = record.get(\"x_coord\");\n }else{\n latitude = record.get(\"Latitude\");\n longitude = record.get(\"Longitude\");\n }\n }\n else{\n latitude = record.get(Tree.LATITUDE);\n longitude = record.get(Tree.LONGITUDE);\n }\n if (latitude != null && longitude != null) {\n if (latitude.matches(\"^-?[0-9]\\\\d*(\\\\.\\\\d+)?$\")) {\n if (longitude.matches(\"^-?[0-9]\\\\d*(\\\\.\\\\d+)?$\")) {\n LatLng coords = new LatLng(Double.valueOf(latitude), Double.valueOf(longitude));\n if (ds.getClass().equals(CityOfHollandDataSource.class)) {\n location42 = record.get(\"Park\");\n }\n try {\n String name = Transform.ChangeName(record.get(treeField));\n if(name == \"\"){\n name = \"N/A\";\n }\n int iconInt = randomGenerator.nextInt(8);\n BitmapDescriptor icon;\n switch (iconInt){\n case 0:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n case 1:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker_1);\n break;\n case 2:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker2);\n break;\n case 3:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker3);\n break;\n case 4:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker4);\n break;\n case 5:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker5);\n break;\n case 6:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker6);\n break;\n case 7:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker7);\n break;\n default:\n icon = BitmapDescriptorFactory.fromResource(R.drawable.tree_marker0);\n break;\n }\n mMap.addMarker(new MarkerOptions().position(coords).title(name).snippet(location42).icon(icon));//BitmapDescriptorFactory.fromBitmap(bmp)));\n }catch(ArrayIndexOutOfBoundsException e) {\n\n }\n\n }\n }\n }\n }\n it.next();\n }\n\n LatLng hope = new LatLng(42.788002, -86.105971);\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(PERMS, REQUEST_ID);\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hope, zoom));\n return;\n } else {\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n boolean isGPSEnabled = locationManager\n .isProviderEnabled(LocationManager.GPS_PROVIDER);\n boolean isNetworkEnabled = locationManager\n .isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n Criteria criteria = new Criteria();\n Location location1 = null;\n Location defaultLocation = new Location(\"\");\n defaultLocation.setLatitude(42.788002);\n defaultLocation.setLongitude(-86.105971);\n List<String> provs = locationManager.getAllProviders();\n\n String a = LocationManager.GPS_PROVIDER;\n location1 = locationManager.getLastKnownLocation(a);\n Location location2 = location;\n for(String prov : provs) {\n if (locationManager.getLastKnownLocation(prov) != null) {\n if (!prov.equals(\"gps\")) {\n defaultLocation = locationManager.getLastKnownLocation(prov);\n } else {\n location1 = locationManager.getLastKnownLocation(prov);\n }\n if (location1 != null) {\n break;\n }\n }\n }\n if(location==null){\n location1 = defaultLocation;\n }\n double latitude,longitude;\n if(location1 == null){\n onLocationChanged(location2);\n latitude = location2.getLatitude();\n longitude = location2.getLongitude();\n }else {\n onLocationChanged(location1);\n latitude = location1.getLatitude();\n longitude = location1.getLongitude();\n }\n\n LatLng currentLocation = new LatLng(latitude, longitude);\n if (locMarker == true) {\n mCurrLocationMarker = mMap.addMarker(new MarkerOptions().position(currentLocation)\n .title(\"Current Position\").snippet(\"This is you!\")\n .icon(defaultMarker(personalMarker)));\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, zoom));\n }\n\n }", "public void tests() {\n this.testStartBaseLocationsDraw();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n\n MarkerOptions markerOptions =new MarkerOptions().position(x).title(\"abane ramdane\");\n CircleOptions circleOptions = new CircleOptions().center(x).radius(1000).fillColor(0xffffff0).strokeColor(0xffff0000).strokeWidth(2);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.house));\n mMap.addMarker(markerOptions);\n mMap.addCircle(circleOptions);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(x, 13));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add LatLng values for all the points of interest on the map.\n LatLng center = new LatLng(53.411068, -2.982297);\n LatLng james = new LatLng(53.412226, -2.981376);\n LatLng tom = new LatLng(53.413403, -2.980732);\n LatLng marybone = new LatLng(53.411238, -2.987441);\n LatLng library = new LatLng(53.411137, -2.988401);\n LatLng henry = new LatLng(53.410551, -2.984382);\n LatLng cherie = new LatLng(53.412666, -2.981698);\n LatLng tower = new LatLng(53.410537, -2.974883);\n LatLng peter = new LatLng(53.412086, -2.980728);\n LatLng kingsway = new LatLng(53.409686, -2.985622);\n\n // Add properties for the camera positioning.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 15));\n\n\n // Add markers for each point on the map.\n mMap.addMarker(new MarkerOptions().position(james).title(\"James Parson's Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tom).title(\"Tom Reilly Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(marybone).title(\"Marybone Lecture Theatre\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(library).title(\"Avril Robarts LRC\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(henry).title(\"Henry Cotton Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(cherie).title(\"Cherie Booth Lecture Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tower).title(\"LJMU Tower\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(peter).title(\"Peter Jost Enterprise Center\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(kingsway).title(\"Kingsway House\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n }", "@Test\r\n public void testAllPoints() {\r\n Path all = backend.getPoints();\r\n int numPointsInterest = 0; // Store number of points of interest\r\n // Verify all intersections\r\n if(all.getPath().size() != intersections.size())\r\n fail(\"Failed to get all intersections\");\r\n // Get number of points of interest\r\n for(int i = 0; i < intersections.size(); i++) {\r\n numPointsInterest += intersections.get(i).getPointOfInterests().size();\r\n }\r\n if(all.getPOI().size() != numPointsInterest)\r\n fail(\"Failed to get all points of interest\");\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n this.googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(10.3157, 123.8854), 15.00f));\n this.googleMap.setOnMarkerClickListener(this);\n\n /*LatLng sunrise = new LatLng(10.2778832, 123.8530936);\n\n this.googleMap.addMarker(new MarkerOptions().position(sunrise).title(\"Sunrise\"));*/\n retrieveJobs();\n //LatLng sunrise = new LatLng(10.2778832,123.8530936);\n //this.googleMap.addMarker(new MarkerOptions().position(sunrise).title(\"Sunrise\"));\n }", "public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }", "private void retrieveListings(GoogleMap googleMap) {\n Projection projection = googleMap.getProjection();\n VisibleRegion visibleRegion = projection.getVisibleRegion();\n LatLng sw = visibleRegion.latLngBounds.southwest;\n LatLng ne = visibleRegion.latLngBounds.northeast;\n double left = sw.longitude;\n double bottom = sw.latitude;\n double right = ne.longitude;\n double top = ne.latitude;\n\n // Find listings on the visible region of the map\n queryListings(left, right, top, bottom);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n for(int i=0; i<coordinatesStringList.length; i+=2){\n pont = new LatLng(Double.parseDouble(coordinatesStringList[i]), Double.parseDouble(coordinatesStringList[i+1]));\n latLngList.add(pont);\n MarkerOptions markerOptions=new MarkerOptions();\n mMap.addMarker(new MarkerOptions().position(pont).title(\"Marker in Sydney\").icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)));\n\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n// Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n// ArrayList<String> addresses = geocoder.getFromLocation(marker.getPosition().latitude(), marker.getPosition().longitude(), 1); //1 num of possible location returned\n// String address = addresses.get(0).getAddressLine(0); //0 to obtain first possible address\n// String city = addresses.get(0).getLocality();\n// String state = addresses.get(0).getAdminArea();\n// String country = addresses.get(0).getCountryName();\n// String postalCode = addresses.get(0).getPostalCode();\n// //create your custom title\n// String title = address +\"-\"+city+\"-\"+state;\n// marker.setTitle(title);\n// marker.showInfoWindow();\n// return true;\n// }\n// });\n }\n\n\n PolylineOptions polylineOptions = new PolylineOptions();\n\n// Create polyline options with existing LatLng ArrayList\n polylineOptions.addAll(latLngList);\n polylineOptions\n .width(5)\n .color(Color.RED);\n\n// Adding multiple points in map using polyline and arraylist\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.addPolyline(polylineOptions);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n try {\n parseResponse(new JSONObject(responseStr));\n addMarkers(establishments);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n mMap.setOnMarkerClickListener(this);\n }", "private void plottingMarkers(){\r\n if (nameList.size()==0) {\r\n }\r\n else {\r\n for (int i = 0; i < nameList.size(); i++) {\r\n Loc2LatLng = new LatLng(Double.parseDouble(latList.get(i)), Double.parseDouble(lngList.get(i)));\r\n MarkerOptions markerSavedLocations = new MarkerOptions();\r\n markerSavedLocations.title(nameList.get(i));\r\n markerSavedLocations.position(Loc2LatLng);\r\n map.addMarker(markerSavedLocations);\r\n }\r\n }\r\n }", "@SuppressWarnings({ \"unchecked\", \"deprecation\" })\r\n\t@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.full_screen_map_fragment);\r\n\t\tgMap = ((SupportMapFragment) getSupportFragmentManager()\r\n\t\t\t\t.findFragmentById(R.id.map)).getMap();\r\n\t\tfinal GoogleMap gmap = gMap;\r\n\t\tmapFragment = (MeMapFragment) getSupportFragmentManager()\r\n\t\t\t\t.findFragmentById(R.id.map_fragment);\r\n\t\tshowDialog(0);\r\n\r\n\t\ttry {\r\n\t\t\ttask = new AsyncTask<ArrayList<Integer>, Integer, ArrayList<LatLng>>() {\r\n\t\t\t\tprotected ArrayList<LatLng> doInBackground(\r\n\t\t\t\t\t\tArrayList<Integer>... loc) {\r\n\t\t\t\t\tArrayList<LatLng> result = new ArrayList<LatLng>();\r\n\t\t\t\t\tArrayList<Integer> coordinates = loc[0];\r\n\t\t\t\t\tclearBounds();\r\n\t\t\t\t\tfor (int i = 0; i < coordinates.size() - 1; i += 2) {\r\n\t\t\t\t\t\tint x = coordinates.get(i);\r\n\t\t\t\t\t\tint y = coordinates.get(i + 1);\r\n\t\t\t\t\t\tOSRef or = new OSRef(x, 1000000 - y);\r\n\t\t\t\t\t\tuk.me.jstott.jcoord.LatLng ll = or.toLatLng();\r\n\t\t\t\t\t\tll.toWGS84();\r\n\t\t\t\t\t\tLatLng lln = new LatLng(ll.getLat(), ll.getLng());\r\n\t\t\t\t\t\tresult.add(lln);\r\n\t\t\t\t\t\taddPointInBounds(lln);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType.containsKey(i)) {\r\n\t\t\t\t\t\t\t//this is a marker\r\n\t\t\t\t\t\t\t//TODO find station codes for departures.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprotected void onProgressUpdate(Integer... progress) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprotected void onPostExecute(ArrayList<LatLng> result) {\r\n\t\t\t\t\tif (result.size() < 2) {\r\n\t\t\t\t\t\twait_dialog.cancel();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint color = Color.BLUE;\r\n\t\t\t\t\tint icon = 0;\r\n\t\t\t\t\t// First the route\r\n\t\t\t\t\tPolylineOptions line = new PolylineOptions().width(9);\r\n\t\t\t\t\tfor (int i = 0; i < result.size(); i++) {\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType.containsKey(i)) {\r\n\t\t\t\t\t\t\tif (i != 0) {\r\n\t\t\t\t\t\t\t\tgmap.addPolyline(line);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tline = new PolylineOptions().width(9);\r\n\t\t\t\t\t\t\tArrayList<Object> array = RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t\t.get(i);\r\n\t\t\t\t\t\t\tcolor = (Integer) array.get(0);\r\n\t\t\t\t\t\t\tif (color == Color.WHITE)\r\n\t\t\t\t\t\t\t\tcolor = Color.BLACK;\r\n\t\t\t\t\t\t\tline.color(color);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tline.add(result.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (line.getPoints().size() > 1)\r\n\t\t\t\t\t\tgmap.addPolyline(line);\r\n\r\n\t\t\t\t\t// And then the pushpins\r\n\t\t\t\t\tfinal ArrayList<Marker> markers = new ArrayList<Marker>();\r\n\t\t\t\t\tfor (int i = 1; i < result.size(); i++) {\r\n\t\t\t\t\t\tif (RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t.containsKey(i - 1)) {\r\n\t\t\t\t\t\t\tArrayList<Object> array = RouteResultsActivity.coordinatesType\r\n\t\t\t\t\t\t\t\t\t.get(i - 1);\r\n\t\t\t\t\t\t\ticon = (Integer) array.get(1);\r\n\t\t\t\t\t\t\tif (icon == R.drawable.walk)\r\n\t\t\t\t\t\t\t\ticon = R.drawable.walk_black;\r\n\r\n\t\t\t\t\t\t\tMarkerOptions opt = new MarkerOptions();\r\n\t\t\t\t\t\t\topt.position(result.get(i - 1));\r\n\t\t\t\t\t\t\tLog.d(\"Point\", result.get(i-1).toString());\r\n\t\t\t\t\t\t\topt.icon(BitmapDescriptorFactory.fromResource(icon));\r\n\t\t\t\t\t\t\topt.title(\"Change\");\r\n\t\t\t\t\t\t\topt.snippet((String) array.get(2));\r\n\t\t\t\t\t\t\tmarkers.add(gmap.addMarker(opt));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_dialog.cancel();\r\n\t\t\t\t\tmapFragment.getView().post(new Runnable() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tResources r = getResources();\r\n\t\t\t\t\t\t\tfloat px = TypedValue.applyDimension(\r\n\t\t\t\t\t\t\t\t\tTypedValue.COMPLEX_UNIT_DIP, 40,\r\n\t\t\t\t\t\t\t\t\tr.getDisplayMetrics());\r\n\t\t\t\t\t\t\tgMap.animateCamera(CameraUpdateFactory\r\n\t\t\t\t\t\t\t\t\t.newLatLngBounds(getBounds(), (int) px));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\ttask.execute(RouteResultsActivity.coordinates);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t}\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 }", "@Test\n\tpublic void testGetOffsetsAgainstGeographiclibData() {\n\t\tfor(Point p: s_testPoints) {\n\t\t\tAssert.assertEquals(p.m, Geoid.getOffset(p.l), 0.015);\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n final LatLng thirdIntersection = new LatLng(45.425329, -75.682833);\n final LatLng fourthIntersection = new LatLng(45.426029, -75.681261);\n mMap = googleMap;\n\n // Moving the camera\n LatLngBounds Ottawa = new LatLngBounds(new LatLng(45.421536,-75.682823), new LatLng(45.426280, -75.679894));\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(Ottawa, 0));\n\n // Adding the path\n Polyline polyline = mMap.addPolyline(new PolylineOptions().width(8).color(Color.RED).clickable(true).add(\n new LatLng(45.422159, -75.680215),\n new LatLng(45.425329, -75.682833),\n new LatLng(45.426029, -75.681261)\n ));\n\n // Creating a custom marker\n Marker marker1 = mMap.addMarker(new MarkerOptions().position(new LatLng(45.422159, -75.680215)).title(\"Current Location\"));\n marker1.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.dot));\n\n // Moving the marker\n animateMarker(marker1,thirdIntersection, fourthIntersection);\n }" ]
[ "0.64598536", "0.6452937", "0.64376193", "0.61442536", "0.59919214", "0.5953862", "0.5888364", "0.5888015", "0.5803986", "0.57872224", "0.5779036", "0.57405937", "0.573912", "0.57311225", "0.57035756", "0.5684595", "0.5628858", "0.56068265", "0.55913997", "0.5589005", "0.5566328", "0.5563806", "0.5547542", "0.5516315", "0.55133253", "0.55079424", "0.54924345", "0.54885894", "0.54805285", "0.5480376", "0.5469829", "0.54612875", "0.5436094", "0.5434312", "0.54316795", "0.5418843", "0.54077363", "0.53994435", "0.53853977", "0.5378338", "0.53765815", "0.5369116", "0.5359788", "0.5357025", "0.53569496", "0.5347668", "0.53428483", "0.5310191", "0.530328", "0.52987355", "0.52957255", "0.5295418", "0.52868086", "0.52760077", "0.5271781", "0.526776", "0.5266983", "0.52275455", "0.5223892", "0.521297", "0.52114415", "0.52046365", "0.51965594", "0.519495", "0.5194612", "0.51817024", "0.5175662", "0.51727974", "0.5164982", "0.5161807", "0.5155454", "0.5152848", "0.5150739", "0.51459605", "0.5139541", "0.5138092", "0.5130339", "0.5119133", "0.5114316", "0.5108831", "0.5106932", "0.5102716", "0.51003", "0.5089529", "0.5089121", "0.50882584", "0.50813025", "0.50785565", "0.507238", "0.50692344", "0.50684106", "0.50646394", "0.5064499", "0.50626194", "0.50623024", "0.5060741", "0.5055324", "0.5054218", "0.5046596", "0.50448114" ]
0.77183723
0
Called from VolleyRequester. Handles the JSONObjects received when we requested new geofences from the server
@Override public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){ /*This is a call from the VolleyRequester, so this check prevents the app from crashing if the user leaves the tab while the app is trying to get quests from the server */ MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity == null){ return; } try { Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences); TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : handleNewGeofences"); if (mainActivity != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : mainActivity not null"); if (geofencesContent != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : geofencesContent not null"); btnRequestGeofences.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent); drawGeofences(geofencesContent); } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){ btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); txtRequestGeofences.setVisibility(View.VISIBLE); } } }catch (IllegalStateException e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "@Override\n public void onRequestSuccess(JSONObject jsonResponse) {\n\n try {\n\n ArrayList<Place> places = new ArrayList<>();\n JSONArray venueArray = jsonResponse.getJSONArray(\"venues\");\n\n // extract Place object from json response and put in array\n for (int i = 0; i < venueArray.length(); i++) {\n JSONObject jo = venueArray.getJSONObject(i);\n places.add(extractFromJSON(jo));\n }\n\n if (listener != null) {\n listener.onPlacesFetchSuccess(places);\n }\n db.addPlaces(places);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n if (listener != null) {\n listener.onPlaceFetchFail(\"Something went wrong parsing response\");\n }\n }\n\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void handleResult(GeofenceInfoObject result) {\n super.handleResult(result);\n\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n if(this.isResumed()) {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity != null) {\n final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info);\n final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n if(result == null){\n if(currentGeofences != null){\n if(currentGeofences.size() != 0){\n //If the result is null and it shouldn't be, displays error and allows user to request\n //information again\n btnRequestInfo.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n btnRequestInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info));\n btnRequestInfo.setVisibility(View.GONE);\n handleGeofenceChange(currentGeofences);\n }\n });\n }\n }\n }\n\n if (result != null) {\n try {\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result length is: \" + result.getContent().size());\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result is: \" + result.getContent().toString());\n\n btnRequestInfo.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n if(debugMode) {\n displayGeofenceInfo();\n }\n addMarker(result.getContent());\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }", "private void getMarkers() {\n StringRequest strReq = new StringRequest(Request.Method.POST, Config.URL_GET_ALL_DEALER_SVC, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.e(\"Response: \", response);\n\n try {\n JSONObject jObj = new JSONObject(response);\n String getObject = jObj.getString(Config.TAG_JSON_ARRAY);\n JSONArray jsonArray = new JSONArray(getObject);\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n coy_dealer = jsonObject.getString(Config.MAPS_COY_DEALER);\n kd_dealer = jsonObject.getString(Config.MAPS_KD_DEALER);\n title = jsonObject.getString(Config.MAPS_NAMA_DEALER);\n description = jsonObject.getString(Config.MAPS_ALAMAT_DEALER);\n latLng = new LatLng(Double.parseDouble(jsonObject.getString(Config.MAPS_LAT)),\n Double.parseDouble(jsonObject.getString(Config.MAPS_LNG)));\n nview = jsonObject.getString(Config.MAPS_NVIEW);\n naccess = jsonObject.getString(Config.MAPS_NACCESS);\n\n // Menambah data marker untuk di tampilkan ke google map\n addMarker(latLng, title, description, kd_dealer, coy_dealer, nview, naccess);\n }\n\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error: \", error.getMessage());\n Toast.makeText(ListDealerMaps.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n\n AppController.getInstance().addToRequestQueue(strReq, Config.TAG_JSON_OBJ);\n }", "private void populateRepList(String mode, String zipcode, String location) {\n String request;\n //create api link\n if (mode.equals(\"zipcode\")) {\n request= site + \"zip=\" + zipcode + api;\n } else {\n String[] lalo = location.split(\"/\");\n request = site + \"latitude=\" + lalo[0] + \"&longitude=\" + lalo[1] + api;\n }\n\n //send api request\n Log.d(\"T\", \"request to sunlight: \" + request);\n final TextView stat = (TextView) findViewById(R.id.ppl);\n PeopleData.people = new ArrayList<Representative>();\n JsonObjectRequest jsObjRequest = new JsonObjectRequest\n (Request.Method.GET, request, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject jRepList) {\n try{\n //update number of representatives received\n totalNum = jRepList.getInt(\"count\");\n JSONArray results = jRepList.optJSONArray(\"results\");\n\n //add people to PeopleData\n for (int i=0; i<totalNum; i++) {\n JSONObject person = results.getJSONObject(i);\n String name = person.getString(\"first_name\")+\" \"+person.getString(\"last_name\");\n String title;\n if (person.getString(\"title\").equals(\"Sen\")){\n title = \"Senator\";\n sNum++;\n } else { title = \"Representative\"; }\n String party;\n if (person.getString(\"party\").equals(\"R\")){\n party = \"Republican\";\n } else if (person.getString(\"party\").equals(\"D\")) {\n party = \"Democrat\";\n } else { party = \"Independent\"; }\n String email = person.getString(\"oc_email\");\n String website = person.getString(\"website\");\n String term = person.getString(\"term_end\");\n String id = person.getString(\"bioguide_id\");\n String twitterId = person.getString(\"twitter_id\");\n\n PeopleData.people.add(new Representative(id, name, title, party, email,\n website, \"\", term, \"\", twitterId));\n }\n //set stat text\n stat.setText(Integer.toString(sNum) + \" senators and \" + Integer.toString(totalNum - sNum)\n + \" representatives found\");\n\n populateListView();\n registerClickCallback();\n //send info to watch\n startWatch();\n } catch (JSONException e) {e.printStackTrace();}\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO Auto-generated method stub\n }\n });\n MySingleton.getInstance(this).addToRequestQueue(jsObjRequest);\n }", "private void requestMarkers(){\n requestQueue= Volley.newRequestQueue(this);\n listMarkers = new ArrayList<>();\n JsonArrayRequest jsArrayRequest = new JsonArrayRequest(URL_MARKERS, new Listener<JSONArray>() {\n\n @Override\n public void onResponse(JSONArray response) {\n if (idioma.equals(\"español\")){\n for(int i=0; i<response.length(); i++){\n try {\n JSONObject objeto= response.getJSONObject(i);\n MarkerPropio marker = new MarkerPropio(objeto.getString(\"description_es\"),\n objeto.getInt(\"id\"),\n objeto.getDouble(\"latitud\"),\n objeto.getDouble(\"longitud\"),\n objeto.getString(\"title_es\"),\n objeto.getInt(\"num_images\"));\n listMarkers.add(marker);\n } catch (JSONException e) {\n Log.e(TAG, \"Error de parsing: \"+ e.getMessage());\n Toast.makeText(getBaseContext(), getText(R.string.internal_fail), Toast.LENGTH_LONG).show();\n\n }\n }\n } else {\n for(int i=0; i<response.length(); i++){\n try {\n JSONObject objeto= response.getJSONObject(i);\n MarkerPropio marker = new MarkerPropio(objeto.getString(\"description_en\"),\n objeto.getInt(\"id\"),\n objeto.getDouble(\"latitud\"),\n objeto.getDouble(\"longitud\"),\n objeto.getString(\"title_en\"),\n objeto.getInt(\"num_images\"));\n listMarkers.add(marker);\n } catch (JSONException e) {\n Log.e(TAG, \"Error de parsing: \"+ e.getMessage());\n Toast.makeText(getBaseContext(), getText(R.string.internal_fail), Toast.LENGTH_LONG).show();\n }\n }\n }\n addMarkers();\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error Respuesta en JSON: \" + error.getMessage() + \" || \" + error.getLocalizedMessage());\n /*if (markerDao.findMarkers()!=null){\n listMarkers = markerDao.findMarkers();\n addMarkers();\n } else {\n Toast.makeText(getBaseContext(), getText(R.string.server_fail), Toast.LENGTH_LONG).show();\n }*/\n Toast.makeText(getBaseContext(), getText(R.string.server_fail), Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(jsArrayRequest);\n }", "void startAPICall() {\n String url = \"https://www.googleapis.com/civicinfo/v2/representatives?address=\"\n + getParsedAddress(address)\n + \"&key=\" + apiKey;\n final android.content.Context context = getApplicationContext();\n final Toast toast = Toast.makeText(context,\n \"Retrieving data . . .\",\n Toast.LENGTH_SHORT);\n toast.show();\n try {\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(\n Request.Method.GET,\n url,\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(final JSONObject response) {\n Log.d(TAG, response.toString());\n setJsonInformation(response.toString());\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(final VolleyError error) {\n Log.w(TAG, error.toString());\n }\n });\n requestQueue.add(jsonObjectRequest);\n } catch (Exception e) {\n Toast toast2 = Toast.makeText(context,\n \"Failed.\",\n Toast.LENGTH_SHORT);\n toast2.show();\n e.printStackTrace();\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n try {\n parseResponse(new JSONObject(responseStr));\n addMarkers(establishments);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n mMap.setOnMarkerClickListener(this);\n }", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "private void onSearchClick(Location loc) {\n\r\n\r\n Log.d(TAG, \"IN ONSEARCHCLICK\");\r\n\r\n String url;\r\n\r\n\r\n url = \"https://geocode-maps.yandex.ru/a1.x/?format=json&geocode=\" + loc.getLongitude() + \",\" + loc.getLatitude();\r\n\r\n Log.d(TAG, url);\r\n RequestQueue queue = Volley.newRequestQueue(this);\r\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Log.d(TAG, response.toString());\r\n //JSONArray jsonArray = response.getJSONObject(\"results\").getString(\"formattedString\");\r\n //String formattedAdress = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderResponseMetaData\").getString(\"request\");\r\n JSONObject country = null;\r\n JSONObject area = null;\r\n JSONObject city = null;\r\n JSONObject street = null;\r\n JSONObject houseNumber = null;\r\n try {\r\n country = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\");\r\n } catch (JSONException e) {\r\n country = null;\r\n }\r\n try {\r\n area = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\");\r\n } catch (JSONException e) {\r\n area = null;\r\n }\r\n try {\r\n city = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\");\r\n } catch (JSONException e) {\r\n city = null;\r\n }\r\n try {\r\n street = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\");\r\n } catch (JSONException e) {\r\n street = null;\r\n }\r\n try {\r\n houseNumber = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\").getJSONObject(\"Premise\");\r\n } catch (JSONException e) {\r\n houseNumber = null;\r\n }\r\n String text = \"\";\r\n if (country != null) {\r\n// try {\r\n// text += \"Country: \" + country.getString(\"CountryName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n// if (area != null) {\r\n// try {\r\n// text += \"Administrative Area: \" + area.getString(\"AdministrativeAreaName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n if (city != null) {\r\n try {\r\n text +=city.getString(\"LocalityName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (street != null) {\r\n try {\r\n text +=street.getString(\"ThoroughfareName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (houseNumber != null) {\r\n try {\r\n text +=houseNumber.getString(\"PremiseNumber\");\r\n } catch (JSONException e) {\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Log.d(TAG, country);\r\n\r\n addressEditText.setText(text);\r\n getPostCode();\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Log.d(TAG, error.getMessage() + \" ERROR!\");\r\n }\r\n });\r\n\r\n queue.add(request);\r\n\r\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n JSONArray locality=response.getJSONArray(\"locailities\");\n JSONObject local;\n for(int i=0;i<locality.length();i++){\n local=locality.getJSONObject(i);\n localityId.add(local.getString(\"id\"));\n localityName.add(local.getString(\"name\"));\n }\n populateLocalitySpinner(localityName);\n pd.dismiss();\n } catch (JSONException e) {\n e.printStackTrace();\n pd.dismiss();\n }\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "@Override\n public void onSuccess(int statusCode, Headers headers, JsonHttpResponseHandler.JSON json) {\n Log.i(\"doRequest\", json.jsonObject.toString());\n try {\n Log.i(\"doRequest array\", json.jsonObject.getJSONArray(\"results\").toString());\n\n JSONArray jsonArray = json.jsonObject.getJSONArray(\"results\");\n ArrayList<Business> businesses = Business.fromJson(jsonArray);\n\n for (int i=0; i<businesses.size(); i++)\n {\n Business business = businesses.get(i);\n Log.i(TAG, business.getName());\n\n mMap.addMarker(new MarkerOptions().position(business.getLatLng()).title(business.getName()).snippet(business.getAddress()));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(business.getLatLng(), 10));\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n // public ArrayList<Curso> onResponse(JSONObject response) {\n //lectura del Json\n\n //Toast.makeText(getContext(), \"onResponse: \" + response.toString(), Toast.LENGTH_SHORT).show();\n EjercicioG1 ejercicioG1 = null;\n json = response.optJSONArray(\"ejerciciog1\");\n\n ArrayList<EjercicioG1> listaDEjerciciosg1 = new ArrayList<>();\n listaDEjerciciosg1 = new ArrayList<>();\n\n try {\n for (int i = 0; i < json.length(); i++) {\n ejercicioG1 = new EjercicioG1();\n JSONObject jsonObject = null;\n jsonObject = json.getJSONObject(i);\n ejercicioG1.setNameEjercicio(jsonObject.optString(\"nameEjercicioG1\"));\n ejercicioG1.setIdEjercicio(jsonObject.optInt(\"idEjercicioG1\"));\n ejercicioG1.setIdTipo(jsonObject.optInt(\"Tipo_idTipo\"));\n\n listaDEjerciciosg1.add(ejercicioG1);\n\n }\n //Spinner spinner = (Spinner) this.view.findViewById(R.id.sp_Ejercicios_asignar);\n\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n //Toast.makeText(getContext(), \"No se ha podido establecer conexión: \" + response.toString(), Toast.LENGTH_LONG).show();\n\n }\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "@Override\n public void onResponse(String response) {\n\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n\n //obtengo la respuesta del servidor relacionada al contacto, si existe o no\n String Latitud = jObj.getString(\"Latitud\");\n String Longitud = jObj.getString(\"Longitud\");\n String Fecha = jObj.getString(\"Fecha\");\n\n //parseo los datos\n double x_lat = Double.parseDouble(Latitud.toString());\n double x_long = Double.parseDouble(Longitud.toString());\n\n //obtengo los datos de mi ubicacion\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n try {\n List<Address> addresses = geoCoder.getFromLocation(x_lat, x_long, 1);\n\n\n if (addresses.size() > 0){\n for (int i=0; i<addresses.get(0).getMaxAddressLineIndex();i++) {\n direccionCompleta += addresses.get(0).getAddressLine(i) + \" \";\n }\n }\n\n }catch (Exception e1) {\n e1.printStackTrace();\n }\n\n //\n CENTER = new LatLng(x_lat, x_long);\n\n //mapa\n map = mapView.getMap();\n if (map == null) {\n Toast.makeText(getActivity(), \"Map Fragment Not Found or no Map in it\", Toast.LENGTH_SHORT).show();\n }\n\n //muestro la ubiccion\n map.clear();\n\n final LatLng MELBOURNE = new LatLng(x_lat, x_long);\n Marker melbourne = map.addMarker(new MarkerOptions()\n .position(MELBOURNE)\n .title(\"Ultima Ubicacion Conocida\")\n .snippet(direccionCompleta)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker_icon_2)));\n\n melbourne.showInfoWindow();\n\n txtFecha.setText(\"Ultima actualizacion el \"+Fecha);\n\n map.moveCamera(CameraUpdateFactory.zoomTo(16));\n if (CENTER != null) {\n map.animateCamera(CameraUpdateFactory.newLatLng(CENTER), 1750, null);\n }\n\n\n map.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n map.getUiSettings().setZoomControlsEnabled(true);\n\n } else {\n // Error in login. Get the error message\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getActivity(), errorMsg, Toast.LENGTH_LONG).show();\n //logerror = errorMsg;\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getActivity(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "private void update_private(LatLngBounds bounds) {\n\t\tJSONObject response = null;\n\n\t\ttry {\n\t\t\tStringBuffer result = new StringBuffer();\n\n\t\t\tURL url = new URL(BASE_URL +\n\t\t\t\t\t\"lang=\" + mLang +\n\t\t\t\t\t\"&north=\" + bounds.getNe().getLat() +\n\t\t\t\t\t\"&south=\" + bounds.getSw().getLat() +\n\t\t\t\t\t\"&east=\" + bounds.getNe().getLng() +\n\t\t\t\t\t\"&west=\" + bounds.getSw().getLng() +\n\t\t\t\t\t\"&maxRows=\" + MAX_SEARCH_RESULTS);\n\t\t\tPLog.d(TAG, \"Sending geonames URL... \", url);\n\t\t\tBufferedReader buf = BufferedReaderFactory.openBufferedReader(url);\n\t\t\tfor (String line; (line = buf.readLine()) != null;) {\n\t\t\t\tresult.append(line).append(\"\\n\");\n\t\t\t}\n\t\t\tbuf.close();\n\t\t\tPLog.d(TAG, \"Geonames result received !\");\n\t\t\tresponse = new JSONObject(result.toString());\n\n\t\t\t/*\n\t\t\t * Once the first response is received, we adjust the real\n\t\t\t * amount of possible responses for next sends.\n\t\t\t */\n\n\t\t\tif (response.has(\"status\")) {\n\t\t\t\t/* No results found on first request */\n\t\t\t\tthrow (new Exception(\"Bad response status : \" + response.getJSONObject(\"status\").getString(\"message\")));\n\t\t\t}\n\n\t\t\tupdateMarkers(bounds,response);\n\n\t\t\t// Trigger a refresh of map display\n\t\t\tmController.getHandler().sendEmptyMessage(Controller.MSG_INVALIDATE_DISPLAY);\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\tPLog.e(TAG, \"Incorrect URL in search method : \", e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tPLog.e(TAG, \"Error while manipulating stream response : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JSONException e) {\n\t\t\tPLog.e(TAG, \"Error JSON while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\tresponse = null;\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tPLog.e(TAG, \"Error while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onResponse(String response) {\n if(response!=null){\n try {\n JSONObject jsonObj = new JSONObject(response);\n JSONArray array = jsonObj.getJSONArray(\"features\");\n for(int i=0;i<array.length();i++){\n JSONObject item_earthquake = array.getJSONObject(i);\n JSONObject properties = item_earthquake.getJSONObject(\"properties\");\n String magnitude = properties.getString(\"mag\");\n String Location =properties.getString(\"place\");\n String Date = properties.getString(\"time\");\n String Url = properties.getString(\"url\");\n long timeInMilliseconds = Long.parseLong(Date);\n java.util.Date dateObject = new Date(timeInMilliseconds);\n\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM DD, yyyy HH:mm:ss a\");\n String dateToDisplay = dateFormatter.format(dateObject);\n\n earthquakes.add(new earthquake(magnitude,Location,dateToDisplay,Url));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n earthquakeAdapters adapter =new earthquakeAdapters(getApplicationContext(),R.layout.llist_items,earthquakes);\n ListView listView =findViewById(R.id.earthquakes_list);\n listView.setAdapter(adapter);\n\n //implementing item click listener to navigate to the website\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n //implicit intent to be implemented\n earthquake current_earthquake= (earthquake)adapterView.getItemAtPosition(i);\n Uri webpage = Uri.parse(current_earthquake.getUrl());\n Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage);\n startActivity(webIntent);\n }\n });\n\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n String decoded = null; // example for one encoding type\n try { decoded = new String(response, \"UTF-8\");}\n catch (UnsupportedEncodingException e) { e.printStackTrace();}\n\n Log.v(TAG, \"API call onSuccess = \" + statusCode + \", Headers: \" + headers[0] + \", response.length: \" +response.length +\n \", decoded:\" + decoded);\n\n try {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n JSONArray list = new JSONArray(decoded);\n Log.d(TAG, \"API Call postGetRoomWIP getroom returned list.length: \" + list.length());\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n roomArray.clear();\n\n for (int i=0; i < list.length(); i++) {\n JSONObject obj = list.getJSONObject(i);\n String nickName = obj.getString(\"nickname\");\n String mLocation = obj.getString(\"location\");\n String gmtDateString = obj.getString(\"loc_time\");\n // add the guys above to Room roomObj\n Room roomObj = new Room(deviceSingleton.getSecretCode(), nickName, mLocation, gmtDateString);\n Log.d(\"SCXTT\", \"adding room object from returned JSON\");\n roomArray.add(roomObj);\n }\n centerOnThisGuy = deviceSingleton.getCenterOnThisGuy();\n Log.v(TAG, \"WIP remove this next call to updatePointsOnMapWithAPIData and make a notification trigger it like iOS\");\n try {\n updatePointsOnMapWithAPIData();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void getJSON() throws JSONException {\n url = setUrl();\n System.out.println(\"after setAsyncUrl url = \" + url);\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(url)\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if(response.isSuccessful()){\n jString = new String(response.body().string());\n if(V)System.out.println(\"jString = \" + jString);\n try {\n addSearchFragment(jString); // add retrieved search fragments to screen\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }", "@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 requestAddLocationPoint(final String point, final String lPoint , final String city , final String country ) {\n\n // Utils.showLoadingPopup(getActivity());\n if(checkExistLocationPoint(point,lPoint))\n {\n return ;\n }\n String url=\"\";\n HashMap<String, String> data = new HashMap<>();\n switch(point)\n {\n case \"loading\":\n url= Constants.BASE_URL + \"add_loding_point\";\n data.put(\"loding_point\",lPoint);\n data.put(\"loding_city\",city);\n data.put(\"loading_country\",country);\n data.put(\"status\",\"1\");\n break ;\n\n case \"destination\" :\n url= Constants.BASE_URL + \"add_destination_point\";\n data.put(\"destination_point\",lPoint);\n data.put(\"destination_city\",city);\n data.put(\"destination_country\",country);\n data.put(\"status\",\"1\");\n break ;\n }\n\n\n\n HttpPostRequest.doPost(getActivity(), url, Utils.newGson().toJson(data), new HttpRequestCallback() {\n @Override\n public void response(String errorMessage, String responseData) {\n\n // Utils.hideLoadingPopup();\n\n try {\n\n JSONObject jobj = new JSONObject(responseData);\n Boolean status = jobj.getBoolean(\"status\");\n if (status) {\n LocationPointModel locationPointModel = new LocationPointModel();\n locationPointModel.locPoint = lPoint ;\n locationPointModel.city = city ;\n locationPointModel.country = country ;\n switch(point)\n {\n\n case \"loading\" :\n locationPointModel.locId = jobj.getString(\"loding_point_id\") ;\n appGlobal.listLoadingnPoint.add(locationPointModel);\n break ;\n\n case \"destination\" :\n locationPointModel.locId = jobj.getString(\"destination_point_id\") ;\n appGlobal.listDestinationPoint.add(locationPointModel);\n break ;\n }\n\n Toast.makeText(getActivity(), jobj.getString(\"msg\").toString(), Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(getActivity(), jobj.getString(\"msg\").toString(), Toast.LENGTH_SHORT).show();\n }\n } catch (Exception e) {\n Toast.makeText(getActivity(), \"Error getting Data\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n\n @Override\n public void onError(String errorMessage) {\n\n }\n });\n\n }", "public void run(){\n String searchResultString = getUrlContents(directionsRequestUrl);\n try {\n //Turns the response to a JSON object\n JSONObject directionsResultJSON = new JSONObject(searchResultString);\n\n //Parses the JSON object\n JSONArray routesArray = directionsResultJSON.getJSONArray(\"routes\");\n JSONObject route = routesArray.getJSONObject(0);\n\n //Extract the encodedPolylineString\n JSONObject overviewPolylines = route.getJSONObject(\"overview_polyline\");\n polylineEncodedString = overviewPolylines.getString(\"points\");\n\n //Extract the optimized order of the waypoints\n if(route.has(\"waypoint_order\")) {\n //uses this new order to build the orderedDestinations ArrayList\n JSONArray waypoint_order = route.getJSONArray(\"waypoint_order\");\n int[] order = new int[waypoint_order.length()];\n for(int i = 0; i < waypoint_order.length(); i++){\n order[i] = (Integer)waypoint_order.get(i);\n }\n orderedDestinations = calculateOrderedDestinations(order);\n } else {\n orderedDestinations = destinations;\n }\n\n //Inform the message handler that the request was a success\n Message msg = Message.obtain();\n msg.what = 0;\n handler.sendMessage(msg);\n } catch (JSONException e) {\n //error, probably network related\n e.printStackTrace();\n //inform the message handler that the request was a failure\n Message msg = Message.obtain();\n msg.what = 1;\n handler.sendMessage(msg);\n }\n }", "@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }", "private void requestJson(){\n // Showing progress dialog before making http request\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Loading...\");\n pDialog.show();\n\n\n // Creating volley request obj\n JsonArrayRequest qualificationReq = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.d(TAG, response.toString());\n hidePDialog();\n\n // Parsing json\n qualificationList.clear();\n JsonStorage.writeFileInternalStorage(response.toString(), getActivity().getApplicationContext(), JSON_FILE_NAME);\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n\n Qualification qualification =\n new Qualification(obj.getString(\"name\"),\n obj.optString(\"created_at\"),\n obj.optString(\"updated_at\"),\n null,null);\n\n // Subjects is json array\n JSONArray subjArray = obj.getJSONArray(\"subjects\");\n ArrayList<Subject> subjects = new ArrayList<Subject>();\n for (int j = 0; j < subjArray.length(); j++) {\n Subject sub = new Subject(subjArray.getJSONObject(j).getString(\"id\"),\n subjArray.getJSONObject(j).optString(\"title\"),\n subjArray.getJSONObject(j).optString(\"colour\"));\n\n subjects.add(sub);\n }\n qualification.setSubjects(subjects);\n\n // Subjects is json array\n JSONArray prodArray = obj.getJSONArray(\"default_products\");\n ArrayList<Product> products = new ArrayList<Product>();\n for (int k = 0; k < prodArray.length(); k++) {\n Product prod = new Product(prodArray.getJSONObject(k).getString(\"id\"),\n prodArray.getJSONObject(k).optString(\"title\"),\n prodArray.getJSONObject(k).optString(\"type\"));\n\n products.add(prod);\n }\n qualification.setDefaultProducts(products);\n\n // adding qualification to array\n qualificationList.add(qualification);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n // notifying list adapter about data changes\n // so that it renders the list view with updated data\n adapter.notifyDataSetChanged();\n swipeLayout.setRefreshing(false);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n try {\n String json = JsonStorage.readFileInternalStorage(JSON_FILE_NAME, getActivity().getApplicationContext());\n if (!json.equals(\"\")) {\n JSONArray response = new JSONArray(json);\n // Parsing json\n qualificationList.clear();\n Toast.makeText(getActivity().getApplicationContext(),\"JSON:\"+response.length(), Toast.LENGTH_SHORT).show();\n\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Qualification qualification = new Qualification(obj.optString(\"name\"),\n obj.optString(\"created_at\"),\n obj.optString(\"updated_at\"),\n null, null);\n\n\n // Subjects is json array\n JSONArray subjArray = obj.getJSONArray(\"subjects\");\n ArrayList<Subject> subjects = new ArrayList<Subject>();\n for (int j = 0; j < subjArray.length(); j++) {\n Subject sub = new Subject(subjArray.getJSONObject(j).getString(\"id\"),\n subjArray.getJSONObject(j).getString(\"title\"),\n subjArray.getJSONObject(j).getString(\"colour\"));\n\n subjects.add(sub);\n }\n qualification.setSubjects(subjects);\n\n // Subjects is json array\n JSONArray prodArray = obj.getJSONArray(\"default_products\");\n ArrayList<Product> products = new ArrayList<Product>();\n for (int k = 0; k < prodArray.length(); k++) {\n Product prod = new Product(prodArray.getJSONObject(k).getString(\"id\"),\n prodArray.getJSONObject(k).getString(\"title\"),\n prodArray.getJSONObject(k).getString(\"type\"));\n\n products.add(prod);\n }\n qualification.setDefaultProducts(products);\n\n // adding qualification to array\n qualificationList.add(qualification);\n\n\n } catch (JSONException ex) {\n\n }\n\n hidePDialog();\n swipeLayout.setRefreshing(false);\n\n }\n }\n\n } catch (Exception ex) {\n\n }\n\n }\n });\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(qualificationReq);\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "public void getCountries() {\n\n\n SimpleProgressBar.showProgress(AddressesActivity.this);\n try {\n final String url = Contents.baseURL + \"getAllCountries\";\n\n StringRequest stringRequest = new StringRequest(Request.Method.POST, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n SimpleProgressBar.closeProgress();\n Log.e(\"device response\", response);\n try {\n JSONObject object = new JSONObject(response);\n String status = object.getString(\"status\");\n String message = object.getString(\"message\");\n if (status.equals(\"1\")) {\n\n country_name = new ArrayList<String>();\n iso_name = new ArrayList<String>();\n JSONArray jsonArray = object.getJSONArray(\"record\");\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject c = jsonArray.getJSONObject(i);\n if (session.getKeyLang().equals(\"Arabic\")) {\n country_name.add(c.getString(\"name_arabic\"));\n } else {\n country_name.add(c.getString(\"name\"));\n }\n iso_name.add(c.getString(\"iso\"));\n }\n\n //Creating the ArrayAdapter instance having the country list\n ArrayAdapter aa = new ArrayAdapter(AddressesActivity.this, android.R.layout.simple_spinner_item, country_name);\n aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spin_country.setAdapter(aa);\n\n spin_country.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n System.out.println(\"OSO NAME===\" + iso_name.get(position));\n getProvinces(iso_name.get(position));\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n for (int i = 0; i < iso_name.size(); i++) {\n if (iso_name.get(i).contains(\"KW\")) {\n position = i;\n //mDob=iso_name.get(position);\n break;\n }\n }\n\n spin_country.setSelection(position);\n\n } else {\n\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n SimpleProgressBar.closeProgress();\n }\n\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (error != null && error.networkResponse != null) {\n Toast.makeText(getApplicationContext(), R.string.server_error, Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(getApplicationContext(), R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n SimpleProgressBar.closeProgress();\n }\n }) {\n @Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"appUser\", \"tefsal\");\n params.put(\"appSecret\", \"tefsal@123\");\n params.put(\"appVersion\", \"1.1\");\n\n Log.e(\"Refsal device == \", url + params);\n\n return params;\n }\n\n };\n\n stringRequest.setRetryPolicy(new DefaultRetryPolicy(30000,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n RequestQueue requestQueue = Volley.newRequestQueue(AddressesActivity.this);\n stringRequest.setShouldCache(false);\n requestQueue.add(stringRequest);\n\n } catch (Exception surError) {\n surError.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n String encodedPolyline = data.getJSONArray(\"routes\").getJSONObject(0).\n getJSONObject(\"overview_polyline\").getString(\"points\");\n List<LatLng> points = PolyUtil.decode(encodedPolyline);\n if (curPoly != null) {\n curPoly.remove();\n }\n curPoly = mMap.addPolyline(new PolylineOptions().addAll(points));\n curPoly.setColor(getColor(R.color.colorAccent));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case Constants.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n mInProgress = false;\n beginAddGeofences(mGeoIds);\n break;\n }\n }\n }", "private void fetchAllEvents() {\n progressDialog.show();\n StringRequest stringRequest = new StringRequest(Request.Method.GET,\n Constants.URL_ALL_EVENTS,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n progressDialog.dismiss();\n\n // response is a JSONArray\n JSONArray jArray = new JSONArray(response);\n\n // extracting JSONObjects from each element of JSONArray\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject jb = jArray.getJSONObject(i);\n int id = jb.getInt(\"id\");\n String name = jb.getString(\"name\");\n String venue = jb.getString(\"venue\");\n String event_date = jb.getString(\"event_date\");\n String reg_deadline = jb.getString(\"reg_deadline\");\n String description = jb.getString(\"description\");\n int organizer_id = jb.getInt(\"organizer_id\");\n\n // creating a new Event object\n Event event = new Event(id, name, venue, event_date,\n reg_deadline, description, organizer_id);\n\n // add object to the array list\n arrayList.add(event);\n // notifying the adapter for the change\n adapter.notifyDataSetChanged();\n\n }\n } catch (JSONException e) {\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.hide();\n Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n\n };\n RequestHandler.getInstance(this).addToRequestQueue(stringRequest);\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "private void BrowseCity() {\n String tag_string_req = \"req_login\";\n cityList.clear();\n loaderDialog.show();\n\n StringRequest strReq = new StringRequest(Request.Method.GET,\n AppConfig.city_list, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"JOB RESPONSE: \" + response.toString());\n\n loaderDialog.dismiss();\n\n Gson gson = new Gson();\n\n try {\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n String status = jobj.get(\"status\").getAsString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").getAsString().replaceAll(\"\\\"\", \"\");\n\n if(status.equals(\"1\")) {\n\n ArrayList<String> state_array = new ArrayList<String>();\n state_array.add(\"Select State\");\n\n JsonArray jarray = jobj.getAsJsonArray(\"data\");\n array1 = new ArrayList<>();\n array1.add(\"City Name\");\n for (int i = 0; i < jarray.size(); i++) {\n JsonObject jobj1 = jarray.get(i).getAsJsonObject();\n //get the object\n\n //JsonObject jobj1 = jarray.get(i).getAsJsonObject();\n String id = jobj1.get(\"id\").toString().replaceAll(\"\\\"\", \"\");\n String name = jobj1.get(\"name\").toString().replaceAll(\"\\\"\", \"\");\n String is_active = jobj1.get(\"is_active\").toString().replaceAll(\"\\\"\", \"\");\n String delete_flag = jobj1.get(\"delete_flag\").toString().replaceAll(\"\\\"\", \"\");\n String state_id = jobj1.get(\"state_id\").toString().replaceAll(\"\\\"\", \"\");\n HashMap<String, String> map_ser = new HashMap<>();\n\n\n map_ser.put(\"id\", id);\n map_ser.put(\"name\", name);\n map_ser.put(\"is_active\", is_active);\n map_ser.put(\"delete_flag\", delete_flag);\n map_ser.put(\"state_id\", state_id);\n\n cityList.add(map_ser);\n\n array1.add(name);\n\n }\n\n dataAdapter1 = new ArrayAdapter(RegisterFlatDetails.this,\n R.layout.item_spinner, R.id.tvCust, array1);\n edt_city_name.setAdapter(dataAdapter1);\n }\n else {\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.SUCCESS);\n\n }\n\n\n\n } catch (Exception e) {\n TastyToast.makeText(getApplicationContext(), \"\", TastyToast.LENGTH_LONG, TastyToast.SUCCESS);\n\n }\n\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"DATA NOT FOUND: \" + error.getMessage());\n TastyToast.makeText(getApplicationContext(), \"\", TastyToast.LENGTH_LONG, TastyToast.SUCCESS);\n loaderDialog.dismiss();\n }\n }) {\n\n\n\n };\n\n // Adding request to request queue\n VolleySingleton.getInstance(RegisterFlatDetails.this)\n .addToRequestQueue(strReq\n .setRetryPolicy(\n new DefaultRetryPolicy(timeOut, nuOfRetry, backOff)));\n\n\n }", "public void submitRequest(String location, WebViewModel vmodel) {\n String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/\" + location + \"?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n //URL below is free API testing\n //String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/%22%20+%20location%20+%20%22?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest\n (Request.Method.GET, weatherUrl, null, new Response.Listener<JSONObject>() {\n\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onResponse(JSONObject response) {\n String cityName = \"\";\n String countryName = \"\";\n String time = \"\";\n String temperature = \"\";\n String maxTemp = \"\";\n String minTemp = \"\";\n String skyCondition = \"\";\n String humidity = \"\";\n String tomorrow = \"\";\n String tonight = \"\";\n JSONArray daysArray;\n SimpleDateFormat dateProperFormat;\n\n try {\n location_splicer(response.getString(\"resolvedAddress\"));\n } catch(JSONException e) {\n System.out.println(\"Error gathering location\");\n }\n try {\n cityName = cityName + cityName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering cityName\");\n }\n try {\n countryName = countryName + countryName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering countryName\");\n }\n\n //Let's get weather objects for each day.\n try {\n daysArray = response.getJSONArray(\"days\");\n } catch (JSONException e) {\n e.printStackTrace();\n daysArray = null;\n System.out.println(\"ERROR DAYSARRAY\");\n }\n\n try {\n Date currentTime = Calendar.getInstance().getTime();\n Locale locale = Locale.getDefault();\n dateProperFormat =\n new SimpleDateFormat (\"yyyy-MM-dd\", locale);\n\n time = daysArray.getJSONObject(0).getString(\"datetime\");\n\n }catch (JSONException e) {\n System.out.println(\"Error gathering time\");\n }\n\n try {\n temperature = daysArray.getJSONObject(0).getString(\"temp\");\n //temperature = response.getJSONObject(\"currentConditions\").getString(\"temp\");\n if (temperature.length() > 2) {\n temperature = temperature.substring(0,2);\n }\n //temperature = response.getJSONArray(\"days\").getJSONObject(0).getString(\"temp\");\n }catch (JSONException e) {\n System.out.println(\"Error gathering temperature\");\n }\n try {\n maxTemp = daysArray.getJSONObject(0).getString(\"tempmax\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n minTemp = daysArray.getJSONObject(0).getString(\"tempmin\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n skyCondition = daysArray.getJSONObject(0).getString(\"icon\");\n\n //response.getJSONObject(\"currentConditions\").getString(\"conditions\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering conditions\");\n }\n try {\n humidity = daysArray.getJSONObject(0).getString(\"humidity\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering humidity\");\n }\n try {\n JSONArray hours = daysArray.getJSONObject(0).getJSONArray(\"hours\");\n tonight = \"unknown\";\n for (int i = 0; i < hours.length(); i++) {\n if (hours.getJSONObject(i).getString(\"datetime\").equals(\"23:00:00\")) {\n tonight = hours.getJSONObject(i).getString(\"temp\");\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n tomorrow = daysArray.getJSONObject(1).getString(\"tempmax\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n WeatherReport newReport = new WeatherReport(cityName, countryName);\n\n newReport.updateWeatherReport(time, temperature, condition_parcer(skyCondition), humidity, maxTemp, minTemp, tomorrow, tonight);\n System.out.println(\"***JSON DATA***\");\n System.out.println(time);\n System.out.println(cityName);\n System.out.println(countryName);\n System.out.println(temperature);\n System.out.println(skyCondition);\n System.out.println(newReport.getHumidity());\n vmodel.addWeatherReport(newReport, context);\n System.out.println(\"Checking vmodel: \" +\n vmodel.getRecentReport().getLocationName_city() +\n \" is set as current city\");\n\n }\n }, error -> System.out.println(\"ERROR GETTING WEATHER\"));\n\n\n // Access the RequestQueue through your singleton class.\n this.addToRequestQueue(jsonObjectRequest);\n\n }", "@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }", "public void performPlaceTypeSearch(String userQuery)\n {\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(userQuery,GenerateGoogleMapApiUrl.SEARCH_BY_TYPE, mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n JsonObjectRequest movieReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n JSONArray response = null;\n try {\n response = result.getJSONArray(\"results\");\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"photos\"))\n newPlace.setPhoto_reference(obj.getJSONArray(\"photos\").getJSONObject(0).getString(\"photo_reference\"));\n\n if(!obj.isNull(\"price_level\"))\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n newPlacesList.add(newPlace);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceListMain = newPlacesList;\n //List<Place> filteredList = filterPlaceResult(mPlaceListMain);\n generateWorld(mWorld,mPlaceListMain,viewSetting,true);\n zoomToLocationSearchResult(newPlacesList);\n if(newPlacesList.size()==1)\n {\n performPlaceDetailSearch(newPlacesList.get(0).getPlace_id());\n }\n else if(newPlacesList.size()>1)\n {\n\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n createPlacesListBottomSheet(newPlacesList);\n }\n\n // set radar renderer to furthestPlace\n radarPlugin.setMaxDistance(furthestPlace+200.0f);\n distanceSeekBar.setProgress((int)(furthestPlace+200));\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(movieReq);\n }", "public void fetchingRides() {\n\n if(!source.getText().toString().isEmpty() && !destination.getText().toString().isEmpty()) {\n SharedPreferences sharedPreferences = getSharedPreferences(\"rideon\", Context.MODE_PRIVATE);\n\n\n String apikey = sharedPreferences.getString(\"apikey\", DEFAULT);\n customProgressDialog = CustomProgressDialog.show(LocationChooser.this);\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"source_latitiude\", sLat + \"\");\n params.put(\"source_longitude\", sLang + \"\");\n params.put(\"destination_latitude\", dLat + \"\");\n params.put(\"destination_longitude\", dLang + \"\");\n params.put(\"Authorization\", apikey);\n params.put(\"ride_date\",ride_date);\n RequestQueue requestQueue = Volley.newRequestQueue(LocationChooser.this);\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Authorization\", apikey);\n\n Log.d(\"params\",apikey+\" \"+sLat+\" \"+sLang+\" \"+dLat+\" \"+dLang+\" \"+ride_date);\n VolleyJsonRequest jsObjRequest = new VolleyJsonRequest(Request.Method.POST, \"fetchriders\", params, headers, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n\n Log.d(\"response\",response.toString());\n if (ridesGetSetList.size() > 0) {\n ridesGetSetList.clear();\n ridesAdapter.notifyDataSetChanged();\n }\n\n /* JSONArray usersArray = response.getJSONArray(\"users\");\n int arrSize = usersArray.length();\n Log.d(\"arrSze\", \"\" + arrSize);*/\n\n Gson gson = new Gson();\n FetchingRides fetchingRides = gson.fromJson(response.toString(), FetchingRides.class);\n\n if (fetchingRides.getError().equalsIgnoreCase(\"false\")) {\n if (fetchingRides.getUsers() != null && fetchingRides.getUsers().size() > 0) {\n ridesGetSetList.addAll(fetchingRides.getUsers());\n customProgressDialog.cancel();\n ridesAdapter.notifyDataSetChanged();\n\n } else {\n\n customProgressDialog.cancel();\n Toast.makeText(LocationChooser.this, \"No rides available\", Toast.LENGTH_SHORT).show();\n }\n } else {\n customProgressDialog.cancel();\n Toast.makeText(LocationChooser.this, \"Something went wrong\", Toast.LENGTH_SHORT).show();\n }\n\n\n } catch (Exception e) {\n customProgressDialog.cancel();\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // Toast.makeText(SplashActivity.this, \"Unable to connect server\", Toast.LENGTH_SHORT).show();\n error.printStackTrace();\n customProgressDialog.cancel();\n }\n }) {\n };\n requestQueue.add(jsObjRequest);\n jsObjRequest.setRetryPolicy(new DefaultRetryPolicy(50000, 0, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n }\n }", "private void fetchJsonData() {\n String url = \"https://raw.githubusercontent.com/acad600/JSONRepository/master/ISYS6203/O212-ISYS6203-RM01-00-DotaMarketplace.json\";\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Request.Method.GET, url, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject obj = response.getJSONObject(i);\n String name = obj.getString(\"name\");\n int price = obj.getInt(\"price\");\n int stock = obj.getInt(\"stock\");\n double latitude = obj.getDouble(\"latitude\");\n double longitude = obj.getDouble(\"longitude\");\n\n database.insertNewItem(name, price, stock, latitude, longitude);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"MyActivity\", \"onErrorResponse\" + error.toString());\n }\n });\n\n requestQueue.add(jsonArrayRequest);\n }", "private void performPlaceSearch(String userQuery)\n {\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(userQuery,GenerateGoogleMapApiUrl.TEXT_SEARCH, mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n JsonObjectRequest movieReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n JSONArray response = null;\n try {\n response = result.getJSONArray(\"results\");\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = response.getJSONObject(i);\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"photos\"))\n newPlace.setPhoto_reference(obj.getJSONArray(\"photos\").getJSONObject(0).getString(\"photo_reference\"));\n\n if(!obj.isNull(\"price_level\"))\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n newPlacesList.add(newPlace);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceListMain = newPlacesList;\n //List<Place> filteredList = filterPlaceResult(mPlaceListMain);\n\n generateWorld(mWorld,mPlaceListMain,viewSetting,true);\n zoomToLocationSearchResult(newPlacesList);\n if(newPlacesList.size()==1)\n {\n performPlaceDetailSearch(newPlacesList.get(0).getPlace_id());\n }\n else if(newPlacesList.size()>1)\n {\n\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n createPlacesListBottomSheet(newPlacesList);\n }\n\n // set radar renderer to furthestPlace\n radarPlugin.setMaxDistance(furthestPlace+200.0f);\n distanceSeekBar.setProgress((int)(furthestPlace+200));\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(movieReq);\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n String decoded = null; // example for one encoding type\n try {\n decoded = new String(response, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n Log.v(TAG, \"API call onSuccess = \" + statusCode + \", Headers: \" + headers[0] + \", response.length: \" + response.length +\n \", decoded:\" + decoded);\n\n try {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n JSONArray list = new JSONArray(decoded);\n Log.d(TAG, \"API Call postGetRoomWIP getroom returned list.length: \" + list.length());\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n roomArray.clear();\n\n for (int i = 0; i < list.length(); i++) {\n JSONObject obj = list.getJSONObject(i);\n String nickName = obj.getString(\"nickname\");\n String mLocation = obj.getString(\"location\");\n String gmtDateString = obj.getString(\"loc_time\");\n // add the guys above to Room roomObj\n Room roomObj = new Room(deviceSingleton.getSecretCode(), nickName, mLocation, gmtDateString);\n roomArray.add(roomObj);\n }\n Log.v(TAG, \"postGetRoomWIP remove this next call to updatePointsOnMapWithAPIData and make a notification trigger it like iOS\");\n try {\n updatePointsOnMapWithAPIData();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void getvillagelocationinfo_new() {\n\n Call<Class_getVillageLatLong> call = userService1.getVillageLatLong(str_loginuserID);\n // Set up progress before call\n final ProgressDialog progressDoalog;\n progressDoalog = new ProgressDialog(Activity_MarkerGoogleMaps.this);\n // progressDoalog.setMax(100);\n // progressDoalog.setMessage(\"Loading....\");\n progressDoalog.setTitle(\"Please wait....\");\n progressDoalog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // show it\n progressDoalog.show();\n\n call.enqueue(new Callback<Class_getVillageLatLong>() {\n @Override\n public void onResponse(Call<Class_getVillageLatLong> call, Response<Class_getVillageLatLong> response) {\n Log.e(\"Entered resp\", \"getVillageLatLong\");\n\n if (response.isSuccessful()) {\n progressDoalog.dismiss();\n Class_getVillageLatLong class_loginresponse = response.body();\n if (class_loginresponse.getStatus()) {\n List<Class_VillageLatLongList> monthContents_list = response.body().getListVersion();\n latlong_count=monthContents_list.size();\n Class_VillageLatLongList [] arrayObj_Class_monthcontents = new Class_VillageLatLongList[monthContents_list.size()];\n arrayObj_class_GoogleLocations = new Class_GoogleLocations[arrayObj_Class_monthcontents.length];\n\n for (int i = 0; i < arrayObj_Class_monthcontents.length; i++) {\n Log.e(\"getUserPayment\", String.valueOf(class_loginresponse.getStatus()));\n Log.e(\"getUserPayment\", class_loginresponse.getMessage());\n\n Class_GoogleLocations innerObj_Class_academic = new Class_GoogleLocations();\n innerObj_Class_academic.setLatitude(class_loginresponse.getListVersion().get(i).getLattitude());\n innerObj_Class_academic.setLongitude(class_loginresponse.getListVersion().get(i).getLogitude());\n innerObj_Class_academic.setVillagename(class_loginresponse.getListVersion().get(i).getVillageName());\n\n arrayObj_class_GoogleLocations[i] = innerObj_Class_academic;\n\n str_latitude =class_loginresponse.getListVersion().get(i).getLattitude();\n str_longitude= class_loginresponse.getListVersion().get(i).getLogitude();\n\n Log.e(\"soap_latitude\", str_latitude);\n\n }//for loop end\n\n mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(Activity_MarkerGoogleMaps.this);\n mapFragment.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n\n int i=0;\n\n Log.e(\"latlongcount\", String.valueOf(latlong_count));\n for(i=0;i<latlong_count;i++){\n Log.e(\"lat abc\", arrayObj_class_GoogleLocations[i].getLatitude());\n\n Double lat=Double.parseDouble(arrayObj_class_GoogleLocations[i].getLatitude());\n Double longi=Double.parseDouble(arrayObj_class_GoogleLocations[i].getLongitude());\n Log.e(\"lat oncreate\", String.valueOf(lat));\n Log.e(\"longi oncreate\", String.valueOf(longi));\n\n googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(lat, longi))\n .title(arrayObj_class_GoogleLocations[i].getVillagename())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\n\n\n }\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(15.539836, 75.056725), 4));\n\n }\n });\n\n\n } else {\n progressDoalog.dismiss();\n// str_getmonthsummary_errormsg = class_loginresponse.getMessage();\n// alerts_dialog_getmonthsummaryError();\n\n // Toast.makeText(getContext(), class_loginresponse.getMessage(), Toast.LENGTH_SHORT).show();\n }\n } else {\n progressDoalog.dismiss();\n Log.e(\"Entered resp else\", \"\");\n DefaultResponse error = ErrorUtils.parseError(response);\n // … and use it to show error information\n\n // … or just log the issue like we’re doing :)\n// Log.e(\"error message\", error.getMsg());\n// str_getmonthsummary_errormsg = error.getMsg();\n// alerts_dialog_getexlistviewError();\n\n // Toast.makeText(getContext(), error.getMsg(), Toast.LENGTH_SHORT).show();\n\n if (error.getMsg() != null) {\n\n Log.e(\"error message\", error.getMsg());\n// str_getmonthsummary_errormsg = error.getMsg();\n// alerts_dialog_getexlistviewError();\n\n //Toast.makeText(getActivity(), error.getMsg(), Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(Activity_MarkerGoogleMaps.this,\"Kindly restart your application\", Toast.LENGTH_SHORT).show();\n\n }\n\n }\n }\n\n @Override\n public void onFailure(Call call, Throwable t) {\n progressDoalog.dismiss();\n// str_getmonthsummary_errormsg = t.getMessage();\n// alerts_dialog_getexlistviewError();\n\n // Toast.makeText(getContext(), t.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });// end of call\n\n }", "public ClientModel modelFromJSON(JSONObject newModelJSON) throws JsonSyntaxException {\n\n //Break up ClientModel pieces and build a new ClientModel object manually:\n//GET MAP\n JSONObject newMapJSON = newModelJSON.getJSONObject(\"map\");\n\n //GET RADIUS\n int newCMRadius = newMapJSON.getInt(\"radius\");\n\n//GET HEXES\n JSONArray newHexesJSONArr = newMapJSON.getJSONArray(\"hexes\");\n HashMap<HexLocation, Hex> newHexesMap = parseHexesFromJSON(newHexesJSONArr);\n //HashMap<Hexes> complete! Ready to add to Map obj.\n\n//GET PORTS\n JSONArray newPortsJSONArr = newMapJSON.getJSONArray(\"ports\");\n HashMap<HexLocation, Port> newPortsMap = parsePortsFromJSON(newPortsJSONArr);\n //HashMap<Ports> complete! Ready to add to Map obj.\n\n//GET ROADS\n JSONArray newRoadsJSONArr = newMapJSON.getJSONArray(\"roads\");\n HashMap<EdgeLocation, EdgeValue> newRoadsMap = parseRoadsFromJSON(newRoadsJSONArr);\n //HashMap<Roads> complete! Ready to add to Map obj.\n\n//GET SETTLEMENTS AND CITIES\n JSONArray newStlmtsJSONArr = newMapJSON.getJSONArray(\"settlements\");\n JSONArray newCitiesJSONArr = newMapJSON.getJSONArray(\"cities\");\n\n //THIS HASHMAP HOLDS BOTH CITIES *AND* SETTLEMENTS!! **********\n HashMap<VertexLocation, VertexObject> newCitiesStlmtsMap = parseCitiesAndStlmtsFromJSON(newStlmtsJSONArr, newCitiesJSONArr);\n\n //Settlements/Cities Hashmap<> complete! Ready to add to new Map obj.\n\n//GET ROBBER\n //it's just a HexLocation, but the Robber obj type needs a reference to the Map...?\n //maybe add this Robber obj to the Map after the rest of it has been built up\n JSONObject newRobberJSON = newMapJSON.getJSONObject(\"robber\");\n String newRobberJSONString = newRobberJSON.toString();\n //System.out.println(\"newRobberJSON= \" + newRobberJSON);\n int rX = newRobberJSON.getInt(\"x\");\n int rY = newRobberJSON.getInt(\"y\");\n HexLocation newRobberHexLoc = new HexLocation(rX, rY);\n //try building the actual Robber object after building the Map object,\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//BUILD NEW MAP OBJECT\n Map newCMMap = new Map(newHexesMap, newPortsMap, newCitiesStlmtsMap, newRoadsMap, newRobberHexLoc);\n newCMMap.setRadius(newCMRadius);\n newCMMap.populatePortVertexLocations(); //these are static across the whole game\n Robber newRobber = new Robber(newCMMap);\n\n //Map object is complete! ready to add to new clientModel obj.\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n//GET RESOURCE BANK\n JSONObject newResourceListJSON = newModelJSON.getJSONObject(\"bank\");\n JSONObject newDevCardListJSON = newModelJSON.getJSONObject(\"deck\");\n ResourceBank newCMResourceBank = parseResourceBankFromJSON(newResourceListJSON, newDevCardListJSON);\n //ResourceBank is complete! Ready to add to new ClientModel obj.\n\n//GET PLAYERS ARRAY\n //the ClientModel obj wants these in a Player[].\n JSONArray newPlayersJSONArr = newModelJSON.getJSONArray(\"players\");\n Player[] newPlayersArray = parsePlayersArrFromJSON(newPlayersJSONArr);\n //Player[] is complete! Ready to add to new ClientModel obj.\n\n //GET MESSAGEMANAGER out of CHAT and LOG\n //GET CHAT\n JSONObject newCMChatJSONObj = newModelJSON.getJSONObject(\"chat\");\n MessageList newChatMsgList = parseMsgListFromJSON(newCMChatJSONObj);\n //GET LOG\n JSONObject newCMLogJSONObj = newModelJSON.getJSONObject(\"log\");\n MessageList newLogMsgList = parseMsgListFromJSON(newCMLogJSONObj);\n\n //Put the new Chat and Log MsgListObjs into a new MessageManager object:\n MessageManager newCMMsgMgr = new MessageManager();\n newCMMsgMgr.setChat(newChatMsgList);\n newCMMsgMgr.setLog(newLogMsgList);\n //MessageManager is complete! Ready to add to the new ClientModel obj.\n\n//GET TURNTRACKER\n JSONObject newTurnTrackerJSONObj = newModelJSON.getJSONObject(\"turnTracker\");\n String newTTrackerJSONString = newTurnTrackerJSONObj.toString();\n TurnTracker newCMTurnTracker = gsonConverter.fromJson(newTTrackerJSONString, TurnTracker.class);\n // System.out.println(\">newTTrackerObj= \" + newCMTurnTracker);\n //TurnTracker is complete! Ready to add to the new ClientModel obj.\n\n//GET TRADE OFFER\n TradeOffer newCMTradeOffer = new TradeOffer();\n if (newModelJSON.has(\"tradeOffer\")){\n JSONObject newTradeOfferJSONObj = newModelJSON.getJSONObject(\"tradeOffer\");\n String newTradeOfferJSONString = newTradeOfferJSONObj.toString();\n // System.out.println(\"newTradeOfferString= \" + newTradeOfferJSONString);\n newCMTradeOffer = gsonConverter.fromJson(newTradeOfferJSONString, TradeOffer.class);\n // System.out.println(\">newTradeOfferObj= \" + newCMTradeOffer);\n }\n\n //TradeOffer is complete! Ready to add to the new ClientModel obj.\n\n\n//GET ADDITIONAL INTS/OTHER CLIENTMODEL DATA\n int newCMVersion = newModelJSON.getInt(\"version\");\n int newCMWinner = newModelJSON.getInt(\"winner\");\n\n//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//BUILD NEW CLIENTMODEL OBJECT\n newClientModel = new ClientModel(0);\n newClientModel.setVersion(newCMVersion);\n newClientModel.setWinner(newCMWinner);\n newClientModel.setResourceBank(newCMResourceBank);\n newClientModel.setMessageManager(newCMMsgMgr);\n newClientModel.setTurnTracker(newCMTurnTracker);\n newClientModel.setChat(newChatMsgList);\n newClientModel.setLog(newLogMsgList);\n newClientModel.setTradeOffer(newCMTradeOffer);\n newClientModel.setPlayers(newPlayersArray);\n newClientModel.setMap(newCMMap);\n\n System.out.println(\"===== MODEL TRANSLATION COMPLETE ====\");\n\n return newClientModel;\n }", "@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "@Override\n public void onGetGeoCodeResult(GeoCodeResult arg0) {\n\n }", "@Override\n\t\tprotected ArrayList<HashMap<String, String>> doInBackground(\n\t\t\t\tString... params) {\n\t\t\tDefaultHttpClient httpclient = new DefaultHttpClient(\n\t\t\t\t\tnew BasicHttpParams());\n\t\t\tHttpGet httpget = new HttpGet(\n\t\t\t\t\t\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\"\n\t\t\t\t\t\t\t+ \"location=\" + curLocation.getLatitude() + \",\"\n\t\t\t\t\t\t\t+ curLocation.getLongitude() + \"&\" + \"radius=700&\"\n\t\t\t\t\t\t\t+ \"types=restaurant&\" + \"sensor=true&\"\n\t\t\t\t\t\t\t+ \"key=AIzaSyCl8M8OsDglFkLeOkzugqpNvPOAYs5xuUU\");\n\n\t\t\thttpget.setHeader(\"Content-type\", \"application/json\");\n\t\t\t// END\n\t\t\tInputStream inputStream = null;\n\t\t\tString result = null;\n\t\t\tHttpResponse response;\n\t\t\tArrayList<HashMap<String, String>> result_array = new ArrayList<HashMap<String, String>>();\n\t\t\t// This part sends the request and receives the JSON response from\n\t\t\t// the server\n\t\t\t// START\n\t\t\ttry {\n\t\t\t\tresponse = httpclient.execute(httpget);\n\t\t\t\tHttpEntity entity = response.getEntity();\n\n\t\t\t\tinputStream = entity.getContent();\n\t\t\t\t// json is UTF-8 by default i believe\n\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\tnew InputStreamReader(inputStream, \"UTF-8\"), 8);\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t\tString line = null;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t}\n\t\t\t\tresult = sb.toString();\n\t\t\t\t// END\n\n\t\t\t\t// This part parses the JSON into a a list of dictionaries. Each\n\t\t\t\t// list item is a restaurant, and the dict holds the restuarant\n\t\t\t\t// info\n\t\t\t\t// START\n\t\t\t\tJSONObject jobj = new JSONObject(result);\n\t\t\t\tJSONArray json = jobj.getJSONArray(\"results\");\n\t\t\t\tString value = \"\";\n\t\t\t\tJSONObject geometry = new JSONObject();\n\t\t\t\tJSONObject location_json = new JSONObject();\n\t\t\t\tfor (int i = 0; i < json.length(); ++i) {\n\t\t\t\t\tHashMap<String, String> dict = new HashMap<String, String>();\n\t\t\t\t\tJSONObject jObject = new JSONObject(json.get(i).toString());\n\t\t\t\t\tvalue = jObject.getString(\"name\");\n\t\t\t\t\tdict.put(\"name\", value);\n\t\t\t\t\tvalue = jObject.getString(\"reference\");\n\t\t\t\t\tdict.put(\"reference\", value);\n\t\t\t\t\tgeometry = jObject.getJSONObject(\"geometry\");\n\t\t\t\t\tlocation_json = geometry.getJSONObject(\"location\");\n\t\t\t\t\tvalue = location_json.getString(\"lat\");\n\t\t\t\t\tdict.put(\"lat\", value);\n\t\t\t\t\tvalue = location_json.getString(\"lng\");\n\t\t\t\t\tdict.put(\"lng\", value);\n\t\t\t\t\tresult_array.add(dict);\n\t\t\t\t\t// END\n\t\t\t\t}\n\n\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result_array;\n\t\t}", "public void onLocButton(View view) {\n gps = new GPS(MainActivity.this);\n //Checks if the location services are enabled and permitted\n if(gps.canGetLocation()){\n double lat = gps.getLatitude();\n double lon = gps.getLongitude();\n String URL = apiURL + latURL + lat + lonURL + lon + keyURL;\n Log.d(\"**\", URL);\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n Log.d(\"**\", \"Response gained\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject coord = response.getJSONObject(\"coord\");\n JSONObject wind = response.getJSONObject(\"wind\");\n JSONObject sys = response.getJSONObject(\"sys\");\n JSONObject clouds = response.getJSONObject(\"clouds\");\n\n weatherData.setCity(response.getString(\"name\"));\n weatherData.setTemp(main.getString(\"temp\"));\n weatherData.setFeelsLike(main.getString(\"feels_like\"));\n weatherData.setHumidity(main.getString(\"humidity\"));\n weatherData.setWind(wind.getString(\"speed\"));\n weatherData.setClouds(clouds.getString(\"all\"));\n weatherData.setPressure(main.getString(\"pressure\"));\n weatherData.setSunrise(sys.getString(\"sunrise\"));\n weatherData.setSunset(sys.getString(\"sunset\"));\n weatherData.setLat(coord.getString(\"lat\"));\n weatherData.setLon(coord.getString(\"lon\"));\n weatherData.setCurrentTime(response.getString(\"dt\"));\n\n Intent goIntent = new Intent(context, TTSActivity.class);\n startActivity(goIntent);\n }\n catch (JSONException e) {\n Log.d(\"**\", \"JSON did not work\");\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"**\", String.valueOf(error));\n }\n });\n queue.add(jsonObjectRequest);\n\n } else {\n gps.showSettingsAlert();\n }\n\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "public void fetchSalons(final Location location, final SalonsManagerCallback managerCallback){\n String url = BASE_URL + \"/salons/shallow?location=\" + location.getLatitude() + ',' + location.getLongitude() + \"&radius=15&limit=4\";\n serverCon.HTTP(Request.Method.GET, url, 0, new Response.Listener<DevDesignRequest.DevDesignResponse>() {\n @Override\n public void onResponse(DevDesignRequest.DevDesignResponse response) {\n if(response.statusCode == HttpStatus.OK){\n JsonParser jsonParser = new JsonParser();\n try{\n Log.i(\"rsb\", \"onResponse: \" + response.data);\n JsonArray rawSalons = jsonParser.parse(response.data).getAsJsonArray();\n salonObjectsList.clear();\n for(int pos = 0; pos < rawSalons.size(); pos++){\n JsonObject rawSalon = rawSalons.get(pos).getAsJsonObject();\n salonObjectsList.add(SalonObject.parse(rawSalon));\n }\n managerCallback.onFetchSalons(getSalons());\n\n }catch (JsonParseException pE){\n pE.printStackTrace();\n managerCallback.onFetchSalons(null);\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n managerCallback.onFetchSalons(null);\n }\n });\n\n }", "private void townPanchayat(Integer districtId) {\n\n waitDialog = new SpotsDialog(Shared_AssessmentSearch.this);\n waitDialog.show();\n waitDialog.setCancelable(false);\n final String REQUEST_TAG = \"townPanchayat\";\n\n JsonArrayRequest api_townPanchayat_Request = new JsonArrayRequest(Request.Method.GET, API_TOWNPANCHAYAT + districtId, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n\n try {\n Log.e(REQUEST_TAG, response.toString());\n\n\n if (!response.isNull(0)) {\n for (int i = 0; i < response.length(); i++) {\n\n JSONObject district_jsonObject = response.getJSONObject(i);\n\n mPanchayatId = district_jsonObject.getString(\"PanchayatId\");\n mPanchayatName = district_jsonObject.getString(\"PanchayatName\");\n\n mPanchayatHashmapitems.put(Integer.parseInt(mPanchayatId), mPanchayatName);\n\n mPanchayatList.add(mPanchayatName);\n }\n\n } else Snackbar.make(rootlayout, \"Error\", Snackbar.LENGTH_SHORT).show();\n\n\n waitDialog.dismiss();\n\n } catch (JSONException e) {\n e.printStackTrace();\n\n Snackbar.make(rootlayout, e.getMessage(), Snackbar.LENGTH_SHORT).show();\n\n waitDialog.dismiss();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(TAG, \"Error: \" + error.getMessage());\n Log.e(TAG, error.toString());\n\n waitDialog.dismiss();\n if (error instanceof TimeoutError || error instanceof NoConnectionError) {\n\n SnackShowTop(\"Time out\", rootlayout);\n\n } else if (error instanceof AuthFailureError) {\n\n SnackShowTop(\"Connection Time out\", rootlayout);\n\n } else if (error instanceof ServerError) {\n\n SnackShowTop(\"Could not connect server\", rootlayout);\n\n } else if (error instanceof NetworkError) {\n\n SnackShowTop(\"Please check the internet connection\", rootlayout);\n\n } else if (error instanceof ParseError) {\n\n SnackShowTop(\"Parse Error\", rootlayout);\n\n } else {\n\n SnackShowTop(error.getMessage(), rootlayout);\n }\n }\n }) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"accesstoken\", ACCESS_TOKEN);\n\n return params;\n }\n };\n AppSingleton.getInstance(getApplicationContext()).addToRequestQueue(api_townPanchayat_Request, REQUEST_TAG);\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n \tString[] ids = (String[])intent.getExtras().get(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_IDS);\n \tint transitionType = intent.getIntExtra(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_TYPE, -1);\n \t\n \tboolean hasRootGeofenceTransition = false;\n \tfor (String id : ids){\n \t\tif (id.equals(ClientSideUtils.RootGeofenceId)){\n \t\t\thasRootGeofenceTransition = true;\n \t\t}\n \t}\n \t\n \t// TODO if both root and sons in ids DO SOMETHING\n \t\n \tif (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Entered: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmSonGeofencesList = new ArrayList<Geofence>();\n \t\t\tfor (LotGeofence lotGeofence : mLotsDb.mSonLotGeofencesList){\n \t\t\tmSonGeofencesList.add(lotGeofence.toGeofenceObject());\n \t\t\tmCurrentGeofenceList.add(lotGeofence.toGeofenceObject());\n \t\t\t}\n\t\t \tmGeofenceRequestType = ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD;\n\t\t try{\n\t\t \t\tmGeofenceRequester.addGeofences(mSonGeofencesList);\n\t\t \t} catch(UnsupportedOperationException e){\n\t\t \t\tLog.d(ClientSideUtils.APPTAG, \"In progress on adding geofences again\");\n\t\t \t}\n\t\t if (!MOCKUP_MODE){\n\t\t \tstartActivityRecognition();// <----- Starting Activity Recognition Here\n\t\t }\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\tenteredParkingLot(id);\n \t\t\t}\n \t\t}\n\n \t}else if (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Exited: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmGeofenceRemoveType = ClientSideUtils.GEOFENCE_REMOVE_TYPE.LIST;\n \t\t\tremoveCurrentGeofecesByID(mSonGeofencesList);\n \t\t\t\n \t\t\tmCurrentGeofenceList = new ArrayList<Geofence>();\n \t\t\tmCurrentGeofenceList.add(mLotsDb.mRootLotGeofence.toGeofenceObject());\n \t\t\t\n \t\t\tstopActivityRecognition(); // <----- Stopping Activity Recognition Here\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\texitedParkingLot(id);\n \t\t\t}\n \t\t}\n \t}else{\n \t\tLog.e(ClientSideUtils.APPTAG, \"Entered Geofence action handling, the type was not ENTERED nor EXITED\");\n \t}\n }", "private void districtApiCall() {\n\n waitingDialog = new SpotsDialog(Shared_AssessmentSearch.this);\n waitingDialog.show();\n waitingDialog.setCancelable(false);\n String REQUEST_TAG = \"apiDistrictDetails_Request\";\n\n JsonArrayRequest apiDistrictDetails_Request = new JsonArrayRequest(Request.Method.GET, API_DISTRICT_DETAILS, null, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(final JSONArray response) {\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Log.e(TAG, response.toString());\n\n if (!response.isNull(0)) {\n for (int i = 0; i < response.length(); i++) {\n\n JSONObject district_jsonObject = response.getJSONObject(i);\n\n mDistrictId = district_jsonObject.getString(\"DistrictId\");\n mDistrictName = district_jsonObject.getString(\"DistrictName\");\n\n mDistrictHashmapitems.put(Integer.parseInt(mDistrictId), mDistrictName);\n\n mDistrictList.add(mDistrictName);\n }\n\n } else Snackbar.make(rootlayout, \"Error\", Snackbar.LENGTH_SHORT).show();\n\n waitingDialog.dismiss();\n\n } catch (JSONException e) {\n e.printStackTrace();\n\n Snackbar.make(rootlayout, e.getMessage(), Snackbar.LENGTH_SHORT).show();\n\n waitingDialog.dismiss();\n }\n }\n }).start();\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.e(TAG, \"Error: \" + error.getMessage());\n Log.e(TAG, error.toString());\n\n waitingDialog.dismiss();\n if (error instanceof TimeoutError || error instanceof NoConnectionError) {\n\n SnackShowTop(\"Time out\", rootlayout);\n\n } else if (error instanceof AuthFailureError) {\n\n SnackShowTop(\"Connection Time out\", rootlayout);\n\n } else if (error instanceof ServerError) {\n\n SnackShowTop(\"Could not connect server\", rootlayout);\n\n } else if (error instanceof NetworkError) {\n\n SnackShowTop(\"Please check the internet connection\", rootlayout);\n\n } else if (error instanceof ParseError) {\n\n SnackShowTop(\"Parse Error\", rootlayout);\n\n } else {\n\n SnackShowTop(error.getMessage(), rootlayout);\n\n }\n }\n }) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"accesstoken\", ACCESS_TOKEN);\n\n return params;\n }\n };\n AppSingleton.getInstance(getApplicationContext()).addToRequestQueue(apiDistrictDetails_Request, REQUEST_TAG);\n\n }", "public void generateVehicleReq(final Location point, int radius, Response.Listener<JSONObject> onRes) throws JSONException {\n\n String url = \"https://api.bird.co/bird/nearby?\";\n\n url+=\"latitude=\"+point.getLatitude();\n url+=\"&longitude=\"+point.getLongitude();\n url+=\"&radius=\"+radius;\n\n JSONObject obj = new JSONObject();\n\n\n Response.ErrorListener onErr = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"error \" +\n \"on GET request from bird\");\n System.out.println(error.toString());\n //bad request or something\n\n }\n };\n //set vehicle request\n vehicleReq = new JsonObjectRequest(Request.Method.GET,url,obj,onRes,onErr) {\n /**\n * add headers\n */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap headers = new HashMap();\n headers.put(\"Authorization\", token);\n headers.put(\"Device-id:\", \"801087ee-88a2-4ff7-9067-2e090007ffb6\");\n headers.put(\"App-Version\",\"3.0.5\");\n\n String locH = \"{\";\n locH+= \"\\\"latitude\\\":\"+point.getLatitude()+\",\";\n locH+= \"\\\"longitude\\\":\"+point.getLongitude()+\",\";\n locH+= \"\\\"altitude\\\":\"+ 0 + \",\";\n locH+= \"\\\"accuracy\\\":\"+ 100 + \",\";\n locH+= \"\\\"speed\\\":\"+ -1 + \",\";\n locH+= \"\\\"heading\\\":\"+ -1;\n locH+= \"}\";\n\n headers.put(\"Location\",locH);\n return headers;\n }\n };\n }", "void onRequestCompleted(JSONArray result);", "@Override\n\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "private void BrowseComplex(final String city_id) {\n String tag_string_req = \"req_login\";\n\n loaderDialog.show();\n complexList.clear();\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.complex_list, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"JOB RESPONSE: \" + response.toString());\n\n loaderDialog.dismiss();\n Gson gson = new Gson();\n\n try {\n\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n String status = jobj.get(\"status\").getAsString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").getAsString().replaceAll(\"\\\"\", \"\");\n\n Log.d(\"jobj\", \"\" + jobj);\n\n if(status.equals(\"1\")) {\n\n JsonArray jarray = jobj.getAsJsonArray(\"data\");\n\n //Log.d(\"jarray\", \"\" + jarray.toString());\n\n array2 = new ArrayList<>();\n array2.add(\"Complex Name\");\n for (int i = 0; i < jarray.size(); i++) {\n JsonObject jobj1 = jarray.get(i).getAsJsonObject();\n\n String id = jobj1.get(\"id\").toString().replaceAll(\"\\\"\", \"\");\n String name = jobj1.get(\"name\").toString().replaceAll(\"\\\"\", \"\");\n\n HashMap<String, String> map_ser = new HashMap<>();\n\n\n map_ser.put(\"id\", id);\n map_ser.put(\"name\", name);\n\n complexList.add(map_ser);\n\n array2.add(name);\n\n }\n\n dataadpter2 = new ArrayAdapter(RegisterFlatDetails.this, R.layout.item_spinner, R.id.tvCust, array2);\n edt_complex_name.setAdapter(dataadpter2);\n\n } else {\n TastyToast.makeText(getApplicationContext(), message,\n TastyToast.LENGTH_LONG, TastyToast.WARNING);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"DATA NOT FOUND: \" + error.getMessage());\n loaderDialog.dismiss();\n }\n }){\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to activity_login url\n Map<String, String> params = new HashMap<>();\n\n\n\n params.put(\"city_id\",city_id);\n Log.d(TAG, \"city_id: \"+params);\n\n return params;\n }\n\n };\n // Adding request to request queue\n GlobalClass.getInstance().addToRequestQueue(strReq, tag_string_req);\n strReq.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 10, 1.0f));\n\n }", "private void distanceMatrixNetworkCall() {\n //Get all addresses\n List<String> addresses = new ArrayList<>();\n\n //Get the address to find distances from first\n addresses.add(selectedLat + \",\" + selectedLong);\n\n //Get doctors\n List<Doctor> doctors = new DoctorDao(getApplicationContext()).findAll();\n\n //add all doctors office addresses from database\n for (int i = 0; i < doctors.size(); i++) {\n addresses.add(doctors.get(i).getOfficeAddress());\n }\n\n //add the options for the request\n Map<String, Boolean> options = new HashMap<>();\n options.put(\"allToAll\", false);\n\n //create an object\n DistanceMatrixRequest requestObj = new DistanceMatrixRequest(addresses, options);\n\n Gson gson = new Gson();\n\n RequestQueue queue = Volley.newRequestQueue(getApplicationContext());\n\n GsonDistanceMatrixRequest gsonRequest = new GsonDistanceMatrixRequest(requestObj\n , new Response.Listener<DistanceMatrixResponse>() {\n @Override\n public void onResponse(DistanceMatrixResponse response) {\n\n //add doctors name address and distance to hashmap list for the nearby doctors list adapter\n for (int i = 0; i < doctors.size(); i++) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"id\", String.valueOf(doctors.get(i).getID()));\n hashMap.put(\"name\", \"Dr. \" + doctors.get(i).getFirstName() + \" \" + doctors.get(i).getLastName());\n hashMap.put(\"address\", doctors.get(i).getOfficeAddress());\n hashMap.put(\"distance\", String.valueOf(response.getDistance().get(i + 1)));\n\n DistanceMatrixResponse.Location location = response.getLocations().get(i + 1);\n hashMap.put(\"lat\", String.valueOf(location.getLatLng().getLat()));\n hashMap.put(\"lng\", String.valueOf(location.getLatLng().getLng()));\n\n // add this hashmap to the list\n nearbyDoctorsData.add(hashMap);\n }\n\n displayNearbyDoctors(mListViewDoctors);\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(LocateDoctorActivity.this, \"Unable to Retrieve Nearby Doctors\", Toast.LENGTH_SHORT).show();\n }\n });\n\n queue.add(gsonRequest);\n\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "private void getData(){\n StringRequest stringRequest = new StringRequest(\n Request.Method.GET,\n Constants.BOILER_URL+mechID+\"/\"+SharedPrefManager.getInstance(this).getUsertype(),\n\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n JSONObject j = null;\n try {\n //Parsing the fetched Json String to JSON Object\n j = new JSONObject(response);\n\n //Storing the Array of JSON String to our JSON Array\n JSONObject result = j.getJSONObject(\"response\");\n\n String address1=result.getString(\"address1\");\n String address2=result.getString(\"address2\");\n String inspname=result.getString(\"insname\");\n tvAddr1.setText(address1);\n tvAddr2.setText(address2);\n tvIns.setText(inspname);\n\n //Toast.makeText(getApplicationContext(),result.getString(\"equipments\"), Toast.LENGTH_LONG).show();\n // tvAddr2.setText(equipmentID);\n equip = result.getJSONArray(Constants.BOILER_ARRAY);\n\n //Calling method getEquipment to get the Equipments from the JSON Array\n getEquipment(equip);\n } catch (JSONException e) {\n\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n //Creating a request queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n //Adding request to the queue\n requestQueue.add(stringRequest);\n\n }", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "private void BrowseBlock(final String complex_id) {\n String tag_string_req = \"req_login\";\n\n loaderDialog.show();\n blockList.clear();\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.block_list, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"JOB RESPONSE: \" + response.toString());\n\n loaderDialog.dismiss();\n Gson gson = new Gson();\n\n try {\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n String status = jobj.get(\"status\").getAsString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").getAsString().replaceAll(\"\\\"\", \"\");\n\n Log.d(\"jobj\", \"\" + jobj);\n if(status.equals(\"1\")) {\n\n //array.add(\"Select Location\");\n JsonArray jarray = jobj.getAsJsonArray(\"data\");\n Log.d(\"jarray\", \"\" + jarray.toString());\n array3 = new ArrayList<>();\n array3.add(\"Block Name\");\n for (int i = 0; i < jarray.size(); i++) {\n JsonObject jobj1 = jarray.get(i).getAsJsonObject();\n //get the object\n\n //JsonObject jobj1 = jarray.get(i).getAsJsonObject();\n String block = jobj1.get(\"block\").toString().replaceAll(\"\\\"\", \"\");\n\n HashMap<String, String> map_ser = new HashMap<>();\n\n\n map_ser.put(\"block\", block);\n // map_ser.put(\"name\", name);\n\n blockList.add(map_ser);\n\n array3.add(block);\n\n }\n\n dataadpater3 = new ArrayAdapter(RegisterFlatDetails.this,\n R.layout.item_spinner, R.id.tvCust, array3);\n edt_block_name.setAdapter(dataadpater3);\n\n } else {\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.SUCCESS);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"DATA NOT FOUND: \" + error.getMessage());\n loaderDialog.dismiss();\n }\n }){\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to activity_login url\n Map<String, String> params = new HashMap<>();\n\n params.put(\"complex_id\",complex_id);\n Log.d(TAG, \"complex_id: \"+params);\n\n return params;\n }\n\n };\n // Adding request to request queue\n GlobalClass.getInstance().addToRequestQueue(strReq, tag_string_req);\n strReq.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 10, 1.0f));\n\n }", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }", "public void getDirections() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/directions/json?\" +\n \"origin=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destination=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n //callback for string request\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n String encodedPolyline = data.getJSONArray(\"routes\").getJSONObject(0).\n getJSONObject(\"overview_polyline\").getString(\"points\");\n List<LatLng> points = PolyUtil.decode(encodedPolyline);\n if (curPoly != null) {\n curPoly.remove();\n }\n curPoly = mMap.addPolyline(new PolylineOptions().addAll(points));\n curPoly.setColor(getColor(R.color.colorAccent));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "void doCountryList()\n {\n final ProgressDialog progressDialog2=new ProgressDialog(ChefEditKitchenPart2.this);\n progressDialog2.setMessage(\"loading...\");\n progressDialog2.show();\n progressDialog2.setCancelable(false);\n progressDialog2.setCanceledOnTouchOutside(false);\n String url;\n\n url =WebServiceURL.COUNTRY_LIST;\n\n StringRequest postRequest = new StringRequest(Request.Method.POST, url,\n new Response.Listener<String>()\n {\n @Override\n public void onResponse(String response) {\n parseCountry(response);\n if(progressDialog2!=null)\n progressDialog2.dismiss();\n Log.d(\"Response\", response);\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error) {\n if(progressDialog2!=null)\n progressDialog2.dismiss();\n System.out.println(\"Error==========\"+error);\n Toast.makeText(ChefEditKitchenPart2.this, \"Have a Network Error Please check Internet Connection.\", Toast.LENGTH_LONG).show();\n }\n }\n ){\n @Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"format\",\"json\");\n return params;\n }\n };\n // Adding request to volley request queue\n AppController.getInstance().addToRequestQueue(postRequest);\n AppController.getInstance().getRequestQueue().getCache().remove(url);\n AppController.getInstance().getRequestQueue().getCache().clear();\n }", "public static void syncAreas(Context context) {\n StringRequest stringRequest = new StringRequest( Request.Method.GET, URL_SYNC_AREA,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONArray jsonArray = new JSONArray( response );\n parseInsertData(\n jsonArray,\n AreasEntry.CONTENT_URI,\n AreasEntry.TABLE_NAME,\n AreasEntry.COLUMN_AREA_ID,\n AreasEntry.COLUMN_AREA_NAME_EN,\n AreasEntry.COLUMN_AREA_NAME_AR\n );\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e( TAG, \"message :\" + error );\n Log.e( TAG, \"message :\" + error );\n }\n } );\n Mysingletone.getInstance( context ).addRequestQueue( stringRequest );\n }", "public void run() {\n\r\n try {\r\n JSONArray markersData = json.getJSONArray(\"data\");\r\n for (int i=0; i < markersData.length(); i++) {\r\n JSONObject markerData = markersData.getJSONObject(i);\r\n LatLng latLng = new LatLng(\r\n Float.parseFloat(markerData.getString(\"latitude\")),\r\n Float.parseFloat(markerData.getString(\"longitude\"))\r\n );\r\n googleMap.addMarker(new MarkerOptions().position(latLng).title(markerData.getString(\"title\")));\r\n }\r\n } catch (JSONException e) {\r\n return;\r\n }\r\n }", "private void getcitytask() {\n String uri = API_LINK_V2 + \"get-all-cities\";\n\n Log.v(\"EXECUTING\", uri);\n\n //Set up client\n OkHttpClient client = new OkHttpClient();\n //Execute request\n Request request = new Request.Builder()\n .header(\"Authorization\", \"Token \" + mToken)\n .url(uri)\n .build();\n //Setup callback\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.e(\"Request Failed\", \"Message : \" + e.getMessage());\n }\n\n @Override\n public void onResponse(Call call, final Response response) {\n\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n try {\n JSONArray ar = new JSONArray(Objects.requireNonNull(response.body()).string());\n for (int i = 0; i < ar.length(); i++) {\n mId.add(ar.getJSONObject(i).getString(\"id\"));\n mNames.add(ar.getJSONObject(i).getString(\"city_name\"));\n mLatitude.add(ar.getJSONObject(i).getString(\"latitude\"));\n mLongitude.add(ar.getJSONObject(i).getString(\"longitude\"));\n }\n mCities = new String[mId.size()];\n mCities = mNames.toArray(mCities);\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n mActivity,\n android.R.layout.simple_spinner_dropdown_item,\n mCities);\n sourceSpinner.setAdapter(adapter);\n destinationSpinner.setAdapter(adapter);\n } catch (JSONException e) {\n e.printStackTrace();\n Log.e(\"ERROR : \", \"Message : \" + e.getMessage());\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n progressBar.setVisibility(View.GONE);\n }\n });\n\n }\n });\n }", "public void fetchNearbyLocations(final float latitude, final float longitude,\n final OperationCallback<Location[]> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n // Prepare request.\n String getParams = String.format(LOCATIONS_ENDPOINT_FORMAT, latitude, longitude, mAccessToken);\n String url = API_URL + getParams;\n String response = getRequest(url);\n \n Log.i(TAG, \"response \" + response);\n \n // Parse JSON answer and notify caller.\n Gson gson = new Gson();\n JSONObject responseJson = (JSONObject) new JSONTokener(response).nextValue();\n List<Location> locations = new ArrayList<Location>(3);\n JSONArray locationsJson = responseJson.getJSONArray(\"data\");\n for (int i = 0; i < locationsJson.length(); i++) {\n locations.add(gson.fromJson(locationsJson.get(i).toString(), Location.class));\n }\n \n callback.notifyCompleted(locations.toArray(new Location[locations.size()]));\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }", "private void performPlaceDetailSearch(String placeId)\n {\n GenerateGoogleMapApiUrl urlGenerator = new GenerateGoogleMapApiUrl();\n StringBuilder googlePlacesUrl = urlGenerator.getGoogleMapPlacesQueryURL(placeId,GenerateGoogleMapApiUrl.PLACE_DETAIL,mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude());\n Log.d(\"Google Query\",googlePlacesUrl.toString());\n final List<Place> newPlacesList = new ArrayList<Place>();\n // Creating volley request obj\n final JsonObjectRequest placeDetailReq = new JsonObjectRequest(Request.Method.GET,googlePlacesUrl.toString(),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject result) {\n Log.d(\"JSON Error\", result.toString());\n //hidePDialog();\n // Parsing json\n //for (int i = 0; i < response.length(); i++) {\n try {\n\n JSONObject obj = result.getJSONObject(\"result\");\n Place newPlace = new Place();\n if (!obj.isNull(\"name\")) {\n newPlace.setName(obj.getString(\"name\"));\n }\n if(!obj.isNull(\"rating\"))\n {\n newPlace.setRating(Float.parseFloat(obj.getString(\"rating\")));\n }\n newPlace.setLat(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lat\"));\n newPlace.setLng(obj.getJSONObject(\"geometry\").getJSONObject(\"location\").getString(\"lng\"));\n JSONArray types = obj.getJSONArray(\"types\");\n newPlace.setType(types.get(0).toString());\n if(!obj.isNull(\"opening_hours\"))\n {\n newPlace.setOpen(obj.getJSONObject(\"opening_hours\").getBoolean(\"open_now\"));\n }\n if(!obj.isNull(\"place_id\"))\n {\n newPlace.setPlace_id(obj.getString(\"place_id\"));\n }\n if(!obj.isNull(\"price_level\"))\n {\n newPlace.setPrice_level(obj.getString(\"price_level\"));\n }\n if(!obj.isNull(\"international_phone_number\"))\n {\n newPlace.setPhone_number(obj.getString(\"international_phone_number\"));\n }\n if(!obj.isNull(\"formatted_address\"))\n {\n newPlace.setAddress(obj.getString(\"formatted_address\"));\n }\n if(!obj.isNull(\"website\"))\n {\n newPlace.setWebsite(obj.getString(\"website\"));\n }\n\n\n Location placeLocation = new Location(\"\");\n placeLocation.setLatitude(Double.parseDouble(newPlace.getLat()));\n placeLocation.setLongitude(Double.parseDouble(newPlace.getLng()));\n newPlace.setDistance(mCurrentLocation.distanceTo(placeLocation));\n\n\n\n newPlacesList.add(newPlace);\n\n //currentPlaceDetail = newPlace; // set currentPlaceDetail\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n //dismiss keyboard\n hideSoftKeyboard(ARExploreActivity.this);\n //dismiss autocomplete list\n edtSeach.dismissDropDown();\n plotGoogleMap(newPlacesList);\n mPlaceDetail = newPlacesList;\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);//rerender\n zoomToLocationSearchResult(newPlacesList);\n\n if(currentDisplayMode==DISPLAY_PLACE_LIST)\n {\n placeListBottomSheetBehavior.setHideable(true);\n placeListBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_DETAIL;\n\n\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n extendButton.setVisibility(View.VISIBLE);\n //region for putting the result into place details\n\n placeNameTextView.setText(newPlacesList.get(0).getName()); // set place name\n ratingBar.setRating(newPlacesList.get(0).getRating()); // set Rating\n\n if(!newPlacesList.get(0).getPrice_level().equals(\"\"))\n {\n String priceString=\"\";\n int price = Integer.parseInt(newPlacesList.get(0).getPrice_level()); // set price\n for(int i=0;i<=price;i++)\n {\n priceString = priceString+\"£\";\n }\n priceTextView.setText(priceString);\n /*priceTextView.requestLayout();\n priceTextView.invalidate();*/\n }\n else\n {\n priceTextView.setText(\"\");\n }\n\n if(!newPlacesList.get(0).getPhone_number().equals(\"\"))\n {\n\n phoneTextView.setText(newPlacesList.get(0).getPhone_number()); // set phone number\n /*phoneTextView.requestLayout();\n phoneTextView.invalidate();*/\n phone_row.setVisibility(View.VISIBLE);\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getAddress().equals(\"\"))\n {\n\n addressTextView.setText(newPlacesList.get(0).getAddress()); // set address\n /*addressTextView.requestLayout();\n addressTextView.invalidate();*/\n address_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n phone_row.setVisibility(View.GONE);\n }\n\n if(!newPlacesList.get(0).getWebsite().equals(\"\"))\n {\n websiteTextView.setText(newPlacesList.get(0).getWebsite()); // set website\n /*websiteTextView.requestLayout();\n websiteTextView.invalidate();*/\n website_row.setVisibility(View.VISIBLE);\n\n }\n else\n {\n website_row.setVisibility(View.GONE);\n }\n //endregion\n bottomSheetCOntentLayout.requestLayout();\n bottomSheetCOntentLayout.invalidate();\n\n layoutUpdater.wrapContentAgain(bottomSheetCOntentLayout,true);\n imgPlaceDetail.requestLayout();\n imgPlaceDetail.invalidate();\n placePhotosTask(newPlacesList.get(0).getPlace_id());\n //bottomSheetPlaceDetails.requestLayout();\n\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n //hidePDialog();\n\n }\n });\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(placeDetailReq);\n }", "protected String doInBackground(Double... args) {\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n /*params.add(new BasicNameValuePair(\"latitude\", Double.toString(latitude)));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(longitude)));*/\n params.add(new BasicNameValuePair(\"latitude\", Double.toString(args[0])));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(args[1])));\n JSONObject json = jParser.makeHttpRequest(MapsContract.MapsEntry.url_all_products, \"GET\", params);\n Log.d(\"All Locations: \", json.toString());\n try {\n locations = json.getJSONArray(MapsContract.MapsEntry.TAG_LOCATION);\n for (int i = 0; i < locations.length(); i++) {\n JSONObject c = locations.getJSONObject(i);\n String uid = c.getString(MapsContract.MapsEntry.TAG_UID);\n String distance = c.getString(MapsContract.MapsEntry.TAG_DISTANCE);\n String latitude = c.getString(MapsContract.MapsEntry.TAG_LATITUDE);\n String longitude = c.getString(MapsContract.MapsEntry.TAG_LONGITUDE);\n HashMap<String, String> map = new HashMap<String, String>();\n map.put(MapsContract.MapsEntry.TAG_UID, uid);\n map.put(MapsContract.MapsEntry.TAG_DISTANCE, distance);\n map.put(MapsContract.MapsEntry.TAG_LATITUDE, latitude);\n map.put(MapsContract.MapsEntry.TAG_LONGITUDE, longitude);\n locationList.add(map);\n }\n error += json.toString() + \"From DoInBackground\";\n Thread.sleep(5000);\n } catch (JSONException e) {\n error += e.getLocalizedMessage() + \"JSONExecption\";\n\n } catch (InterruptedException e) {\n error += e.getMessage() + \"InterruptedExeption\";\n }\n //Toast.makeText(getApplicationContext(), json.toString(), Toast.LENGTH_LONG).show();\n return error;\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n PreparedQuery results = getQuery();\n\n // Add tracked locations as MapImage objects to a List.\n List<MapImage> formLocationOptions = convertMetdataToMapImages(results);\n\n Gson gson = new Gson();\n String jsonLocations = gson.toJson(formLocationOptions);\n response.setContentType(\"application/json\");\n response.getWriter().println(jsonLocations);\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "public void postGetRoomWIP() {\n if (!mIsInForegroundMode) {\n Log.d(\"SCXTT\", \"were OUT so abort postGetRoomWIP\");\n return;\n }\n\n Log.d(\"SCXTT\", \"postGetRoomWIP set looking = 1\");\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n AsyncHttpClient client = new AsyncHttpClient();\n RequestParams params = new RequestParams();\n params.put(\"cmd\", \"getroom\");\n params.put(\"user_id\", deviceSingleton.getUserId());\n params.put(\"location\", deviceSingleton.getMyLocStr());\n params.put(\"text\", \"notused\");\n\n client.post(Constants.API_URL, params, new AsyncHttpResponseHandler() {\n @Override\n public void onStart() {\n // called before request is started\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n //setting the new location AND GETTING THE JSON RESPONSE!\n String decoded = null; // example for one encoding type\n try {\n decoded = new String(response, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n Log.v(TAG, \"API call onSuccess = \" + statusCode + \", Headers: \" + headers[0] + \", response.length: \" + response.length +\n \", decoded:\" + decoded);\n\n try {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n JSONArray list = new JSONArray(decoded);\n Log.d(TAG, \"API Call postGetRoomWIP getroom returned list.length: \" + list.length());\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n roomArray.clear();\n\n for (int i = 0; i < list.length(); i++) {\n JSONObject obj = list.getJSONObject(i);\n String nickName = obj.getString(\"nickname\");\n String mLocation = obj.getString(\"location\");\n String gmtDateString = obj.getString(\"loc_time\");\n // add the guys above to Room roomObj\n Room roomObj = new Room(deviceSingleton.getSecretCode(), nickName, mLocation, gmtDateString);\n roomArray.add(roomObj);\n }\n Log.v(TAG, \"postGetRoomWIP remove this next call to updatePointsOnMapWithAPIData and make a notification trigger it like iOS\");\n try {\n updatePointsOnMapWithAPIData();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n Log.v(TAG, \"postGetRoomWIP API call onFailure = \" + errorResponse);\n // called when response HTTP status is \"4XX\" (eg. 401, 403, 404)\n }\n\n @Override\n public void onRetry(int retryNo) {\n // called when request is retried\n }\n });\n Log.v(TAG, \"API call response out of catch = \" + response);\n\n }", "private Earthquake parseJSON(JSONObject o){\n String country, place, id;\r\n double magnitude, lat, lng, depth;\r\n long time_long, updated_long;\r\n id = o.optString(\"id\");\r\n JSONObject prop = o.getJSONObject(\"properties\");\r\n place = prop.optString(\"place\");\r\n country = place.substring(place.lastIndexOf(\",\"), (place.length()-1)); \r\n magnitude = prop.optDouble(\"mag\");\r\n time_long=o.optLong(\"time\");\r\n updated_long=o.optLong(\"updated\");\r\n \r\n \r\n JSONObject geometry = o.getJSONObject(\"geometry\");\r\n JSONArray coor = geometry.getJSONArray(\"coordinates\");\r\n lng=coor.optDouble(0);\r\n lat=coor.optDouble(0);\r\n depth=coor.optDouble(0);\r\n \r\n //storing the earthquake data to the ontology\r\n return new Earthquake(id, place, magnitude, lng, lat, depth);\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkLocationPermission()) {\n getLocation();\n mMap.setMyLocationEnabled(true);\n\n }\n } else {\n getLocation();\n }\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n VoterPojo mPojo = (VoterPojo) marker.getTag();\n if (mPojo != null) {\n // Toast.makeText(getApplicationContext(), mPojo.getVoterName(), Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), marker.getTitle(), Toast.LENGTH_LONG).show();\n\n }\n return false;\n }\n });\n\n mDialog.show();\n\n mReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n mDialog.dismiss();\n\n mVotersList = new ArrayList<>();\n\n for (DataSnapshot indi : dataSnapshot.getChildren()) {\n\n VoterPojo mPojo = indi.getValue(VoterPojo.class);\n mVotersList.add(mPojo);\n }\n\n placeMarkers(mMap, mVotersList);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n mDialog.dismiss();\n\n }\n });\n }", "private void direction_call(LatLng orign, LatLng des) {\n\n String url = \"https://maps.googleapis.com/maps/api/directions/json?origin=\" + orign.latitude + \",\" + orign.longitude + \"&destination=\" + des.latitude + \",\" + des.longitude + \"&sensor=false\";\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n StringRequest objectRequest = new StringRequest(url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Toast.makeText(getActivity(), response.toString(), 3).show();\n ParserTask parserTask = new ParserTask();\n parserTask.execute(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n requestQueue.add(objectRequest);\n }", "private void processData(List<LocationModel> locationListFromJSON) {\n\n locationListViewModels.clear();\n locationListViewModel = null;\n\n //Assign Data into ListView\n locationListViewModel = new LocationListViewModel();\n getLocationListViewModels = new ArrayList<>();\n\n //Checking Location already exist or not\n for (LocationModel item : locationListFromJSON) {\n\n\n Cursor jCursor = locationDBAdapter.checkLocationDataByLatLng(item.getGeometry().getGeoLocation().getLatitude(),\n item.getGeometry().getGeoLocation().getLongitude());\n\n //Manage lifetime of the cursor\n getActivity().startManagingCursor(jCursor);\n\n //Data already exist in database\n if (jCursor.moveToFirst()) {\n\n Log.e(\"Got it!\", item.getName());\n\n //Get Location distance from the user current location\n String distance = getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()));\n\n //Get Information from database\n this.locationListViewModels.add(new LocationListViewModel(\n jCursor.getString(LocationDBAdapter.COL_LOCATION_NAME),\n jCursor.getDouble(LocationDBAdapter.COL_LOCATION_LATITUDE),\n jCursor.getDouble(LocationDBAdapter.COL_LOCATION_LONGITUDE),\n distance));\n\n this.getLocationListViewModels = locationListViewModels;\n\n } else {\n\n //Add New Data from JSON into ListViewModel\n locationListViewModels.add(new LocationListViewModel(\n item.getName(),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()),\n getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()))\n ));\n\n //Assign to Global Variable\n this.getLocationListViewModels.add(new LocationListViewModel(\n item.getName(),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()),\n getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()))\n ));\n }\n\n //Run UiThread (ListView)\n if (getActivity() != null) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //Set Adapter\n //RecyclerViewAdapter Setup\n Collections.sort(locationListViewModels);\n Collections.sort(getLocationListViewModels);\n binding.mapSearchResultRecyclerView.setAdapter(mapRecyclerAdapter);\n mapRecyclerAdapter.notifyDataSetChanged();\n\n }\n });\n\n }\n }\n\n }", "public void loadData(){\n JsonArrayRequest request = new JsonArrayRequest(\"http://www.efstratiou.info/projects/newsfeed/getList.php\", netListener, errorListener);\n\n //submit request\n ArticlesApp.getInstance().getRequestQueue().add(request);\n\n }", "@Override\n public void callBack(String response) {\n JSONObject object = null, objectData = null;\n JSONArray jsonArr = null, jsonArr1 = null;\n try {\n object = new JSONObject(response);\n objectData = object.getJSONObject(\"dataset\");\n jsonArr = objectData.getJSONArray(\"data\");\n for (int i = 0; i < jsonArr.length(); i++) {\n jsonArr1 = jsonArr.getJSONArray(i);\n MapChart mapChart = new MapChart();\n mapChart.setX(jsonArr1.getString(0));\n mapChart.setY(jsonArr1.get(1).toString());\n mapCharts.add(mapChart);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n generateTempoData();\n swipeRefreshLayout.setRefreshing(false);\n }", "@Override\r\n\t\t\tprotected List<HashMap<String, String>> doInBackground(\r\n\t\t\t\t\tString... jsonData) {\r\n\r\n\t\t\t\tList<HashMap<String, String>> places = null;\r\n\t\t\t\tGeocodeJSONParser parser = new GeocodeJSONParser();\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tjObject = new JSONObject(jsonData[0]);\r\n\r\n\t\t\t\t\t/** Getting the parsed data as a an ArrayList */\r\n\t\t\t\t\tplaces = parser.parse(jObject);\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tLog.d(\"Exception\", e.toString());\r\n\t\t\t\t}\r\n\t\t\t\treturn places;\r\n\t\t\t}", "@Override\n public void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data) {\n requestingPoints = false;\n }", "private void getFlatList(final String complex_id, final String block_name) {\n String tag_string_req = \"req_login\";\n\n loaderDialog.show();\n array4 = new ArrayList<>();\n flatList.clear();\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.registration_flat_list, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"JOB RESPONSE: \" + response.toString());\n\n loaderDialog.dismiss();\n\n Gson gson = new Gson();\n\n try {\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n String status = jobj.get(\"status\").getAsString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").getAsString().replaceAll(\"\\\"\", \"\");\n\n Log.d(\"jobj\", \"\" + jobj);\n\n if(status.equals(\"1\")) {\n //array.add(\"Select Location\");\n JsonArray all_data = jobj.getAsJsonArray(\"all_data\");\n\n array4.add(\"Flat Number\");\n\n for (int j = 0; j < all_data.size(); j++) {\n\n JsonObject flat = all_data.get(j).getAsJsonObject();\n String floor = flat.get(\"floor\").getAsString().replaceAll(\"\\\"\", \"\");\n JsonArray data = flat.getAsJsonArray(\"data\");\n\n for (int i = 0; i < data.size(); i++) {\n JsonObject jobj1 = data.get(i).getAsJsonObject();\n //get the object\n\n String id = jobj1.get(\"id\").toString().replaceAll(\"\\\"\", \"\");\n String flat_no = jobj1.get(\"flat_no\").toString().replaceAll(\"\\\"\", \"\");\n\n HashMap<String, String> map_ser = new HashMap<>();\n\n map_ser.put(\"id\", id);\n map_ser.put(\"flat_no\", flat_no);\n\n flatList.add(map_ser);\n array4.add(flat_no + \"(Floor : \"+floor+\")\");\n\n }\n\n }\n\n }else {\n\n array4.add(\"No Flat Found\");\n }\n\n dataadapter4 = new ArrayAdapter(RegisterFlatDetails.this,\n R.layout.item_spinner, R.id.tvCust, array4);\n edt_flat_no.setAdapter(dataadapter4);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"DATA NOT FOUND: \" + error.getMessage());\n loaderDialog.dismiss();\n }\n }){\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to activity_login url\n Map<String, String> params = new HashMap<>();\n\n params.put(\"complex_id\", complex_id);\n params.put(\"block\", block_name);\n params.put(\"type\", user_type);\n\n // Log.d(TAG, \"city_id: \"+params);\n\n return params;\n }\n\n };\n // Adding request to request queue\n GlobalClass.getInstance().addToRequestQueue(strReq, tag_string_req);\n strReq.setRetryPolicy(new DefaultRetryPolicy(20 * 1000,\n 10, 1.0f));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n RequestQueue queue = Volley.newRequestQueue(this);\n String gamesUrl = \"https://treasurehunt-mamn01.herokuapp.com/api/games\";\n\n StringRequest strRequest = new StringRequest(Request.Method.GET, gamesUrl,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n ArrayList<Game> games = Parser.generateGames(response);\n\n for (Game g : games) {\n Log.i(\"Maps\", \"Game (\" + g.getId() + \"): \" + g.getName());\n\n Marker m = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(g.getPosition().getLatitude(), g.getPosition().getLongitude()))\n .title(g.getName()));\n\n gameMarkers.put(m, g.getId());\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Maps\", error.toString());\n }\n });\n\n queue.add(strRequest);\n\n /*\n Marker m = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(55.711165, 13.207776)).title(\"First Game\"));\n gameMarkers.put(m, 1);\n\n m = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(55.721001, 13.210863)).title(\"Delphi's Game\"));\n gameMarkers.put(m, 2);\n */\n\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n enableMyLocation();\n String provider = locationManager.getBestProvider(new Criteria(), true);\n Location location = getLastKnownLocation();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(location.getLatitude(), location.getLongitude()), 17.0f));\n }", "@Override\n public void onSucceed(int what, Response response) {\n gson = new Gson();\n try {\n switch (what) {\n case 0x021://获取城市\n\n //企查查城市数据解法\n// String jstring = (String) response.get();\n// map = gson.fromJson(jstring, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.citys> list = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Result\").toString(), new TypeToken<List<DataManager.citys>>() {\n// }.getType());\n// DataManager.citysList = list;\n\n //真实城市数据解法————zlh手解json\n String jstring = (String) response.get();\n map = gson.fromJson(jstring, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (((LinkedTreeMap) map.get(\"data\")).size() != 0) {\n List<LinkedTreeMap> list = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"city\");\n for (int i = 0; i < list.size(); i++) {\n DataManager.citys temp1 = new DataManager.citys();\n temp1.c_name = (String) list.get(i).get(\"c_name\");\n temp1.c_code = (String) list.get(i).get(\"c_code\");\n temp1.citycode = new ArrayList<>();\n List<LinkedTreeMap> templist = (List<LinkedTreeMap>) list.get(i).get(\"citycode\");\n for (int j = 0; j < templist.size(); j++) {\n DataManager.citycode temp2 = new DataManager.citycode();\n temp2.c_code = (String) templist.get(j).get(\"c_code\");\n temp2.c_name = (String) templist.get(j).get(\"c_name\");\n temp1.citycode.add(temp2);\n }\n DataManager.citysList.add(temp1);\n }\n }\n break;\n case 0x110://获取APP最新版本\n jsonString = (String) response.get();\n DataManager.MyNewAppS = gson.fromJson(jsonString, DataManager.MyNewApp.class);\n WelcomeActivity.handler.sendEmptyMessage(1);\n break;\n case 0x111://获取新闻\n jsonString = (String) response.get();\n DataManager.MyNewsS = gson.fromJson(jsonString, DataManager.MyNews.class);\n if (DataManager.MyNewsS.data.Newslist != null && DataManager.MyNewsS.data.Newslist.size() > 0) {\n MainActivity.MyNewsList = DataManager.MyNewsS.data.Newslist;\n }\n WelcomeActivity.handler.sendEmptyMessage(10);\n break;\n case 0x1111://获取更多新闻\n jsonString = (String) response.get();\n DataManager.MyNewsSMore = gson.fromJson(jsonString, DataManager.MyNews.class);\n if (DataManager.MyNewsSMore.data.Newslist != null && DataManager.MyNewsSMore.data.Newslist.size() > 0) {\n for (int i = 0; i < DataManager.MyNewsSMore.data.Newslist.size(); i++) {\n MainActivity.MyNewsList.add(DataManager.MyNewsSMore.data.Newslist.get(i));\n }\n MainActivity.handler.sendEmptyMessage(0);\n } else {\n MainActivity.handler.sendEmptyMessage(101);\n }\n break;\n case 0x112://获取APP首页轮播图\n jsonString = (String) response.get();\n DataManager.LBimgS = gson.fromJson(jsonString, DataManager.LBimg.class);\n WelcomeActivity.handler.sendEmptyMessage(0);\n break;\n case 0x113://获取最新认领\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n if (DataManager.MyClaimUtilsModel.data.Claimlist != null && DataManager.MyClaimUtilsModel.data.Claimlist.size() > 0) {\n MainActivity.MyCliamList = DataManager.MyClaimUtilsModel.data.Claimlist;\n if (MainActivity.handler != null) {\n MainActivity.handler.sendEmptyMessage(7);\n }\n }\n break;\n case 0x1131://获取最新认领(more)\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n if (DataManager.MyClaimUtilsModel.data.Claimlist != null && DataManager.MyClaimUtilsModel.data.Claimlist.size() > 0) {\n Main_NewCliam_MoreListActivity.MyCliamListMore = DataManager.MyClaimUtilsModel.data.Claimlist;\n MainActivity.handler.sendEmptyMessage(11);\n }\n break;\n case 0x114://获取热点\n jsonString = (String) response.get();\n DataManager.MyHotS = gson.fromJson(jsonString, DataManager.MyHot.class);\n if (DataManager.MyHotS.data != null && DataManager.MyHotS.data.HotspotAnalysis != null && DataManager.MyHotS.data.HotspotAnalysis.size() > 0) {\n MainActivity.MyHotsList = DataManager.MyHotS.data.HotspotAnalysis;\n }\n break;\n case 0x022://搜索结果\n String searchstr = (String) response.get();\n //test\n //searchstr=\"{\\\"message\\\":\\\"true\\\",\\\"status\\\":1,\\\"data\\\":{\\\"Result\\\":[{\\\"PRIPID\\\":\\\"3601032011041300098564\\\",\\\"entname\\\":\\\"江西智容科技有限公司\\\",\\\"REGNO\\\":\\\"360103210025958\\\",\\\"REGORG_CN\\\":\\\"南昌高新技术产业开发区\\\",\\\"NAME\\\":\\\"万杏娥\\\",\\\"OPFROM\\\":\\\"2011-04-28\\\",\\\"OPTO\\\":\\\"2031-04-27\\\",\\\"REGSTATE_CN\\\":\\\"存续(在营、开业、在册)\\\",\\\"C_PROVINCE\\\":\\\"36\\\",\\\"D_ADDTIME\\\":\\\"2016-03-17\\\",\\\"C_STATE\\\":\\\"1\\\",\\\"UNISCID\\\":\\\"null\\\",\\\"REGCAP\\\":\\\"5000.0\\\",\\\"ENTTYPE_CN\\\":\\\"有限责任公司(自然人投资或控股)\\\",\\\"DOM\\\":\\\"江西省南昌市高新技术产业开发区高新区高新二路建昌工业园金庐软件园海外大厦北楼306室\\\",\\\"INDUSTRYPHY\\\":\\\"I\\\",\\\"INDUSTRYPHY_NAME\\\":\\\"信息传输、软件和信息技术服务业\\\",\\\"OPSCOPE\\\":\\\"计算机软件系统开发;办公自动化设备销售;计算机系统集成;国内广告的设计、制作、发布、代理;会展服务(以上项目国家有专项规定的除外)\\\"},{\\\"PRIPID\\\":\\\"20160127091814206993\\\",\\\"entname\\\":\\\"江西智容科技有限公司南昌分公司\\\",\\\"REGNO\\\":\\\"360105220000025\\\",\\\"REGORG_CN\\\":\\\"null\\\",\\\"NAME\\\":\\\"罗川\\\",\\\"OPFROM\\\":\\\"2016-02-04\\\",\\\"OPTO\\\":\\\"null\\\",\\\"REGSTATE_CN\\\":\\\"存续(在营、开业、在册)\\\",\\\"C_PROVINCE\\\":\\\"36\\\",\\\"D_ADDTIME\\\":\\\"2016-03-17\\\",\\\"C_STATE\\\":\\\"null\\\",\\\"UNISCID\\\":\\\"91360105MA35GGBY60\\\",\\\"REGCAP\\\":\\\"null\\\",\\\"ENTTYPE_CN\\\":\\\"有限责任公司分公司(自然人投资或控股)\\\",\\\"DOM\\\":\\\"红星村原红星乡财政所\\\",\\\"INDUSTRYPHY\\\":\\\"L\\\",\\\"INDUSTRYPHY_NAME\\\":\\\"租赁和商业服务业\\\",\\\"OPSCOPE\\\":\\\"餐饮企业管理服务;食堂(主食、热菜、早点)(卫生许可证有效期至2011年5月13日止)(以上项目国家有专项规定的除外)\\\"}],\\\"Paging\\\":{\\\"PageSize\\\":40,\\\"PageIndex\\\":0,\\\"TotalRecords\\\":2}}}\";\n map = gson.fromJson(searchstr, new TypeToken<Map<String, Object>>() {\n }.getType());\n// List<DataManager.search> searchstrlist2 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Result\").toString(), new TypeToken<List<DataManager.search>>() {\n// }.getType());\n// DataManager.searchList = searchstrlist2;\n baging = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Paging\").toString(), DataManager.baging.class);\n List<LinkedTreeMap> searchstrlist2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"Result\");//余思\n if (DataManager.searchList.size() != 0) {\n DataManager.searchList.clear();\n }\n if (DataManager.searchListMore.size() != 0) {\n DataManager.searchListMore.clear();\n }\n for (LinkedTreeMap temp : searchstrlist2) {\n DataManager.search serchtemp = new DataManager.search();\n\n serchtemp.ENTTYPE = (String) temp.get(\"ENTTYPE\");\n\n serchtemp.PRIPID = (String) temp.get(\"PRIPID\");\n serchtemp.ENTNAME = (String) temp.get(\"ENTNAME\");\n serchtemp.REGNO = (String) temp.get(\"REGNO\");\n serchtemp.REGORG_CN = (String) temp.get(\"REGORG_CN\");\n serchtemp.NAME = (String) temp.get(\"NAME\");\n serchtemp.OPFROM = (String) temp.get(\"ESTDATE\");//以前是OPFROM后来无缘无故变成ESTDATE\n serchtemp.OPTO = (String) temp.get(\"OPTO\");\n serchtemp.REGSTATE_CN = (String) temp.get(\"REGSTATE_CN\");\n serchtemp.C_PROVINCE = (String) temp.get(\"C_PROVINCE\");\n serchtemp.D_ADDTIME = (Object) temp.get(\"D_ADDTIME\");\n serchtemp.C_STATE = (String) temp.get(\"C_STATE\");\n if (String.valueOf(temp.get(\"REGCAP\")) == \"null\") {\n serchtemp.REGCAP = \"0\";\n }\n if (((String) temp.get(\"REGCAP\")).contains(\".\")) {\n serchtemp.REGCAP = ((String) temp.get(\"REGCAP\")).substring(0, ((String) temp.get(\"REGCAP\")).indexOf(\".\"));//查企业,品牌和失信判定是否有小数点\n } else {\n serchtemp.REGCAP = (String) temp.get(\"REGCAP\");\n }\n serchtemp.ENTTYPE_CN = (String) temp.get(\"ENTTYPE_CN\");\n serchtemp.DOM = (String) temp.get(\"DOM\");\n serchtemp.INDUSTRYPHY = (String) temp.get(\"INDUSTRYPHY\");\n serchtemp.INDUSTRYPHY_NAME = (String) temp.get(\"INDUSTRYPHY_NAME\");\n serchtemp.OPSCOPE = (String) temp.get(\"OPSCOPE\");\n DataManager.searchList.add(serchtemp);\n }\n if (DataManager.searchList != null && DataManager.searchList.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(0);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x0221://搜索加载更多\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n baging = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"Paging\").toString(), DataManager.baging.class);\n List<LinkedTreeMap> searchstrlist22 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"Result\");\n if (DataManager.searchListMore.size() != 0) {\n DataManager.searchListMore.clear();\n }\n for (LinkedTreeMap temp : searchstrlist22) {\n DataManager.search serchtemp = new DataManager.search();\n serchtemp.ENTTYPE = (String) temp.get(\"ENTTYPE\");\n serchtemp.PRIPID = (String) temp.get(\"PRIPID\");\n serchtemp.ENTNAME = (String) temp.get(\"ENTNAME\");\n serchtemp.REGNO = (String) temp.get(\"REGNO\");\n serchtemp.REGORG_CN = (String) temp.get(\"REGORG_CN\");\n serchtemp.NAME = (String) temp.get(\"NAME\");\n serchtemp.OPFROM = (String) temp.get(\"ESTDATE\");//以前是OPFROM后来无缘无故变成ESTDATE\n serchtemp.OPTO = (String) temp.get(\"OPTO\");\n serchtemp.REGSTATE_CN = (String) temp.get(\"REGSTATE_CN\");\n serchtemp.C_PROVINCE = (String) temp.get(\"C_PROVINCE\");\n serchtemp.D_ADDTIME = (Object) temp.get(\"D_ADDTIME\");\n serchtemp.C_STATE = (String) temp.get(\"C_STATE\");\n if (String.valueOf(temp.get(\"REGCAP\")) == \"null\") {\n serchtemp.REGCAP = \"0\";\n }\n if (((String) temp.get(\"REGCAP\")).contains(\".\")) {\n serchtemp.REGCAP = ((String) temp.get(\"REGCAP\")).substring(0, ((String) temp.get(\"REGCAP\")).indexOf(\".\"));//查企业,品牌和失信去小数点\n } else {\n serchtemp.REGCAP = (String) temp.get(\"REGCAP\");\n }\n\n serchtemp.ENTTYPE_CN = (String) temp.get(\"ENTTYPE_CN\");\n serchtemp.DOM = (String) temp.get(\"DOM\");\n serchtemp.INDUSTRYPHY = (String) temp.get(\"INDUSTRYPHY\");\n serchtemp.INDUSTRYPHY_NAME = (String) temp.get(\"INDUSTRYPHY_NAME\");\n serchtemp.OPSCOPE = (String) temp.get(\"OPSCOPE\");\n DataManager.searchListMore.add(serchtemp);\n }\n if (DataManager.searchListMore != null && DataManager.searchListMore.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(0);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x023://预留获取行业\n// gson = new Gson();\n// String str3 = (String) response.get();\n// map = gson.fromJson(str3, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<LinkedTreeMap> listtemp = (List<LinkedTreeMap>) map.get(\"data\");\n// String jsonstradd = gson.toJson(listtemp);\n// List<DataManager.industryData> listtemps = gson.fromJson(jsonstradd, new TypeToken<List<DataManager.Data>>() {\n// }.getType());\n// DataManager.dataList = listtemps;\n// for (DataManager.industryData dt : DataManager.dataList) {\n// DataManager.SubyList = dt.SubIndustryList;\n// }\n /*DataManager.industry industry1 = null;\n String industry = (String) response.get();*/\n\n /* try {\n JSONObject a=new JSONObject(industry);\n JSONArray array=a.getJSONArray(\"data\");\n for(int i=0;i<array.length();i++){\n JSONObject b=array.getJSONObject(i);\n DataManager.industry.Name= (String) b.get(\"Name\");\n DataManager.industry.Code=(String) b.get(\"Code\");\n DataManager.industry.Desc=(String) b.get(\"Desc\");\n JSONArray array1=b.getJSONArray(\"SubIndustryList\");\n for(int j=0;j<array1.length();j++){\n JSONObject c =(JSONObject) array1.get(j);\n DataManager.industry.SubIndustryList.add((String) c.get(\"Name\"));\n }\n DataManager.industryList.add(industry1);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }*/\n String str3 = (String) response.get();\n map = gson.fromJson(str3, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (((LinkedTreeMap) map.get(\"data\")).size() != 0) {\n List<LinkedTreeMap> list4 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"industry\");\n if (DataManager.industryDataList.size() != 0) {\n DataManager.industryDataList.clear();\n }\n for (LinkedTreeMap tempTree : list4) {\n DataManager.industryData industryData = new DataManager.industryData();\n industryData.EC_VALUE = (String) tempTree.get(\"EC_VALUE\");\n industryData.EC_NAME = (String) tempTree.get(\"EC_NAME\");\n DataManager.industryDataList.add(industryData);\n }\n }\n\n break;\n case 0x024://获取企业详情24宫格等\n jsonString = (String) response.get();\n try {\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists2 = null;\n if (map.get(\"data\") != null && !map.get(\"data\").equals(null) && ((Map<String, Object>) map.get(\"data\")).get(\"allcount\") != null && !((Map<String, Object>) map.get(\"data\")).get(\"allcount\").equals(null)) {\n lists2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n }\n List<LinkedTreeMap> lists3 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n\n if (lists2 != null && lists2.size() > 0) {\n for (LinkedTreeMap temp : lists2) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists3 != null && lists3.size() > 0) {\n for (LinkedTreeMap temp : lists3) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n SearchFirmActivty.handler.sendEmptyMessage(5);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n } catch (NullPointerException e) {\n e.printStackTrace();\n Toast.show(\"该企业暂无数据\");\n SearchFirmActivty.pd.dismiss();\n }\n break;\n case 0x025://我的关注跳公司详情界面的请求\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists25 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n List<LinkedTreeMap> lists35 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n if (lists25 != null && lists25.size() > 0) {\n for (LinkedTreeMap temp : lists25) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists35 != null && lists35.size() > 0) {\n for (LinkedTreeMap temp : lists35) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n MyconcernActivity.handler.sendEmptyMessage(1);\n } else {\n SearchFirmActivty.handler.sendEmptyMessage(500);\n }\n break;\n case 0x026://主界面 跳公司详情\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> lists26 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"allcount\");\n List<LinkedTreeMap> lists261 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"baseinfo\");\n if (DataManager.allcountsList != null) {\n DataManager.allcountsList.clear();\n }\n if (DataManager.BaseinfoList != null) {\n DataManager.BaseinfoList.clear();\n }\n if (lists26 != null && lists26.size() > 0) {\n for (LinkedTreeMap temp : lists26) {\n DataManager.allcount cfo = new DataManager.allcount();\n cfo.EnterAddtionID = temp.get(\"EnterAddtionID\").toString();\n cfo.IsFavorite = temp.get(\"IsFavorite\").toString();\n cfo.HonorCount = temp.get(\"HonorCount\").toString();\n cfo.JudiciaryCount = temp.get(\"JudiciaryCount\").toString();\n cfo.PledgeCount = temp.get(\"PledgeCount\").toString();\n cfo.CopyrightCount = temp.get(\"CopyrightCount\").toString();\n cfo.AnnualCount = temp.get(\"AnnualCount\").toString();\n cfo.AdvertisementCount = temp.get(\"AdvertisementCount\").toString();\n cfo.BaseInfoCount = temp.get(\"BaseInfoCount\").toString();\n cfo.ApprovalCount = temp.get(\"ApprovalCount\").toString();\n cfo.PunishCount = temp.get(\"PunishCount\").toString();\n cfo.WarningCount = temp.get(\"WarningCount\").toString();\n cfo.TrademarkCount = temp.get(\"TrademarkCount\").toString();\n cfo.AbnormityCount = temp.get(\"AbnormityCount\").toString();\n cfo.CreditCount = temp.get(\"CreditCount\").toString();\n cfo.SupportCount = temp.get(\"SupportCount\").toString();\n cfo.MortgagorCount = temp.get(\"MortgagorCount\").toString();\n cfo.PatentCount = temp.get(\"PatentCount\").toString();\n cfo.PageView = temp.get(\"PageView\").toString();\n cfo.IsClaim = temp.get(\"IsClaim\").toString();\n cfo.EntShowCount = temp.get(\"EntShowCount\").toString();//++\n cfo.BiddingCount = temp.get(\"BiddingCount\").toString();\n cfo.JobCount = temp.get(\"JobCount\").toString();\n cfo.EntNewCount = temp.get(\"EntNewCount\").toString();\n DataManager.allcountsList.add(cfo);\n }\n }\n if (lists261 != null && lists261.size() > 0) {\n for (LinkedTreeMap temp : lists261) {\n DataManager.Baseinfo cfo = new DataManager.Baseinfo();\n cfo.REGSTATE = temp.get(\"REGSTATE\").toString();\n cfo.REGNO = temp.get(\"REGNO\").toString();\n cfo.NAME = temp.get(\"NAME\").toString();\n cfo.REGCAP = temp.get(\"REGCAP\").toString();\n cfo.ESTDATE = temp.get(\"ESTDATE\").toString();\n cfo.ENTTYPE_CN = temp.get(\"ENTTYPE_CN\").toString();\n cfo.ENTNAME = temp.get(\"ENTNAME\").toString();\n cfo.REGSTATE_CN = temp.get(\"REGSTATE_CN\").toString();\n cfo.UNISCID = temp.get(\"UNISCID\").toString();\n cfo.PRIPID = temp.get(\"PRIPID\").toString();\n cfo.ENTTYPE = temp.get(\"ENTTYPE\").toString();\n DataManager.BaseinfoList.add(cfo);\n }\n }\n if (DataManager.allcountsList != null && DataManager.allcountsList.size() > 0) {\n MainActivity.handler.sendEmptyMessage(8);\n }\n break;\n case 0x000://工商信息\n /*DataManager.Data0List.clear();\n String jstring0 = (String) response.get();\n DataManager.Root0 jsonRoot0 = gson.fromJson(jstring0, new TypeToken<DataManager.Root0>() {\n }.getType());\n DataManager.Data0 dt = jsonRoot0.data;\n DataManager.Data0List.add(dt);\n if (DataManager.Data0List != null && DataManager.Data0List.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(0);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }*/\n\n jsonString = (String) response.get();\n DataManager.gsxx = gson.fromJson(jsonString, DataManager.GSXX.class);\n if (DataManager.gsxx != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(0);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x001://行政信息\n String jstring1 = (String) response.get();\n map = gson.fromJson(jstring1, new TypeToken<Map<String, Object>>() {\n }.getType());\n\n List<LinkedTreeMap> list1 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"administrative\");\n List<LinkedTreeMap> list221 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"other\");\n if (DataManager.ad_List != null) {\n DataManager.ad_List.clear();\n }\n if (DataManager.admin_other_List != null) {\n DataManager.admin_other_List.clear();\n }\n if (list1 != null && list1.size() > 0) {\n for (LinkedTreeMap temp : list1) {\n DataManager.administraton cfo = new DataManager.administraton();\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.LICNAME = (String) temp.get(\"LICNAME\");\n cfo.LICNO = (String) temp.get(\"LICNO\");\n cfo.VALFROM = (String) temp.get(\"VALFROM\");\n cfo.LICANTH = (String) temp.get(\"LICANTH\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n DataManager.ad_List.add(cfo);\n }\n }\n if (list221 != null && list221.size() > 0) {\n for (LinkedTreeMap temp : list221) {\n DataManager.admin_other cfo = new DataManager.admin_other();\n cfo.LICANTH = (String) temp.get(\"LICANTH\");\n cfo.REGNO = (String) temp.get(\"REGNO\");\n cfo.VALFROM = (String) temp.get(\"VALFROM\");\n cfo.LICNAME_CN = (String) temp.get(\"LICNAME_CN\");\n cfo.LICID = (String) temp.get(\"LICID\");\n cfo.ENTNAME = (String) temp.get(\"ENTNAME\");\n cfo.LICNO = (String) temp.get(\"LICNO\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.TYPE = (String) temp.get(\"TYPE\");\n cfo.LICITEM = (String) temp.get(\"LICITEM\");\n DataManager.admin_other_List.add(cfo);\n }\n }\n if (DataManager.ad_List != null || DataManager.admin_other_List != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(1);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x002://荣誉信息\n String jstring2 = (String) response.get();\n// map = gson.fromJson(jstring2, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.honorInfo> list2 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"chattel\").toString().trim(), new TypeToken<List<DataManager.honorInfo>>() {\n// }.getType());\n// DataManager.honorInfoList = list2;\n// 以下代码解决空格问题c\n map = gson.fromJson(jstring2, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list2 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"chattel\");\n\n if (DataManager.honorInfoList != null) {\n DataManager.honorInfoList.clear();\n }\n if (list2 != null && list2.size() > 0) {\n for (LinkedTreeMap temp : list2) {\n DataManager.honorInfo cfo = new DataManager.honorInfo();\n cfo.HONORID = (String) temp.get(\"HONORID\");\n cfo.HONORNAME = (String) temp.get(\"HONORNAME\");\n cfo.HONORCONTENT = (String) temp.get(\"HONORCONTENT\");\n cfo.ORGAN = (String) temp.get(\"ORGAN\");\n cfo.C_UNIQUE_CODE = (String) temp.get(\"C_UNIQUE_CODE\");\n\n DataManager.honorInfoList.add(cfo);\n }\n }\n\n if (DataManager.honorInfoList != null && DataManager.honorInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(2);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x003://企业扶持信息\n String jstring3 = (String) response.get();\n DataManager.supportInfoS = gson.fromJson(jstring3, DataManager.supportInfo.class);\n if (DataManager.supportInfoS != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(3);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x004://抵押信息/动产\n jsonString = (String) response.get();\n DataManager.MychattelS = gson.fromJson(jsonString, DataManager.Mychattel.class);\n break;\n case 0x0041://抵押信息/不动产\n jsonString = (String) response.get();\n DataManager.MyrealEstateS = gson.fromJson(jsonString, DataManager.MyrealEstate.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(4);\n break;\n case 0x005://出质信息\n String jstring5 = (String) response.get();\n DataManager.Root5 jsonRoot5 = gson.fromJson(jstring5, new TypeToken<DataManager.Root5>() {\n }.getType());\n DataManager.pledgeInfoList = jsonRoot5.data;\n if (DataManager.pledgeInfoList != null && DataManager.pledgeInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(5);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x006://司法信息\n String jstring6 = (String) response.get();\n map = gson.fromJson(jstring6, new TypeToken<Map<String, Object>>() {\n }.getType());\n /**\n * json报错解析方法\n */\n// List<DataManager.JudicialDocuments> list61 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"judicialDocuments\").toString(), new TypeToken<List<DataManager.JudicialDocuments>>() {\n// }.getType());\n// List<DataManager.CrackCredit> list62 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"crackCredit\").toString(), new TypeToken<List<DataManager.CrackCredit>>() {\n// }.getType());\n// List<DataManager.ShareholderInformationChange> list63 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"shareholderInformationChange\").toString(), new TypeToken<List<DataManager.ShareholderInformationChange>>() {\n// }.getType());\n// List<DataManager.FrozenInformation> list64 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"frozenInformation\").toString(), new TypeToken<List<DataManager.FrozenInformation>>() {\n// }.getType());\n List<LinkedTreeMap> list61 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"judicialDocuments\");\n List<LinkedTreeMap> list62 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"crackCredit\");\n List<LinkedTreeMap> list63 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"shareholderInformationChange\");\n List<LinkedTreeMap> list64 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"frozenInformation\");\n /**\n * 司法文书信息\n */\n if (DataManager.JudicialDocumentsList != null) {\n DataManager.JudicialDocumentsList.clear();\n }\n if (list61 != null && list61.size() > 0) {\n for (LinkedTreeMap temp : list61) {\n DataManager.JudicialDocuments jud = new DataManager.JudicialDocuments();\n jud.CASENUM = (String) temp.get(\"CASENUM\");\n jud.REDECORG_CN = (String) temp.get(\"REDECORG_CN\");\n jud.SENTENCECONMENT = (String) temp.get(\"SENTENCECONMENT\");\n jud.SENTENCEDATE = (String) temp.get(\"SENTENCEDATE\");\n jud.SUPDEPARTMENT = (String) temp.get(\"SUPDEPARTMENT\");\n DataManager.JudicialDocumentsList.add(jud);\n }\n }\n /**\n * 失信被执行人信息\n */\n if (DataManager.CrackCreditList != null) {\n DataManager.CrackCreditList.clear();\n }\n if (list62 != null && list62.size() > 0) {\n for (LinkedTreeMap temp : list62) {\n DataManager.CrackCredit cra = new DataManager.CrackCredit();\n cra.COURT_NAME = (String) temp.get(\"COURT_NAME\");\n cra.COURTCASEID = (String) temp.get(\"COURTCASEID\");\n cra.DISREPUT_TYPE_NAME = (String) temp.get(\"DISREPUT_TYPE_NAME\");\n cra.GIST_CID = (String) temp.get(\"GIST_CID\");\n cra.PERFORMANCE = (String) temp.get(\"PERFORMANCE\");\n cra.REG_DATE = (String) temp.get(\"REG_DATE\");\n cra.DUTY = (String) temp.get(\"DUTY\");\n DataManager.CrackCreditList.add(cra);\n }\n }\n /**\n * 股东变更信息\n */\n if (DataManager.ShareholderInformationChangeList != null) {\n DataManager.ShareholderInformationChangeList.clear();\n }\n if (list63 != null && list63.size() > 0) {\n for (LinkedTreeMap temp : list63) {\n DataManager.ShareholderInformationChange sha = new DataManager.ShareholderInformationChange();\n sha.ALIEN = (String) temp.get(\"ALIEN\");\n sha.FROAM = (Double) temp.get(\"FROAM\");\n sha.FROAUTH = (String) temp.get(\"FROAUTH\");\n sha.INV = (String) temp.get(\"INV\");\n sha.REGNO = (String) temp.get(\"REGNO\");\n DataManager.ShareholderInformationChangeList.add(sha);\n }\n }\n /**\n * 股权冻结信息\n */\n if (DataManager.FrozenInformationList != null) {\n DataManager.FrozenInformationList.clear();\n }\n if (list64 != null && list64.size() > 0) {\n for (LinkedTreeMap temp : list64) {\n DataManager.FrozenInformation fro = new DataManager.FrozenInformation();\n fro.FROAM = (String) temp.get(\"FROAM\");\n fro.FROAUTH = (String) temp.get(\"FROAUTH\");\n fro.FROFROM = (String) temp.get(\"FROFROM\");\n fro.FROID = (String) temp.get(\"FROID\");\n fro.FROZDEADLINE = (String) temp.get(\"FROZDEADLINE\");\n fro.INVTYPE_CN = (String) temp.get(\"INVTYPE_CN\");\n DataManager.FrozenInformationList.add(fro);\n }\n }\n\n// DataManager.JudicialDocumentsList = list61;//司法文书信息\n// DataManager.CrackCreditList = list62;//失信被执行人信息\n// DataManager.ShareholderInformationChangeList = list63;//股东变更信息\n// DataManager.FrozenInformationList = list64;//股权冻结信息\n\n CompanyDetailsActivity.handler.sendEmptyMessage(6);\n break;\n case 0x007://预警信息zlh\n String jsonstring = (String) response.get();\n DataManager.AlertInfoS = gson.fromJson(jsonstring, DataManager.AlertInfo.class);\n if (DataManager.AlertInfoS.data.size() > 0 && DataManager.AlertInfoS != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(7);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x008://行政处罚\n String jstring8 = (String) response.get();\n DataManager.Root8 jsonRoot8 = gson.fromJson(jstring8, new TypeToken<DataManager.Root8>() {\n }.getType());\n DataManager.punishInfoList = jsonRoot8.data;\n if (DataManager.punishInfoList.size() > 0 && DataManager.punishInfoList != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(8);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x009://经营异常信息\n jsonString = (String) response.get();\n// map = gson.fromJson(jstring9, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.abnormalInfo> list9 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"abNormal\").toString(), new TypeToken<List<DataManager.abnormalInfo>>() {\n// }.getType());\n// map = gson.fromJson(jstring9, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<LinkedTreeMap> list9 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"abNormal\");\n//\n// if (DataManager.abnormalInfoList != null) {\n// DataManager.abnormalInfoList.clear();\n// }\n// if (list9 != null && list9.size() > 0) {\n// for (LinkedTreeMap temp : list9) {\n// DataManager.abnormalInfo cfo = new DataManager.abnormalInfo();\n// cfo.BUSEXCLIST = (String) temp.get(\"BUSEXCLIST\");\n// cfo.SPECAUSE_CN = (String) temp.get(\"SPECAUSE_CN\");\n// cfo.ABNTIME = (String) temp.get(\"ABNTIME\");\n// cfo.DECORG_CN = (String) temp.get(\"DECORG_CN\");\n// cfo.REMEXCPRES_CN = (String) temp.get(\"REMEXCPRES_CN\");\n// cfo.REMDATE = (String) temp.get(\"REMDATE\");\n// cfo.REDECORG_CN = (String) temp.get(\"REDECORG_CN\");\n// DataManager.abnormalInfoList.add(cfo);\n// }\n\n DataManager.abnormalInfoS = gson.fromJson(jsonString, DataManager.abnormalInfo.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(9);\n\n break;\n case 0x010://专利信息\n jsonString = (String) response.get();\n DataManager.PatentInfoS = gson.fromJson(jsonString, DataManager.PatentInfo.class);\n if (DataManager.PatentInfoS.data.patentInfo != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(10);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x01012://专利信息(加载更多)\n jsonString = (String) response.get();\n DataManager.PatentInfoS = gson.fromJson(jsonString, DataManager.PatentInfo.class);\n if (DataManager.PatentInfoS.data.patentInfo != null) {\n PatentActivity.handler.sendEmptyMessage(0);\n }\n\n break;\n case 0x011://商标信息\n jsonString = (String) response.get();\n DataManager.trademarkModelS = gson.fromJson(jsonString, DataManager.trademarkModel.class);\n if (DataManager.trademarkModelS.data.trademark.size() > 0 && DataManager.trademarkModelS.data.trademark != null) {\n CompanyDetailsActivity.handler.sendEmptyMessage(11);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x01112://商标信息(加载更多)\n jsonString = (String) response.get();\n DataManager.trademarkModelS = gson.fromJson(jsonString, DataManager.trademarkModel.class);\n if (DataManager.trademarkModelS.data.trademark.size() > 0 && DataManager.trademarkModelS.data.trademark != null) {\n TrademarkActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x012://著作信息\n String jstrin12 = (String) response.get();\n map = gson.fromJson(jstrin12, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list112 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"patentInfo\");\n List<LinkedTreeMap> list112_1 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"patentInfoSoftwore\");\n ;\n\n\n if (DataManager.copyrightInfoeList != null) {\n DataManager.copyrightInfoeList.clear();\n }\n\n if (list112 != null && list112.size() > 0) {\n for (LinkedTreeMap temp : list112) {\n DataManager.copyrightInfo cfo = new DataManager.copyrightInfo();\n cfo.ID = (String) temp.get(\"ID\");\n cfo.REGISTERDATA = (String) temp.get(\"REGISTERDATA\");\n cfo.REGISTERID = (String) temp.get(\"REGISTERID\");\n\n cfo.WORKNAME = (String) temp.get(\"WORKNAME\");\n cfo.WORKCLASS = (String) temp.get(\"WORKCLASS\");\n cfo.FINISHDATE = (String) temp.get(\"FINISHDATE\");\n cfo.FIRSTDATE = (String) temp.get(\"FIRSTDATE\");\n DataManager.copyrightInfoeList.add(cfo);\n }\n }\n if (list112_1 != null && list112_1.size() > 0) {\n for (LinkedTreeMap temp : list112_1) {\n DataManager.copyrightInfo cfo = new DataManager.copyrightInfo();\n cfo.ID = (String) temp.get(\"ID\");\n cfo.REGISTERDATA = (String) temp.get(\"REGISTERDATA\");\n cfo.REGISTERID = (String) temp.get(\"REGISTERID\");\n\n cfo.WORKCLASS = \"软件\";//额外附加值\n\n cfo.SOFTWARENAME = (String) temp.get(\"SOFTWARENAME\");\n cfo.SOFTWARESHORT = (String) temp.get(\"SOFTWARESHORT\");\n cfo.STARTINGDATE = (String) temp.get(\"STARTINGDATE\");\n DataManager.copyrightInfoeList.add(cfo);\n }\n }\n\n if (DataManager.copyrightInfoeList != null && DataManager.copyrightInfoeList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(12);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x013://广告资质\n String jstring13 = (String) response.get();\n// map = gson.fromJson(jstring13, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.advertisementInfo> list13 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"advertising\").toString(), new TypeToken<List<DataManager.advertisementInfo>>() {\n// }.getType());\n// DataManager.advertisementInfoList = list13;\n\n map = gson.fromJson(jstring13, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list13 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"advertising\");\n\n if (DataManager.advertisementInfoList != null) {\n DataManager.advertisementInfoList.clear();\n }\n if (list13 != null && list13.size() > 0) {\n for (LinkedTreeMap temp : list13) {\n DataManager.advertisementInfo cfo = new DataManager.advertisementInfo();\n cfo.ADVERTID = (String) temp.get(\"ADVERTID\");\n cfo.C_LEVEL = (String) temp.get(\"C_LEVEL\");\n cfo.CATEGORY = (String) temp.get(\"CATEGORY\");\n cfo.IDENTIFYDATE = (String) temp.get(\"IDENTIFYDATE\");\n cfo.VALFORM = (String) temp.get(\"VALFORM\");\n cfo.VALTO = (String) temp.get(\"VALTO\");\n cfo.IDENTIFYORGANS = (String) temp.get(\"IDENTIFYORGANS\");\n DataManager.advertisementInfoList.add(cfo);\n }\n }\n\n if (DataManager.advertisementInfoList != null && DataManager.advertisementInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(13);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x014://守合同重信用信息\n String jstring14 = (String) response.get();\n// map = gson.fromJson(jstring14, new TypeToken<Map<String, Object>>() {\n// }.getType());\n// List<DataManager.obeyedInfo> list14 = gson.fromJson(((Map<String, Object>) map.get(\"data\")).get(\"contractInfo\").toString(), new TypeToken<List<DataManager.obeyedInfo>>() {\n// }.getType());\n// DataManager.obeyedInfoList = list14;\n map = gson.fromJson(jstring14, new TypeToken<Map<String, Object>>() {\n }.getType());\n List<LinkedTreeMap> list14 = (List<LinkedTreeMap>) ((Map<String, Object>) map.get(\"data\")).get(\"contractInfo\");\n\n if (DataManager.obeyedInfoList != null) {\n DataManager.obeyedInfoList.clear();\n }\n if (list14 != null && list14.size() > 0) {\n for (LinkedTreeMap temp : list14) {\n DataManager.obeyedInfo cfo = new DataManager.obeyedInfo();\n cfo.PRIPID = (String) temp.get(\"PRIPID\");\n cfo.ENTNAME = (String) temp.get(\"ENTNAME\");\n cfo.REGNO = (String) temp.get(\"REGNO\");\n cfo.UNISCID = (String) temp.get(\"UNISCID\");\n cfo.CONTENT = (String) temp.get(\"CONTENT\");\n cfo.IDENTIFYDATE = (String) temp.get(\"IDENTIFYDATE\");\n cfo.IDENTIFYORGANS = (String) temp.get(\"IDENTIFYORGANS\");\n cfo.STATE = (String) temp.get(\"STATE\");\n DataManager.obeyedInfoList.add(cfo);\n }\n }\n if (DataManager.obeyedInfoList != null && DataManager.obeyedInfoList.size() > 0) {\n CompanyDetailsActivity.handler.sendEmptyMessage(14);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n\n break;\n case 0x015://自主公示zlh\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if ((List<LinkedTreeMap>) map.get(\"data\") != null) {\n List<LinkedTreeMap> listtemp = (List<LinkedTreeMap>) map.get(\"data\");\n\n for (int i = 0; i < listtemp.size(); i++) {\n switch (listtemp.get(i).get(\"type\").toString()) {\n case \"企业年报\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.reportList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.report>>() {\n }.getType());*/\n if (DataManager.reportList.size() > 0 || DataManager.reportList != null) {\n DataManager.reportList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.report report = new DataManager.report();\n report.ANCHEDATE = (String) r.get(\"ANCHEDATE\");\n report.ANCHEID = (String) r.get(\"ANCHEID\");\n report.ANCHEYEAR = (String) r.get(\"ANCHEYEAR\");\n DataManager.reportList.add(report);\n }\n\n }\n break;\n case \"股东及出资信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.fundedList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.funded>>() {\n }.getType());*/\n if (DataManager.fundedList.size() > 0 || DataManager.fundedList != null) {\n DataManager.fundedList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.funded funded = new DataManager.funded();\n funded.ACCONAM = (double) r.get(\"ACCONAM\");\n funded.ACCONDATE = (String) r.get(\"ACCONDATE\");\n funded.ACCONFORM = (String) r.get(\"ACCONFORM\");\n funded.ACCONFORM_CN = (String) r.get(\"ACCONFORM_CN\");\n funded.CONDATE = (String) r.get(\"CONDATE\");\n funded.CONFORM = (String) r.get(\"CONFORM\");\n funded.CONFORM_CN = (String) r.get(\"CONFORM_CN\");\n funded.INV = (String) r.get(\"INV\");\n funded.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n funded.SUBCONAM = (double) r.get(\"SUBCONAM\");\n funded.ACPUBLICDATE = (String) r.get(\"ACPUBLICDATE\");\n DataManager.fundedList.add(funded);\n\n }\n }\n break;\n case \"股权变更信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.stockList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.stock>>() {\n }.getType());*/\n if (DataManager.stockList.size() > 0 || DataManager.stockList != null) {\n DataManager.stockList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.stock stock = new DataManager.stock();\n stock.REGNO = (String) r.get(\"REGNO\");\n stock.ALTAF = (String) r.get(\"ALTAF\");\n stock.ENTNAME = (String) r.get(\"ENTNAME\");\n stock.INVUID = (String) r.get(\"INVUID\");\n stock.UNISCID = (String) r.get(\"UNISCID\");\n stock.PRIPID = (String) r.get(\"PRIPID\");\n stock.ALITEM = (String) r.get(\"ALITEM\");\n stock.ALTDATE = (String) r.get(\"ALTDATE\");\n stock.ALTBE = (String) r.get(\"ALTBE\");\n DataManager.stockList.add(stock);\n }\n }\n break;\n case \"行政许可信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.permitList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.permit>>() {\n }.getType());*/\n if (DataManager.permitList.size() > 0 || DataManager.permitList != null) {\n DataManager.permitList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.permit permit = new DataManager.permit();\n permit.invalidDate = (String) r.get(\"invalidDate\");\n permit.LICANTH = (String) r.get(\"LICANTH\");\n permit.LICITEM = (String) r.get(\"LICITEM\");\n permit.LICNAME_CN = (String) r.get(\"LICNAME_CN\");\n permit.LICNO = (String) r.get(\"LICNO\");\n permit.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n permit.VALFROM = (String) r.get(\"VALFROM\");\n permit.VALTO = (String) r.get(\"VALTO\");\n DataManager.permitList.add(permit);\n }\n }\n break;\n case \"知识产权登记信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.loreList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.lore>>() {\n }.getType());*/\n if (DataManager.loreList.size() > 0 || DataManager.loreList != null) {\n DataManager.loreList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.lore lore = new DataManager.lore();\n lore.TYPENAME = (String) r.get(\"TYPENAME\");\n lore.TMNAME = (String) r.get(\"TMNAME\");\n lore.INVALIDDATE = (String) r.get(\"INVALIDDATE\");\n lore.PLEREGPERFROM = (String) r.get(\"PLEREGPERFROM\");\n lore.EQUPLECANREA = (String) r.get(\"EQUPLECANREA\");\n lore.CANDATE = (String) r.get(\"CANDATE\");\n lore.UNISCID = (String) r.get(\"UNISCID\");\n lore.KINDS = (String) r.get(\"KINDS\");\n lore.PLEREGPERTO = (String) r.get(\"PLEREGPERTO\");\n lore.REGNO = (String) r.get(\"REGNO\");\n lore.TMREGNO = (String) r.get(\"TMREGNO\");\n lore.PLEDGOR = (String) r.get(\"PLEDGOR\");\n lore.PLEID = (String) r.get(\"PLEID\");\n lore.ENTNAME = (String) r.get(\"ENTNAME\");\n lore.INVALIDREA = (String) r.get(\"INVALIDREA\");\n lore.PRIPID = (String) r.get(\"PRIPID\");\n lore.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n lore.IMPORG = (String) r.get(\"IMPORG\");\n lore.TYPE = (String) r.get(\"TYPE\");\n DataManager.loreList.add(lore);\n }\n\n }\n break;\n case \"行政处罚信息\":\n if (listtemp.get(i).get(\"data\") != null) {\n /*DataManager.punishList = gson.fromJson(listtemp.get(i).get(\"data\").toString(), new TypeToken<List<DataManager.punish>>() {\n }.getType());*/\n if (DataManager.punishList.size() > 0 || DataManager.punishList != null) {\n DataManager.punishList.clear();\n }\n for (LinkedTreeMap r : (List<LinkedTreeMap>) listtemp.get(i).get(\"data\")) {\n DataManager.punish punish = new DataManager.punish();\n punish.PENTYPE_CN = (String) r.get(\"PENTYPE_CN\");\n punish.REMARK = (String) r.get(\"REMARK\");\n punish.UNISCID = (String) r.get(\"UNISCID\");\n punish.PENDECISSDATE = (String) r.get(\"PENDECISSDATE\");\n punish.PENAM = (Double) r.get(\"PENAM\");\n punish.CASEID = (String) r.get(\"CASEID\");\n punish.REGNO = (String) r.get(\"REGNO\");\n punish.JUDAUTH = (String) r.get(\"JUDAUTH\");\n punish.ENTNAME = (String) r.get(\"ENTNAME\");\n punish.PENDECNO = (String) r.get(\"PENDECNO\");\n punish.PENTYPE = (String) r.get(\"PENTYPE\");\n punish.FORFAM = (Double) r.get(\"FORFAM\");\n punish.ILLEGACTTYPE = (String) r.get(\"ILLEGACTTYPE\");\n punish.PENCONTENT = (String) r.get(\"PENCONTENT\");\n punish.PRIPID = (String) r.get(\"PRIPID\");\n punish.PUBLICDATE = (String) r.get(\"PUBLICDATE\");\n DataManager.punishList.add(punish);\n }\n }\n break;\n default:\n break;\n }\n\n }\n CompanyDetailsActivity.handler.sendEmptyMessage(15);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x101://关注企业\n jsonString = (String) response.get();\n DataManager.FavotiteS = gson.fromJson(jsonString, DataManager.Favotite.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(22);\n break;\n case 0x102://取消关注企业\n jsonString = (String) response.get();\n DataManager.FavotiteS = gson.fromJson(jsonString, DataManager.Favotite.class);\n CompanyDetailsActivity.handler.sendEmptyMessage(23);\n break;\n case 0x103://我的关注列表\n jsonString = (String) response.get();\n DataManager.FavotiteListS = gson.fromJson(jsonString, DataManager.FavotiteList.class);\n MainActivity.handler.sendEmptyMessage(5);\n break;\n case 0x201://评论\n jsonString = (String) response.get();\n DataManager.MyCommentlistrS = gson.fromJson(jsonString, DataManager.MyCommentlistr.class);\n if (DataManager.MyCommentlistrS.data.userreview != null && DataManager.MyCommentlistrS.data.userreview.size() > 0) {\n CommentListActivity.handler.sendEmptyMessage(0);\n } else {\n CommentListActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x202://点赞\n String jstring202 = (String) response.get();\n DataManager.Root202 jsonRoot202 = gson.fromJson(jstring202, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d202 = jsonRoot202.data;\n DataManager.Result = d202.result;\n// if (DataManager.Result.equals(\"1\")) {\n// CommentListDetailsActivity.handler.sendEmptyMessage(2);\n// }\n break;\n case 0x203://差评\n String jstring203 = (String) response.get();\n DataManager.Root202 jsonRoot203 = gson.fromJson(jstring203, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d203 = jsonRoot203.data;\n DataManager.Result = d203.result;\n// if (DataManager.Result.equals(\"1\")) {\n// CommentListDetailsActivity.handler.sendEmptyMessage(2);\n// }\n break;\n case 0x204://发表评论\n String jstring204 = (String) response.get();\n DataManager.Root202 jsonRoot204 = gson.fromJson(jstring204, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d204 = jsonRoot204.data;\n DataManager.Result = d204.result;\n if (DataManager.Result.equals(\"success\")) {\n ToCommentActivity.handler.sendEmptyMessage(1);\n } else {\n ToCommentActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x205://回复评论\n String jstring205 = (String) response.get();\n DataManager.Root202 jsonRoot205 = gson.fromJson(jstring205, new TypeToken<DataManager.Root202>() {\n }.getType());\n DataManager.Data202 d205 = jsonRoot205.data;\n DataManager.Result = d205.result;\n if (DataManager.Result.equals(\"success\")) {\n CommentListDetailsActivity.handler.sendEmptyMessage(1);\n } else {\n CommentListDetailsActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x206://我的评价\n jsonString = (String) response.get();\n DataManager.MyComms = gson.fromJson(jsonString, DataManager.MyComm.class);\n MainActivity.handler.sendEmptyMessage(1);\n break;\n case 0x301://提交认领s\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\")) {\n ToClaimActivity.handler.sendEmptyMessage(1);\n } else {\n ToClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x302://提交认领附件\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\")) {\n ToClaimActivity.handler.sendEmptyMessage(2);\n } else {\n ToClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x303://我的认领列表\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n MainActivity.handler.sendEmptyMessage(6);\n break;\n case 0x3031://我的认领列表{副}\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n MyClaimActivity.handler.sendEmptyMessage(2);\n break;\n case 0x304://我的认领详情\n jsonString = (String) response.get();\n DataManager.MyClaimUtilsModel = gson.fromJson(jsonString, DataManager.MyClaimUtils.class);\n// MyClaimActivity.handler.sendEmptyMessage(6);\n break;\n case 0x305://取消认领\n jsonString = (String) response.get();\n DataManager.ClaimUtilsModel = gson.fromJson(jsonString, DataManager.ClaimUtils.class);\n if (DataManager.ClaimUtilsModel.data.result.equals(\"success\") || DataManager.ClaimUtilsModel.data.result.equals(\"fail\")) {\n MyClaimActivity.handler.sendEmptyMessage(1);\n } else {\n MyClaimActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x401://修改个人资料{\"message\":\"Success\",\"status\":\"1\",\"version\":\"v1.0\"}\n jsonString = (String) response.get();\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n if (DataManager.user.message.equals(\"success\")) {\n csp.putUser(DataManager.user);\n UserSetActivity.handler.sendEmptyMessage(1);\n MainActivity.loginImg(csp.getICONSTEAM());\n } else {\n UserSetActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x4011://个人资料字典\n jsonString = (String) response.get();\n DataManager.ZdianS = gson.fromJson(jsonString, DataManager.Zdian.class);\n if (DataManager.ZdianS.data.dictionarie != null && DataManager.ZdianS.data.dictionarie.size() > 0) {\n UserSetActivity.handler.sendEmptyMessage(3);\n }\n break;\n case 0x501://修改密码\n jsonString = (String) response.get();\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n if (DataManager.user.message.equals(\"Success\")) {\n PassWordActivity.handler.sendEmptyMessage(1);\n } else if (DataManager.user.message.equals(\"原始密码错误\")) {\n PassWordActivity.handler.sendEmptyMessage(3);\n } else {\n PassWordActivity.handler.sendEmptyMessage(2);\n }\n\n break;\n case 0x601://二维码名片\n jsonString = (String) response.get();\n DataManager.TwoDimSli = gson.fromJson(jsonString, DataManager.TwoDim.class);\n if (DataManager.TwoDimSli.message.equals(\"success\")) {\n CompanyDetailsActivity.waitDialog.dismiss();\n CompanyDetailsActivity.handler.sendEmptyMessage(25);\n } else {\n CompanyDetailsActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x701://信用报告1\n jsonString = (String) response.get();\n if (jsonString.equals(DataManager.BaseinfoList.get(0).ENTNAME + \".pdf\")) {\n DataManager.ReportText = jsonString;\n ReportActivity.handler.sendEmptyMessage(0);\n } else {\n ReportActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x702://信用报告2\n jsonString = (String) response.get();\n if (jsonString.equals(\"success\")) {\n ReportActivity.handler.sendEmptyMessage(3);\n } else {\n ReportActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x999://登入\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n\n if (!map.get(\"status\").equals(\"1\")) {//登入失败谁动了我的账号,给我站出来\n Toast.show(map.get(\"message\").toString());\n LoginActivity.wd.dismiss();\n } else {//登入成功\n DataManager.user = gson.fromJson(jsonString, DataManager.User.class);\n csp.putUser(DataManager.user);\n csp.putLoginStatus(true);\n Toast.show(\"登录成功\");\n if (csp.getALIASNAME().equals(\"\")) {\n csp.putALIASNAME(\"用户12138\");\n }\n if (!csp.getALIASNAME().equals(\"\")) {\n MainActivity.UserSz.setText(csp.getALIASNAME());\n } else {\n MainActivity.UserSz.setText(csp.getUSERNAME());\n }\n if (!csp.getICONSTEAM().equals(\"\")) {\n MainActivity.loginImg(csp.getICONSTEAM());\n }\n LoginActivity.handler.sendEmptyMessage(0);\n LoginActivity.wd.dismiss();\n }\n break;\n case 0x998://注册\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//注册失败\n RegisterActivity.pd.dismiss();\n Toast.show(\"注册失败\" + map.get(\"message\").toString());\n } else {//注册成功\n\n RegisterActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x997://个人中心获取投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MainActivity.handler.sendEmptyMessage(2);\n\n break;\n case 0x9971://个人中心获取投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(21);\n\n break;\n\n case 0x996://个人中心取消投诉请求\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//取消失败\n MycomplaintsListActivity.pd.dismiss();\n Toast.show(\"取消失败\" + map.get(\"message\").toString());\n } else {//取消成功\n MycomplaintsListActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x995://获取投诉详情\n jsonString = (String) response.get();\n DataManager.complaintDetail = gson.fromJson(jsonString, DataManager.ComplaintDetail.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(3);\n break;\n case 0x994://获取企业投诉列表\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n if (CompanyDetailsActivity.waitDialog != null) {\n CompanyDetailsActivity.waitDialog.dismiss();\n }\n CompanyDetailsActivity.handler.sendEmptyMessage(24);\n break;\n case 0x9941://获取企业投诉列表更多\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n if (CompanyDetailsActivity.waitDialog != null) {\n CompanyDetailsActivity.waitDialog.dismiss();\n }\n MycomplaintsListActivity.handler.sendEmptyMessage(6);\n break;\n\n case 0x993://提交企业投诉\n jsonString = (String) response.get();\n DataManager.toComplain = gson.fromJson(jsonString, DataManager.ToComplain.class);\n /*map=gson.fromJson(jsonString,new TypeToken<Map<String, Object>>() {\n }.getType());*/\n if (!DataManager.toComplain.status.equals(\"1\")) {//返回提交投诉失败\n Toast.show(\"提交投诉失败\" + map.get(\"message\"));\n } else {//成功\n ToComplaintActivity.handler.sendEmptyMessage(1);\n\n }\n break;\n case 0x992://提交投诉附件\n jsonString = (String) response.get();\n map = gson.fromJson(jsonString, new TypeToken<Map<String, Object>>() {\n }.getType());\n if (!map.get(\"status\").equals(\"1\")) {//返回提交投诉失败\n Toast.show(\"提交投诉图片失败\" + map.get(\"message\"));\n } else {//成功\n ToComplaintActivity.handler.sendEmptyMessage(0);\n\n }\n break;\n case 0x991://提交投诉后刷新企业投诉\n jsonString = (String) response.get();\n DataManager.myComplaint = gson.fromJson(jsonString, DataManager.MyComplaint.class);\n MycomplaintsListActivity.handler.sendEmptyMessage(5);\n break;\n case 0x12138://记录24宫格\n jsonString = (String) response.get();\n break;\n case 0x1001://商标查询\n jsonString = (String) response.get();\n DataManager.sb_searchS = gson.fromJson(jsonString, DataManager.sb_search.class);\n if (DataManager.sb_searchS.data.trademark.size() > 0) {\n Main_SearchActivity.handler.sendEmptyMessage(0);\n } else {\n Main_SearchActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x1002://首页专利查询\n jsonString = (String) response.get();\n DataManager.zl_searchS = gson.fromJson(jsonString, DataManager.zl_search.class);\n if (DataManager.zl_searchS.data.patentInfo.size() > 0 && DataManager.zl_searchS.data.patentInfo != null) {\n Main_SearchActivity.handler.sendEmptyMessage(1);\n } else {\n Main_SearchActivity.handler.sendEmptyMessage(500);\n }\n break;\n case 0x1003://首页商标查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.sb_searchS = gson.fromJson(jsonString, DataManager.sb_search.class);\n if (DataManager.sb_searchS.data.trademark.size() > 0) {\n Main_Search_ListActivity.handler.sendEmptyMessage(0);\n }\n break;\n case 0x1004://专利查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.zl_searchS = gson.fromJson(jsonString, DataManager.zl_search.class);\n if (DataManager.zl_searchS.data.patentInfo.size() > 0 && DataManager.zl_searchS.data.patentInfo != null) {\n Main_Search_ListActivity.handler.sendEmptyMessage(1);\n }\n break;\n case 0x1005://失信查询\n jsonString = (String) response.get();\n DataManager.MyDishonestyS = gson.fromJson(jsonString, DataManager.MyDishonesty.class);\n if (DataManager.MyDishonestyS.data.Courtcaseinfo.size() > 0 && DataManager.MyDishonestyS.data.Courtcaseinfo != null) {\n Main_SearchActivity.handler.sendEmptyMessage(2);\n }\n break;\n case 0x1006://失信查询(上下拉事件)\n jsonString = (String) response.get();\n DataManager.MyDishonestyS = gson.fromJson(jsonString, DataManager.MyDishonesty.class);\n if (DataManager.MyDishonestyS.data.Courtcaseinfo.size() > 0 && DataManager.MyDishonestyS.data.Courtcaseinfo != null) {\n Main_Search_ListActivity.handler.sendEmptyMessage(2);\n }\n break;\n default:\n break;\n }\n } catch (NullPointerException e) {\n showdisplay(what);\n Toast.show(\"后台数据空返回!\");\n } catch (IndexOutOfBoundsException e) {\n showdisplay(what);\n Toast.show(\"后台数据结构变更下标越界!\");\n } catch (ClassCastException e) {\n showdisplay(what);\n Toast.show(\"后台数据变更类型转换出错!\");\n } catch (NumberFormatException e) {\n showdisplay(what);\n Toast.show(\"字符串转换为数字异常!\");\n } catch (JsonSyntaxException e) {\n showdisplay(what);\n Toast.show(\"后台数据变更json解析出错!\");\n }\n }", "@Override\n public void onSuccess(Object o) throws NullPointerException {\n if (o != null && String.valueOf(o).length() > 0) {\n try {\n String data = String.valueOf(o);\n if (data != null && data.length() > 0) {\n GoogleMap map = (GoogleMap) getTag();\n setRouteData(data);\n\n JSONObject object = new JSONObject(data);\n String status = object.optString(\"status\");\n if (status.equals(\"OVER_QUERY_LIMIT\")) {\n // attempt += 1;\n // if (attempt == 2) {\n // googleApiKey = Constants.GOOGLE_API_KEY_LIVE2;\n // } else if (attempt == 3) {\n // googleApiKey = Constants.GOOGLE_API_KEY_LIVE3;\n // }\n // data = getDirections(origin, wayPts, destination, attempt, googleApiKey);\n } else {\n// mImgGraph.setVisibility(View.VISIBLE);\n JSONObject jObject = new JSONObject(data);\n PathJSONParser parser = new PathJSONParser();\n List<List<HashMap<String, String>>> routes = parser.parse(jObject, TOM_TOM_API);\n drawRoute(map, routes);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onResponse(String json) {\n parseRefreshResponse(json);\n }", "private void updateTargetProductGeocoding() {\n }", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }" ]
[ "0.7100442", "0.65934557", "0.6489957", "0.6313687", "0.6255934", "0.6127957", "0.61108184", "0.5989835", "0.59479624", "0.59221226", "0.590204", "0.58635575", "0.5862303", "0.5800918", "0.5775706", "0.5745935", "0.571246", "0.56801474", "0.564048", "0.56118226", "0.56114006", "0.55862874", "0.55821383", "0.5569194", "0.556162", "0.5558413", "0.5538477", "0.55378675", "0.55211884", "0.55061144", "0.55022335", "0.5499456", "0.5485368", "0.54792535", "0.54768807", "0.54753464", "0.5473804", "0.5464545", "0.54641384", "0.54577225", "0.54156566", "0.5412116", "0.54071045", "0.54036707", "0.53940374", "0.5387333", "0.5385552", "0.5384799", "0.53838056", "0.5345921", "0.53445005", "0.53433347", "0.534086", "0.5331457", "0.53309447", "0.53259844", "0.53259087", "0.53253484", "0.532404", "0.53223336", "0.53220576", "0.5318259", "0.53173465", "0.531056", "0.5303397", "0.5286495", "0.52777654", "0.527099", "0.52654326", "0.52620876", "0.52512884", "0.5245323", "0.5243561", "0.5241337", "0.52316844", "0.52257377", "0.5225462", "0.5200096", "0.5199873", "0.5198859", "0.51880723", "0.51844215", "0.5165877", "0.51656437", "0.51376903", "0.51375127", "0.51354307", "0.5134349", "0.5131681", "0.5127412", "0.5113928", "0.5110057", "0.5102753", "0.5101372", "0.5096473", "0.50882435", "0.5087799", "0.50769156", "0.5064881", "0.50600404" ]
0.6964703
1
When geofences change, queries database for information about geofences
@Override public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) { super.handleGeofenceChange(currentGeofences); MainActivity mainActivity = (MainActivity) getActivity(); for (int i = 0; i<currentGeofenceMarkers.size(); i++){ boolean removeMarker = true; for(int j =0; j<currentGeofences.size(); j++){ if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){ removeMarker = false; } } if(removeMarker){ currentGeofenceMarkers.get(i).remove(); currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle())); currentGeofenceMarkers.remove(i); } } this.currentGeofences = currentGeofences; if(mainActivity != null && currentGeofences != null) { if (mainActivity.isConnectedToNetwork()) { ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1); for(int i = 0; i<currentGeofences.size(); i++){ if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){ singleGeofence.clear(); singleGeofence.add(currentGeofences.get(i)); geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0); Log.i(logMessages.VOLLEY, "handleGeofenceChange : about to query database : " + singleGeofence.toString()); volleyRequester.request(this, singleGeofence); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n \tString[] ids = (String[])intent.getExtras().get(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_IDS);\n \tint transitionType = intent.getIntExtra(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_TYPE, -1);\n \t\n \tboolean hasRootGeofenceTransition = false;\n \tfor (String id : ids){\n \t\tif (id.equals(ClientSideUtils.RootGeofenceId)){\n \t\t\thasRootGeofenceTransition = true;\n \t\t}\n \t}\n \t\n \t// TODO if both root and sons in ids DO SOMETHING\n \t\n \tif (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Entered: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmSonGeofencesList = new ArrayList<Geofence>();\n \t\t\tfor (LotGeofence lotGeofence : mLotsDb.mSonLotGeofencesList){\n \t\t\tmSonGeofencesList.add(lotGeofence.toGeofenceObject());\n \t\t\tmCurrentGeofenceList.add(lotGeofence.toGeofenceObject());\n \t\t\t}\n\t\t \tmGeofenceRequestType = ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD;\n\t\t try{\n\t\t \t\tmGeofenceRequester.addGeofences(mSonGeofencesList);\n\t\t \t} catch(UnsupportedOperationException e){\n\t\t \t\tLog.d(ClientSideUtils.APPTAG, \"In progress on adding geofences again\");\n\t\t \t}\n\t\t if (!MOCKUP_MODE){\n\t\t \tstartActivityRecognition();// <----- Starting Activity Recognition Here\n\t\t }\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\tenteredParkingLot(id);\n \t\t\t}\n \t\t}\n\n \t}else if (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Exited: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmGeofenceRemoveType = ClientSideUtils.GEOFENCE_REMOVE_TYPE.LIST;\n \t\t\tremoveCurrentGeofecesByID(mSonGeofencesList);\n \t\t\t\n \t\t\tmCurrentGeofenceList = new ArrayList<Geofence>();\n \t\t\tmCurrentGeofenceList.add(mLotsDb.mRootLotGeofence.toGeofenceObject());\n \t\t\t\n \t\t\tstopActivityRecognition(); // <----- Stopping Activity Recognition Here\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\texitedParkingLot(id);\n \t\t\t}\n \t\t}\n \t}else{\n \t\tLog.e(ClientSideUtils.APPTAG, \"Entered Geofence action handling, the type was not ENTERED nor EXITED\");\n \t}\n }", "public void getNearbyPlaces(double Lat, double Long)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n final DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n final GeoFire geoFire= new GeoFire(placeRef);\n\n double R=0.05;\n placesQuery = geoFire.queryAtLocation(new GeoLocation(Lat,Long),R);\n placesQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n double R=1.0;\n int count=0;\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n try {\n Toast.makeText(getContext(), key+\"added\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n count++;\n }\n\n @Override\n public void onKeyExited(String key) {\n\n try {\n Toast.makeText(getContext(), key+\"removed\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n\n count--;\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n placesQuery.removeAllListeners();\n\n /* if (count < 2 && R < 25) {\n R += 1;\n placesQuery.setRadius(R);\n try {\n Toast.makeText(getContext(),Double.toString(R),Toast.LENGTH_SHORT).show();\n }\n catch (Exception e)\n {\n\n }\n } else if (count > 20) {\n\n R-=1;\n placesQuery.setRadius(R);\n\n }\n */\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public void registerGeofences(List<LBAction> actions){\n for(LBAction act:actions){\n registerGeofence(act);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "@Override\n public ArrayList<GeoDataRecordObj> getAllGeoData() {\n if(allGeoData == null) {\n this.reloadData();\n }\n return allGeoData;\n }", "private List<String> getGeofenceTransitionDetails(List<Geofence> triggeringGeofences) {\n List<String> geofenceRequestIds = new ArrayList<>();\n // Return the request ids of the triggered geofences\n for (Geofence geofence : triggeringGeofences) {\n geofenceRequestIds.add(geofence.getRequestId());\n }\n return geofenceRequestIds;\n }", "private void fetchCafes(){\n DatabaseReference cafeRef = Singleton.get(mainActivity).getDatabase()\n .child(\"cafes\");\n\n // Add Listener when info is recieved or changed\n cafeRef.addValueEventListener(new ValueEventListener() {\n\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, MyLatLng> latLngList = new HashMap<>();\n ArrayList<Cafe> cafes = new ArrayList<>();\n for (DataSnapshot locationSnapshot : dataSnapshot.getChildren()) {\n\n\n MyLatLng latLng = locationSnapshot.getValue(MyLatLng.class);\n Cafe cafe = locationSnapshot.getValue(Cafe.class);\n cafes.add(cafe);\n\n latLngList.put(locationSnapshot.getKey(), latLng);\n\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(cafe.getLatitude(), cafe.getLongitude())).title(cafe.getName()));\n marker.setTag(cafe.getId());\n marker.showInfoWindow();\n markers.add(marker);\n\n }\n setOnSearchInputChanged(cafes);\n //listener.onLoadLocationSuccess(latLngList);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "@Override\n public void onResume() {\n super.onResume();\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity.isConnectedToNetwork()) {\n setUpMapIfNeeded();\n }\n if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) {\n //starts the mainActivity monitoring geofences\n mainActivity.getGeofenceMonitor().startGeofenceMonitoring();\n isMonitoringGeofences = true;\n }\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n if(needToCallUpdateGeofences) {\n updateGeofences();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "private void getEventMembers()\n {\n String membersDatabaseAddress = \"Loc/\"+mEntityID;\n double lat=gl_lat;\n double lon=gl_long;\n\n DatabaseReference reference = database.getReference(membersDatabaseAddress);\n\n GeoFire geoFire= new GeoFire(reference);\n\n\n\n eventmembersQuery = geoFire.queryAtLocation(new GeoLocation(lat,lon),radius);\n\n eventmembersQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n int count=0;\n\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n\n if(!key.equals(mUserID)) {\n\n if (!mMarkersMap.containsKey(key)) {\n //Member is present\n\n\n //New key\n String name = key;\n if (allContactNames.containsKey(name))\n name = allContactNames.get(name);\n\n LatLng memberLatLng = new LatLng(location.latitude, location.longitude);\n mMarkersMap.put(key,\n mMap.addMarker(new MarkerOptions().position(memberLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))\n ));\n\n } else {\n //Present before,Present now\n mMarkersMap.get(key).setPosition(new LatLng(\n location.latitude,location.longitude\n ));\n }\n\n memberPresentFlags.put(key, true);\n if (membersProfilePic != null && membersProfilePic.containsKey(key)) {\n\n mMarkersMap.get(key).setIcon(BitmapDescriptorFactory.fromBitmap(\n membersProfilePic.get(key)\n ));\n mMarkersMap.get(key).setAnchor(0.5f,0.5f);\n }\n\n count++;\n }\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n if(count<10)\n {\n if(radius<2)\n radius+=0.1;\n }\n else if(count>15)\n {\n if(radius>0.1)\n radius-=0.1;\n }\n eventmembersQuery.removeAllListeners();\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "private String getGeofenceTransitionDetails(\n int geofenceTransition,\n List<Geofence> triggeringGeofences) {\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n // Get the Ids of each geofence that was triggered.\n ArrayList<String> triggeringGeofencesIdsList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesIdsList.add(geofence.getRequestId());\n }\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofencesIdsList);\n Log.i(\"logos\",\"jnj\");\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }", "public void saveFenceInSqliteDB(String name, String address, String city, String province, Double lat, Double lng, String range, String number, String textSMS, int event) {\n boolean active = true; // default whan you add a geofence is active\n boolean match = false; // default whan you add a geofence is not in fence\n\n int id = Controller.insertFenceOnSQLiteDB(name, address, city, province, lat + \"\", lng + \"\", range, 1, number, textSMS, event);\n Fence f = new Fence(id, name, address, city, province, lat, lng, Float.parseFloat(range), active, match, number, textSMS, event);\n Controller.fences.add(f);\n Toast.makeText(this.getContext(), \"Added the fence: \" + f.getName() + \"!\", Toast.LENGTH_LONG).show();\n }", "@Test\n\tpublic void listLocations(){\n\t\tList<Location> lists = locationService.queryLoctionsByLat(29.8679775, 121.5450105);\n\t\t//System.out.println(lists.size()) ;\n\t\tfor(Location loc : lists){\n\t\t\tSystem.out.println(loc.getAddress_cn());\n\t\t}\n\t}", "@SuppressWarnings({\"unchecked\"})\n private void loadDataFromOSM() {\n try {\n System.out.println(\">> Attempting to load data from OSM database...\");\n // Load JDBC driver and establish connection\n Class.forName(\"org.postgresql.Driver\");\n String url = \"jdbc:postgresql://localhost:5432/osm_austria\";\n mConn = DriverManager.getConnection(url, \"geo\", \"geo\");\n // Add geometry types to the connection\n PGConnection c = (PGConnection) mConn;\n c.addDataType(\"geometry\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGgeometry\"));\n c.addDataType(\"box2d\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGbox2d\"));\n\n // Create statement and execute query\n Statement s = mConn.createStatement();\n\n // Get boundary types\n String query = \"SELECT * FROM boundary_area AS a WHERE a.type IN (8001,8002,8003,8004);\";\n executeSQL(query, s);\n\n query = \"SELECT * FROM landuse_area AS a WHERE a.type IN (5001, 5002);\";\n executeSQL(query, s);\n\n /* // Get landuse types\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n\n // Get natural types\n query = \"SELECT * FROM natural_area AS a WHERE a.type IN (6001, 6002, 6005);\";\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n */\n\n s.close();\n mConn.close();\n } catch (Exception _e) {\n System.out.println(\">> Loading data failed!\\n\" + _e.toString());\n }\n\n }", "public void getProvinceList() {\n Log.i(TAG, \"getProvinceList\");\n this.mCityShowMode = false;\n if (this.mCityCursor != null) {\n this.mCityCursor.close();\n this.mCityCursor = null;\n }\n if (this.mCityRedMan != null) {\n this.mCityCursor = this.mCityRedMan.queryProvinceRec();\n if (this.mCityCursor != null) {\n Log.i(TAG, \"mCityCursor count = \" + this.mCityCursor.getCount());\n } else {\n Log.i(TAG, \"mCityCursor count = null\");\n }\n }\n }", "public void registerGeofences(List<LBAction> actions, GoogleApiClient gac){\n for(LBAction act:actions){\n registerGeofence(act, gac);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "void countries_init() throws SQLException {\r\n countries = DatabaseQuerySF.get_all_stations();\r\n }", "@Override\n public List<Location> getAll() {\n\n List<Location> locations = new ArrayList<>();\n \n Query query = new Query(\"Location\");\n PreparedQuery results = ds.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n double lat = (double) entity.getProperty(\"lat\");\n double lng = (double) entity.getProperty(\"lng\");\n String title = (String) entity.getProperty(\"title\");\n String note = (String) entity.getProperty(\"note\");\n int voteCount = ((Long) entity.getProperty(\"voteCount\")).intValue();\n String keyString = KeyFactory.keyToString(entity.getKey()); \n // TODO: Handle situation when one of these properties is missing\n\n Location location = new Location(title, lat, lng, note, voteCount, keyString);\n locations.add(location);\n }\n return locations;\n }", "void fetchCountryInformation();", "public Cursor getAllLocations(){\n if (mDB != null)\n return mDB.query(DATABASE_TABLE, new String[] { FIELD_ROW_ID, FIELD_LAT , FIELD_LNG, FIELD_ACC, FIELD_TIME } , null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "private GeofencingRequest getAddGeofencingRequest() {\n List<Geofence> geofencesToAdd = new ArrayList<>();\n geofencesToAdd.add(geofenceToAdd);\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_EXIT)\n .addGeofences(geofencesToAdd);\n return builder.build();\n\n }", "private void updateTargetProductGeocoding() {\n }", "public void calculateDistance() {\n\t\tdouble lon = coordinates.getLongitude(); // your longitude\n\t\tdouble lat = coordinates.getLatitude(); // your latitude\n\n\t\tString distanceQueryString = \"SELECT loc, \"\n\t\t\t\t+ \"(:earthRadius * FUNC('acos', FUNC('cos', FUNC('radians', :latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.longitude) - FUNC('radians', :longitude)) + \"\n\t\t\t\t+ \"FUNC('sin', FUNC('radians', :latitude)) * FUNC('sin', FUNC('radians', loc.latitude)) ) ) AS distance \"\n\t\t\t\t+ \"FROM Location loc \"\n\t\t\t\t+ \"WHERE ((:earthRadius * FUNC('acos', FUNC('cos', FUNC('radians', :latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.latitude)) * \"\n\t\t\t\t+ \"FUNC('cos', FUNC('radians', loc.longitude) - FUNC('radians', :longitude)) + \"\n\t\t\t\t+ \"FUNC('sin', FUNC('radians', :latitude)) * FUNC('sin', FUNC('radians', loc.latitude)) ) )<= :searchRadius) \"\n\t\t\t\t+ \"ORDER BY distance\";\n\n\t\tQuery query = entityManager.createQuery(distanceQueryString);\n\t\tquery.setParameter(\"latitude\", lat);\n\t\tquery.setParameter(\"longitude\", lon);\n\t\tquery.setParameter(\"searchRadius\", searchRadius);\n\t\tquery.setParameter(\"earthRadius\", EARTH_RADIUS);\n\t\tquery.setMaxResults(limit);\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object[]> rows = query.getResultList();\n\t\tList<Location> sortedLocations = new ArrayList<>(rows.size());\n\t\tfor (Object[] row : rows) {\n\t\t\tsortedLocations.add((Location) row[0]);\n\t\t}\n\n\t\tCity city;\n\t\tMap<City, Double> unsortedMap = new HashMap<>();\n\n\t\tfor (Location entity : sortedLocations) {\n\t\t\tcity = entity.getCity();\n\t\t\tdouble distance = getDistanceFromBounds(new Coordinates(lat, lon), city.getBounds());\n\t\t\tunsortedMap.put(city, distance);\n\t\t}\n\n\t\tMap<City, Double> sortedMap = unsortedMap.entrySet().stream().sorted(Entry.comparingByValue())\n\t\t\t\t.collect(Collectors.toMap(Entry::getKey, Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\n\n\t\tfor (Map.Entry<City, Double> entry : sortedMap.entrySet()) {\n\t\t\tif (entry.getValue() == 0.0) {\n\t\t\t\tSystem.out.println(\"Point is inside the bounds of \" + entry.getKey().getName() + \"(\"\n\t\t\t\t\t\t+ entry.getKey().getCountry() + \")\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.out.printf(\"%.4f\", entry.getValue());\n\t\t\t\tSystem.out.println(\" km. - \" + entry.getKey().getName() + \"(\" + entry.getKey().getCountry() + \")\");\n\t\t\t}\n\t\t}\n\t}", "private String getGeofenceTransitionDetails(\n Context context,\n int geofenceTransition,\n List<Geofence> triggeringGeofences){\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n ArrayList triggeringGeofecesIdList = new ArrayList();\n\n for (Geofence geofence : triggeringGeofences){\n triggeringGeofecesIdList.add(geofence.getRequestId());\n }\n\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofecesIdList);\n\n Log.v(LOG_TAG, geofenceTransitionString + \": \" + triggeringGeofencesIdsString);\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }", "public static ArrayList<Location> GetAllLocations(){\n \n ArrayList<Location> Locations = new ArrayList<>();\n try ( \n Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM location\")){\n \n while(resultSet.next())\n {\n Location location = new Location();\n location.setCity(resultSet.getString(\"City\"));\n location.setCity(resultSet.getString(\"AirportCode\"));\n Locations.add(location);\n }\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n return Locations;\n }", "public void updateFenceInSqliteDB(String name, String address, String city, String province, Double lat, Double lng, String range, String number, String textSMS, int event) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n\n fence.setName(name);\n fence.setAddress(address);\n fence.setCity(city);\n fence.setProvince(province);\n fence.setRange(Float.parseFloat(range));\n fence.setLat(lat);\n fence.setLng(lng);\n fence.setNumber(number);\n fence.setTextSMS(textSMS);\n fence.setEvent(event);\n\n Controller.updateAllAttributeOnSQLiteDB(fence.getId(), name, address, city, province, lat + \"\", lng + \"\", range, number, textSMS, event);\n\n Toast.makeText(this.getContext(), \"Updated the fence: \" + Controller.fences.get(positionFenceToUpdateinController).getName() + \"!\", Toast.LENGTH_LONG).show();\n }", "public List<FavoriteLocation> queryAllLocations() {\n\t\tArrayList<FavoriteLocation> fls = new ArrayList<FavoriteLocation>(); \n\t\tCursor c = queryTheCursorLocation(); \n\t\twhile(c.moveToNext()){\n\t\t\tFavoriteLocation fl = new FavoriteLocation();\n\t\t\tfl._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tfl.description = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_DES));\n\t\t\tfl.latitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LAT));\n\t\t\tfl.longitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LON));\n\t\t\tfl.street_info = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_STREET));\n\t\t\tfl.type = c.getInt(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_CATEGORY));\n\t\t\tbyte[] image_byte = c.getBlob(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_PIC)); \n\t\t\tfl.image = BitmapArrayConverter.convertByteArrayToBitmap(image_byte);\n\t\t\tfl.title = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_TITLE));\n\t\t\tfls.add(fl);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn fls;\n\t}", "public Cursor getAllLocationsLoc(){\n if (mDB != null)\n return mDB.query(LOCNODE_TABLE, new String[] { FIELD_ROW_ID, FIELD_NAME, FIELD_ADDY, FIELD_LAT , FIELD_LNG, FIELD_TIMESVISITED }, null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "public Cursor getAllLocations()\n\t{\n\t\treturn db.query(DATABASE_TABLE, new String[] {\n\t\t\t\tKEY_DATE,KEY_LAT,KEY_LNG},\n\t\t\t\tnull,null,null,null,null);\n\t}", "private PendingIntent getGeofencePendingIntent() {\n if (mGeofencePendingIntent != null) {\r\n return mGeofencePendingIntent;\r\n }\r\n Intent intent = new Intent(this, GeofenceBroadcastReceiver.class);\r\n\r\n // addGeofences() and removeGeofences().\r\n mGeofencePendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n return mGeofencePendingIntent;\r\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "String getEdgesAtNewLocation(Integer pointId, Double lat, Double lng);", "private void retrieveListings(GoogleMap googleMap) {\n Projection projection = googleMap.getProjection();\n VisibleRegion visibleRegion = projection.getVisibleRegion();\n LatLng sw = visibleRegion.latLngBounds.southwest;\n LatLng ne = visibleRegion.latLngBounds.northeast;\n double left = sw.longitude;\n double bottom = sw.latitude;\n double right = ne.longitude;\n double top = ne.latitude;\n\n // Find listings on the visible region of the map\n queryListings(left, right, top, bottom);\n }", "Geq createGeq();", "public void getSectorsDataFromFirebase () {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Home\").child(\"specialties\");\n ref.addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Get map of sectors in datasnapshot\n getSectorsDataFromMap((Map<String,Object>) dataSnapshot.getValue());\n sectorsAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //handle databaseError\n }\n });\n ref.keepSynced(true);\n\n\n }", "@Override\n public List<Map<String, Object>> tareasOrdenadasPorDistancia(long id_emergencia){\n try(Connection conn = sql2o.open()){\n List<Emergencia> emergencia = conn.createQuery(\"SELECT ST_X(ST_AsText(ubicacion)) AS longitud, ST_Y(ST_AsText(ubicacion)) AS latitud FROM emergencia WHERE id = :id_eme\")\n .addParameter(\"id_eme\", id_emergencia)\n .executeAndFetch(Emergencia.class);\n String punto = \"POINT(\" + emergencia.get(0).getLongitud() + \" \" + emergencia.get(0).getLatitud() + \")\";\n return conn.createQuery(\"SELECT id, nombre, ST_X(ST_AsText(ubicacion)) AS longitud, ST_Y(ST_AsText(ubicacion)) AS latitud, ST_Distance(ST_GeomFromText(:tar_punto, 4326), ubicacion::geography) AS distancia FROM tarea WHERE id_emergencia = :id_eme ORDER BY distancia ASC\")\n .addParameter(\"tar_punto\", punto)\n .addParameter(\"id_eme\", id_emergencia)\n .executeAndFetchTable()\n .asList();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return null;\n }\n }", "Collection<L> getLocations ();", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "private void getClostestWalkerAvailable(){\n DatabaseReference walkerLocation = FirebaseDatabase.getInstance().getReference().child(\"walkersAvailable\");\n\n GeoFire geofire = new GeoFire(walkerLocation);\n geoQuery = geofire.queryAtLocation(new GeoLocation(pickupLocation.latitude, pickupLocation.longitude), radius);\n geoQuery.removeAllListeners();\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n //if walker found within radius, this method is called,\n // key is walkers's key in db and location is their location using long and lat\n public void onKeyEntered(String key, GeoLocation location) {\n if(!walkerFound && reqBoolean){\n walkerFound = true;\n walkerFoundID = key;\n\n //if walker was found within the radius their userID will be stored in the DB.\n // This lets us keep track of available walkers and working walkers.\n DatabaseReference walkerRef = FirebaseDatabase.getInstance().getReference()\n .child(\"users\").child(\"walkers\").child(walkerFoundID).child(\"ownerRequest\");\n String ownerID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n HashMap map = new HashMap();\n //updates the DB\n map.put(\"ownerWalkID\", ownerID);\n map.put(\"destination\", destination);\n map.put(\"destinationLat\", destinationLatLng.latitude);\n map.put(\"destinationLng\", destinationLatLng.longitude);\n\n walkerRef.updateChildren(map);\n DatabaseReference ownerRef = FirebaseDatabase.getInstance()\n .getReference().child(\"users\").child(\"owners\").child(ownerID);\n HashMap map2 = new HashMap();\n\n //updates the DB\n map2.put(\"notifications\", \"Walker found!\");\n\n\n ownerRef.updateChildren(map2);\n\n\n\n\n getWalkerLocation();\n getWalkerInfo();\n getHasRideEnded();\n statusButtonText.setText(\"Finding a walker...\");\n reqWalkerButton.setText(\"Cancel\");\n }\n\n\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n //if walker not found within radius, radius goes up by 1 and method is called again to check for walker with the new radius\n public void onGeoQueryReady() {\n if(!walkerFound){\n if(radius <= 20) {\n radius++;\n getClostestWalkerAvailable();\n } else {\n\n Toast.makeText(OwnerMapActivity.this, \"No walkers found...Please try again\", Toast.LENGTH_LONG).show();\n statusButtonText.setText(\"Type the name of your locak park below\");\n if (pickupLocationMarker != null) {\n pickupLocationMarker.remove();\n }\n reqWalkerButton.setText(\"Request walker\");\n reqBoolean = false;\n radius = 1;\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"ownerRequest\");\n GeoFire geoFire = new GeoFire(ref);\n geoFire.removeLocation(userId);\n }\n\n }\n\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n }", "@Override\n\tprotected Cursor loadCursor() {\n\t\treturn DataManager.get().queryLocations();\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n final String email = getIntent().getStringExtra(Constant.PROFILE_EMAIL);\n\n /**\n * Setup an observable to handle the results of the search\n * query.\n *\n * If a charity was found with the extracted email, attempt to\n * convert their address to a specific latitude and longitude. */\n final MultiObservable<String> charityAddress = new MultiObservable<>();\n charityAddress.addObserver(new Observer() {\n @Override\n public void update(Observable o, Object arg) {\n getLocationFromAddress(getApplicationContext(), (String) arg);\n }\n });\n\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.collection(\"users\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n int count = 0;\n for (QueryDocumentSnapshot doc : task.getResult()) {\n if (\n doc.get(\"type\").equals(\"charity\")\n && doc.get(\"email\").equals(email)\n ) {\n String address = String.format(\n \"%s, %s, %s\",\n doc.get(\"address\"), doc.get(\"state\"),\n doc.get(\"postcode\")\n );\n charityAddress.setValue(address);\n\n Log.d(TAG, \"Found charity with email: \" + email);\n Log.d(TAG, \"Charity address: \" + address);\n } else if (++count == task.getResult().size()) {\n Log.d(TAG, \"Failed to find charity with email: \" + email);\n }\n }\n } else {\n Log.w(\n TAG, \"Error getting documents.\",\n task.getException());\n }\n }\n });\n }", "public ArrayList<City> getRegionCapital()\n {\n try\n {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n // ALl the capital cities in the WORLD organised by largest population to smallest\n String strSelect =\n \"SELECT city.Name, country.Name AS 'CountryName', city.Population, country.Region \"\n + \"FROM country JOIN city \"\n + \"ON country.Code = city.CountryCode \"\n + \"WHERE country.Capital = city.ID \"\n + \" ORDER BY country.Region, city.Population DESC \";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new capital city if valid.\n // Check one is returned\n ArrayList<City> capCity = new ArrayList<City>();\n System.out.println(\"19. All the capital cities in a REGION organised by largest to smallest.\");\n System.out.println(\"Region | Name | Country | Population\");\n while (rset.next())\n {\n City cCty = new City();\n cCty.Name = rset.getString(\"Name\");\n cCty.Population = rset.getInt(\"Population\");\n Country cCountry = new Country();\n cCountry.Name = rset.getString(\"CountryName\");\n cCountry.Region = rset.getString(\"Region\");\n System.out.println(cCountry.Region + \" | \" + cCty.Name + \" | \" + cCountry.Name +\" | \" + cCty.Population );\n\n capCity.add(cCty);\n }\n System.out.println(\"\\n\");\n return capCity;\n }\n catch (Exception e)\n {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"19. Failed to get capital city details by region\");\n return null;\n }\n\n }", "@Override\r\n\tpublic List<HashMap<String, String>> getGeunTaeList(HashMap<String, String> params) {\n\t\treturn sqlsession.selectList(\"GeuntaeMgnt.getGeunTaeList\",params);\r\n\t}", "private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_GAME_LCOATION_COLUMN);\n\t\t\tString isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);\n\n\t\t\tGAME_LIST.add(new gameLocation(ID, Description,\n\t\t\t\t\tisUsed(isGameVisited)));\n\t\t\t\n\t\t\tLog.d(TAG, \"game ID : \"+ ID);\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "@Override\r\n public void onScrubGeo(long arg0, long arg1) {\n\r\n }", "@Override\r\n public void onScrubGeo(long arg0, long arg1) {\n\r\n }", "private void loadCorrespondingFlats(String prop) {\n Firebase flatRef = new Firebase(getResources().getString(R.string.flats_location));\n Query flatsOfPropertyQuery = flatRef.orderByChild(\"addressLine1\").equalTo(prop);\n flatsOfPropertyQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n flatList.clear();\n flatNums.clear();\n for (DataSnapshot childSnapShot : dataSnapshot.getChildren()) {\n Flat flt = childSnapShot.getValue(Flat.class);\n flatList.add(flt);\n flatNums.add(flt.getFlatNum());\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }", "@Nullable\n private String getLyricFromGeofence(String details) throws IOException {\n String geoID = details.substring(24);\n\n if ((mLyricsLines.size() == 0) || mLyricsLines == null) {\n Log.d(TAG, \"mLyricsLines is empty\");\n new MapFragment.GetLyrics().execute(mLyricsDocumentString);\n } else {\n\n if (geoID.length() < 7) { // avoid SERVICE_VERSION_UPDATE_REQUIRED\n // ie. when leaving fence\n\n int lineNum = Integer.parseInt(geoID.split(\":\")[0]);\n int wordNum = Integer.parseInt(geoID.split(\":\")[1]);\n\n // get line lyric is in\n String lyric;\n if (mLyricsLines.size() < (lineNum - 1)) {\n String line = mLyricsLines.get(lineNum - 1);\n\n // get lyric\n if (lineNum >= 10) {\n // get lyric from line\n int index = 4 + wordNum;\n if (line.length() < index) {\n lyric = line.split(\" |\t\")[index];\n } else {\n //\n Log.d(TAG, \"Index for array of lyrics is out of bounds\");\n lyric = null;\n }\n } else {\n // get lyric from line\n int index = 5 + wordNum;\n if (line.length() > index | line.contains(\"\\t\")) {\n lyric = line.split(\" |\t\")[index];\n } else {\n Log.d(TAG, \"Index for array of lyrics is out of bounds\");\n lyric = null;\n }\n }\n } else {\n lyric = null;\n }\n\n if (lyric != null) {\n // Remove non-alphanumeric characters\n lyric = lyric.replaceAll(\"[^a-zA-Z0-9]\", \"\");\n\n // Send to fridge\n if (lineNum < mLyricsLines.size() / 3) {\n // Send to yellow\n LyricsSingleton.get(getActivity()).addYellowLyric(lyric, geoID);\n } else {\n if (lineNum < 2 * (mLyricsLines.size() / 3)) {\n // Send to red\n LyricsSingleton.get(getActivity()).addRedLyric(lyric, geoID);\n } else {\n // Send to blue\n LyricsSingleton.get(getActivity()).addBlueLyric(lyric, geoID);\n }\n }\n\n return lyric;\n }\n }\n }\n return null;\n }", "public void initArrayList()\n {\n\tSQLiteDatabase db = getWritableDatabase();\n\tCursor cursor = db.rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n\n\tif (cursor.moveToFirst())\n\t{\n\t do\n\t {\n\t\tJacocDBLocation newLocation = new JacocDBLocation();\n\t\tnewLocation.setLocationName(cursor.getString(1));\n\t\tnewLocation.setRealLocation(new LocationBorder(new LatLng(cursor.getDouble(2), cursor.getDouble(3)), new LatLng(cursor.getDouble(4), cursor.getDouble(5))));\n\t\tnewLocation.setMapLocation(new LocationBorder(new LatLng(cursor.getInt(6), cursor.getInt(7)), new LatLng(cursor.getInt(8), cursor.getInt(9))));\n\t\tnewLocation.setHighSpectrumRange(cursor.getDouble(10));\n\t\tnewLocation.setLowSpectrumRange(cursor.getDouble(11));\n\n\t\t// adding the new Location to the collection\n\t\tlocationList.add(newLocation);\n\t }\n\t while (cursor.moveToNext()); // move to the next row in the DB\n\n\t}\n\tcursor.close();\n\tdb.close();\n }", "public void iterateMainEntity(Entity e, OsmDbAccessorContext ctx) throws SQLException {\n \t\tif (e instanceof Way && e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null ){\n \t\t\tBuildingInterpolation type = null;\n \t\t\tint interpolationInterval = 0;\n \t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\ttry {\n \t\t\t\t\ttype = BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase());\n \t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tinterpolationInterval = Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION));\n \t\t\t\t\t} catch(NumberFormatException ex2) {\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (type != null && interpolationInterval > 0) {\n \t\t\t\tList<Node> nodesWithHno = new ArrayList<Node>();\n \t\t\t\tfor (Node n : ((Way) e).getNodes()) {\n \t\t\t\t\tif (n.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && n.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\t\t\t\tnodesWithHno.add(n);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (nodesWithHno.size() > 1) {\n \t\t\t\t\tfor (int i = 1; i < nodesWithHno.size(); i++) {\n \t\t\t\t\t\tNode first = nodesWithHno.get(i - 1);\n \t\t\t\t\t\tNode second = nodesWithHno.get(i);\n \t\t\t\t\t\tboolean exist = streetDAO.findBuilding(first);\n \t\t\t\t\t\tif (exist) {\n \t\t\t\t\t\t\tstreetDAO.removeBuilding(first);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\t\t\tSet<Long> idsOfStreet = getStreetInCity(first.getIsInNames(), first.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\t\t\tBuilding building = new Building(first);\n \t\t\t\t\t\t\tbuilding.setInterpolationInterval(interpolationInterval);\n \t\t\t\t\t\t\tbuilding.setInterpolationType(type);\n \t\t\t\t\t\t\tbuilding.setName(first.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setName2(second.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setLatLon2(second.getLatLon());\n \t\t\t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\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\tif (e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && e.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\tboolean exist = streetDAO.findBuilding(e);\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tBuilding building = new Building(e);\n \t\t\t\t\tString hno = e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER);\n \t\t\t\t\tint i = hno.indexOf('-');\n \t\t\t\t\tif(i != -1) {\n \t\t\t\t\t\tbuilding.setInterpolationInterval(1);\n \t\t\t\t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\tbuilding.setInterpolationType(BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase()));\n \t\t\t\t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\tbuilding.setInterpolationInterval(Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION)));\n \t\t\t\t\t\t\t\t} catch(NumberFormatException ex2) {\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\tbuilding.setName(hno.substring(0, i));\n \t\t\t\t\t\tbuilding.setName2(hno.substring(i + 1));\n \t\t\t\t\t} else {\n \t\t\t\t\t\tbuilding.setName(hno);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (e instanceof Way /* && OSMSettings.wayForCar(e.getTag(OSMTagKey.HIGHWAY)) */\n \t\t\t\t&& e.getTag(OSMTagKey.HIGHWAY) != null && e.getTag(OSMTagKey.NAME) != null) {\n \t\t\t// suppose that streets with names are ways for car\n \t\t\t// Ignore all ways that have house numbers and highway type\n \t\t\t\n \t\t\t// if we saved address ways we could checked that we registered before\n \t\t\tboolean exist = streetDAO.findStreetNode(e);\n \n \n \n \t\t\t// check that street way is not registered already\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.NAME), e.getTag(OSMTagKey.NAME_EN), l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tstreetDAO.writeStreetWayNodes(idsOfStreet, (Way) e);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (e instanceof Relation) {\n \t\t\tif (e.getTag(OSMTagKey.POSTAL_CODE) != null) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tpostalCodeRelations.add((Relation) e);\n \t\t\t}\n \t\t}\n \t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n databaseReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n trackingLocationsList.clear();\n Iterable<DataSnapshot> tracks = dataSnapshot.child(id).getChildren();\n for (DataSnapshot info : tracks) {\n LatLong latLong = info.getValue(LatLong.class);\n trackingLocationsList.add(latLong);\n }\n int i=0;\n LatLng previous,next = null;\n for(LatLong value : trackingLocationsList){\n if(i==0){\n previous = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(previous).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(previous));\n }\n else{\n previous=next;\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(next).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(next));\n }\n mMap.addPolyline(new PolylineOptions()\n .add(previous,next)\n .width(5)\n .color(Color.RED));\n }\n }\n\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n\n\n T.t(TripMapsActivity.this, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private PendingIntent getGeofencePendingIntent () {\n\n Intent intent = new Intent(this, GeofenceReceiver.class);\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when\n // calling addGeofences() and removeGeofences().\n return PendingIntent.getService(this, 0, intent, PendingIntent.\n FLAG_UPDATE_CURRENT);\n }", "@Override\n\tpublic void queryPoints() {\n\n\t}", "private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }", "public FeatureCursor queryFeatures(GeometryEnvelope envelope) {\n return featureDao.queryIn(queryIdsSQL(envelope));\n }", "private void addGeoData(String key, double lat, double lon)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n GeoFire geoFire= new GeoFire(placeRef);\n geoFire.setLocation(key,new GeoLocation(lat,lon));\n\n }", "@Override\n\tpublic List<DisplayResult> getResults(ReferencedEnvelope bounds) {\n\t\t\n\t\tString whereClause = bounds != null ? \"WHERE ST_Transform(geom, 4326) && ST_MakeEnvelope(\"+bounds.getMinX()+\",\"+bounds.getMinY()+\",\"+bounds.getMaxX()+\",\"+bounds.getMaxY()+\") \" : \"\";\n\t\t\n\t\t//Only latest results\n\t\tString query = \"SELECT DISTINCT ON (meshblock_id) id, meshblock_id, operat_score, date_entered, ST_AsText(ST_Transform(centroid,4326)), ST_AsText(ST_Transform(geom,4326)), \"\n\t\t\t\t+ \"natural_elements_score, incivilities_and_nuisance_score, navigation_and_mobility_score, territorial_score \"\n\t\t\t\t+ \"FROM result \"\n\t\t\t\t+ whereClause\n\t\t\t\t+ \"ORDER BY meshblock_id, date_entered DESC;\";\n\n\t\tSystem.out.println(query);\n\t GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n\t WKTReader reader = new WKTReader(geometryFactory);\n\t \n\t\tRowMapper<DisplayResult> rowMapper = (rs, rowNum) -> {\n\t\t\t\n\t\t\tDisplayResult result = new DisplayResult();\n\t\t\tresult.setResultId(rs.getInt(1));\n\t\t\tresult.setMeshblockId(rs.getInt(2));\n\t\t\tresult.setOperatScore(rs.getDouble(3));\n\t\t\t\t\n\t\t\tresult.setNaturalElementsScore(rs.getDouble(7));\n\t\t\tresult.setIncivilitiesScore(rs.getDouble(8));\n\t\t\tresult.setNavigationScore(rs.getDouble(9));\n\t\t\tresult.setTerritorialScore(rs.getDouble(10));\n\t\t\tPoint point;\n\t\t\ttry {\n\t\t\t\tpoint = (Point) reader.read(rs.getString(5));\n\t\t\t\tresult.setCentroid(point.toString());\n\t\t\t\tresult.setLat(point.getCoordinate().y);\n\t\t\t\tresult.setLng(point.getCoordinate().x);\n\t\t\t\t\t\n\t\t\t\tresult.setGeom(rs.getString(6));\n\t\t\t\t\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\treturn jdbcTemplate.query(query, rowMapper);\n\t\t\n\t}", "public void onScrubGeo(long arg0, long arg1) { }", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void handleResult(GeofenceInfoObject result) {\n super.handleResult(result);\n\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n if(this.isResumed()) {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity != null) {\n final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info);\n final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n if(result == null){\n if(currentGeofences != null){\n if(currentGeofences.size() != 0){\n //If the result is null and it shouldn't be, displays error and allows user to request\n //information again\n btnRequestInfo.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n btnRequestInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info));\n btnRequestInfo.setVisibility(View.GONE);\n handleGeofenceChange(currentGeofences);\n }\n });\n }\n }\n }\n\n if (result != null) {\n try {\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result length is: \" + result.getContent().size());\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result is: \" + result.getContent().toString());\n\n btnRequestInfo.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n if(debugMode) {\n displayGeofenceInfo();\n }\n addMarker(result.getContent());\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }", "Map<String, Collection<String>> getConnectedEntities();", "public ArrayList<City> getAllCapitalContinent()\n {\n try\n {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n // ALl the capital cities in the WORLD organised by largest population to smallest\n String strSelect =\n \"SELECT city.Name, country.Name AS 'CountryName', city.Population, country.Continent \"\n + \"FROM country JOIN city \"\n + \"ON country.Code = city.CountryCode \"\n + \"WHERE country.Capital = city.ID \"\n + \" ORDER BY country.Continent, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new capital city if valid.\n // Check one is returned\n ArrayList<City> capCity = new ArrayList<City>();\n System.out.println(\"18. All the capital cities in a CONTINENT organised by largest population to smallest.\");\n System.out.println(\"Continent | Name | Country | Population\");\n while (rset.next())\n {\n // Create new City (to store in database)\n City cCty = new City();\n cCty.Name = rset.getString(\"Name\");\n cCty.Population = rset.getInt(\"Population\");\n Country cCountry = new Country();\n cCountry.Name = rset.getString(\"CountryName\");\n cCountry.Continent = rset.getString(\"Continent\");\n System.out.println(cCountry.Continent + \" | \" + cCty.Name + \" | \" + cCountry.Name +\" | \" + cCty.Population );\n capCity.add(cCty);\n }\n System.out.println(\"\\n\");\n return capCity;\n }\n catch (Exception e)\n {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"18. Failed to get capital city details by continent\");\n return null;\n }\n }", "private void getPlaces() {\n places = new ArrayList<Place>();\n ref = new Firebase(\"https://flickering-torch-2192.firebaseio.com/places\");\n Query likeQuery = ref.orderByChild(\"likes\").limitToLast(10);\n likeQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot querySnapshot) {\n for (DataSnapshot d : querySnapshot.getChildren()) {\n ref.child(d.getKey()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n Place p = dataSnapshot.getValue(Place.class);\n mMap.addMarker(new MarkerOptions().position(new LatLng(p.getLat(), p.getLon()))\n .title(p.getName()).snippet(p.getDescription())\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.happy_marker)));\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }\n }\n\n @Override\n public void onCancelled(FirebaseError error) {\n showToast(error.getMessage());\n }\n });\n\n LatLng bristol = new LatLng(51.4556676, -2.6266423);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(bristol, zoomLevel));\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n Log.d(TAG, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og, String url_geofenceWfs, String serviceIdentifier) {\r\n\t\t\r\n\t\t//logger.debug(xml_og);\r\n\t\tnameSpaceUri = getArbeitsbereichXmlTagFromWfs(url_geofenceWfs); //z.B. focus\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(nameSpaceUri.equals(args)){\r\n\t\t\t \treturn nameSpaceUri;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\r\n\t \tString pathToObjectid = \"//\"+nameSpaceUri +\":objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t//\tlogger.debug(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(serviceIdentifier.equals(\"within\")){\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBoxWithin.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "Observable<List<CountryEntity>> fetchAllCountries();", "public ArrayList<City> getPopCityReg() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT country.Region, city.Name, city.Population, city.District, city.CountryCode\"\n +\" FROM city\"\n +\" INNER JOIN country ON city.CountryCode = country.Code\"\n +\" ORDER BY country.Region, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new city if valid.\n // Check one is returned\n ArrayList<City> PopCityReg = new ArrayList<>();\n System.out.println(\"9. All the cities in a REGION organised by largest population to smallest.\");\n System.out.println(\"Region | Name | Country | District | Population\");\n while (rset.next()) {\n // Create new Country/City (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"Name\");\n cty.Population = rset.getInt(\"Population\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n cty.District = rset.getString(\"District\");\n\n Country cnt = new Country();\n cnt.Region = rset.getString(\"Region\");\n System.out.println(cnt.Region + \" | \" + cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n PopCityReg.add(cty);\n }\n return PopCityReg;\n } catch (Exception e) {\n // City not found.\n System.out.println(e.getMessage());\n System.out.println(\"Failed to get city details\");\n return null;\n }\n }", "private GeofenceInfoContent[] getContentFromMarker(Marker marker){\n return currentGeofencesInfoMap.get(marker.getTitle());\n }", "public static Cursor GpsClimbLoadData(SQLiteDatabase db) {\n\n SQLiteDatabase database = db;\n\n String[] projection = {\n DatabaseContract.ClimbLogEntry._ID,\n DatabaseContract.ClimbLogEntry.COLUMN_DATE,\n DatabaseContract.ClimbLogEntry.COLUMN_NAME,\n DatabaseContract.ClimbLogEntry.COLUMN_GRADETYPECODE,\n DatabaseContract.ClimbLogEntry.COLUMN_GRADECODE,\n DatabaseContract.ClimbLogEntry.COLUMN_ASCENTTYPECODE,\n DatabaseContract.ClimbLogEntry.COLUMN_LOCATION,\n DatabaseContract.ClimbLogEntry.COLUMN_FIRSTASCENTCODE,\n DatabaseContract.ClimbLogEntry.COLUMN_ISCLIMB};\n //String whereClause = DatabaseContract.ClimbLogEntry.COLUMN_ISGPS + \"=?\";\n //String[] whereValue = {String.valueOf(DatabaseContract.IS_GPS_TRUE)};\n\n Cursor cursor = database.query(DatabaseContract.ClimbLogEntry.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null); //TODO: Mod the \"orderBy\" or order by location ID\n\n return cursor;\n }", "@Override\n public void onScrubGeo(long arg0, long arg1) {\n }", "private void getLocations() {\n TripSave tripSave = TripHelper.tripOngoing();\n if (tripSave != null) {\n for (LocationSave locationSave : tripSave.getLocations()) {\n if (locationSave != null) {\n tripTabFragment.drawPolyLine(new LatLng(locationSave.getLatitude(), locationSave.getLongitude()));\n }\n }\n }\n }", "private void update_private(LatLngBounds bounds) {\n\t\tJSONObject response = null;\n\n\t\ttry {\n\t\t\tStringBuffer result = new StringBuffer();\n\n\t\t\tURL url = new URL(BASE_URL +\n\t\t\t\t\t\"lang=\" + mLang +\n\t\t\t\t\t\"&north=\" + bounds.getNe().getLat() +\n\t\t\t\t\t\"&south=\" + bounds.getSw().getLat() +\n\t\t\t\t\t\"&east=\" + bounds.getNe().getLng() +\n\t\t\t\t\t\"&west=\" + bounds.getSw().getLng() +\n\t\t\t\t\t\"&maxRows=\" + MAX_SEARCH_RESULTS);\n\t\t\tPLog.d(TAG, \"Sending geonames URL... \", url);\n\t\t\tBufferedReader buf = BufferedReaderFactory.openBufferedReader(url);\n\t\t\tfor (String line; (line = buf.readLine()) != null;) {\n\t\t\t\tresult.append(line).append(\"\\n\");\n\t\t\t}\n\t\t\tbuf.close();\n\t\t\tPLog.d(TAG, \"Geonames result received !\");\n\t\t\tresponse = new JSONObject(result.toString());\n\n\t\t\t/*\n\t\t\t * Once the first response is received, we adjust the real\n\t\t\t * amount of possible responses for next sends.\n\t\t\t */\n\n\t\t\tif (response.has(\"status\")) {\n\t\t\t\t/* No results found on first request */\n\t\t\t\tthrow (new Exception(\"Bad response status : \" + response.getJSONObject(\"status\").getString(\"message\")));\n\t\t\t}\n\n\t\t\tupdateMarkers(bounds,response);\n\n\t\t\t// Trigger a refresh of map display\n\t\t\tmController.getHandler().sendEmptyMessage(Controller.MSG_INVALIDATE_DISPLAY);\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\tPLog.e(TAG, \"Incorrect URL in search method : \", e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tPLog.e(TAG, \"Error while manipulating stream response : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JSONException e) {\n\t\t\tPLog.e(TAG, \"Error JSON while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\tresponse = null;\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tPLog.e(TAG, \"Error while building geonames result : \",\n\t\t\t\t\te.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadDataFromCovidDatabase(){\n\n String [] columns = {CovidOpener.COL_COUNTRY, CovidOpener.COL_COUNTRYCODE, CovidOpener.COL_PROVINCE, CovidOpener.COL_CITY, CovidOpener.COL_CASES, CovidOpener.COL_DATE, CovidOpener.COL_ID};\n\n Cursor results = cdb.query(false, CovidOpener.TABLE_NAME, columns, null, null, null, null, null, null);\n\n int countryColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRY);\n int countryCodeColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRYCODE);\n int provinceColIndex = results.getColumnIndex(CovidOpener.COL_PROVINCE);\n int cityColIndex = results.getColumnIndex(CovidOpener.COL_CITY);\n int casesColIndex = results.getColumnIndex(CovidOpener.COL_CASES);\n int dateColIndex = results.getColumnIndex(CovidOpener.COL_DATE);\n int idColIndex = results.getColumnIndex(CovidOpener.COL_ID);\n\n while(results.moveToNext()){\n country = results.getString(countryColIndex);\n countryCode = results.getString(countryCodeColIndex);\n province = results.getString(provinceColIndex);\n city = results.getString(cityColIndex);\n cases = results.getInt(casesColIndex);\n date = results.getString(dateColIndex);\n id = results.getLong(idColIndex);\n CovArray.add(new Covid(country, countryCode, province, city, cases, date, id));\n }\n printCursor(results);\n }", "@Override\n\t\tpublic void onScrubGeo(long arg0, long arg1) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onScrubGeo(long arg0, long arg1) {\n\t\t\t\n\t\t}", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }" ]
[ "0.7011064", "0.6466031", "0.625931", "0.6242231", "0.61471605", "0.5948408", "0.59174", "0.59025955", "0.56942034", "0.5623643", "0.5615015", "0.559109", "0.5550121", "0.5533829", "0.55001986", "0.5473227", "0.54694474", "0.543259", "0.54299784", "0.5427853", "0.54166126", "0.54059577", "0.53845215", "0.5335617", "0.531878", "0.53107274", "0.5300062", "0.52808577", "0.52709234", "0.52315784", "0.52307934", "0.51866007", "0.5173747", "0.5152994", "0.51515824", "0.51482135", "0.5139539", "0.5136045", "0.51213074", "0.5111031", "0.5106504", "0.5103056", "0.5100769", "0.5095508", "0.5089785", "0.5087137", "0.50559336", "0.5052909", "0.50293535", "0.5025515", "0.50244075", "0.50235283", "0.50212806", "0.501524", "0.5008817", "0.5001739", "0.4989118", "0.49790475", "0.49790475", "0.4976857", "0.49614632", "0.49579042", "0.49497008", "0.4949248", "0.49394578", "0.4930421", "0.4913558", "0.4913558", "0.4913238", "0.4907506", "0.4904335", "0.4904216", "0.48940027", "0.48911455", "0.48854083", "0.48842543", "0.48833606", "0.48728257", "0.48678344", "0.48621434", "0.48613995", "0.48578414", "0.48514017", "0.4833413", "0.48222786", "0.4816988", "0.4809259", "0.48076564", "0.48046425", "0.47983062", "0.4789484", "0.47840893", "0.478237", "0.4776538", "0.4768889", "0.47679102", "0.47645244", "0.47624856", "0.47624856", "0.4754376" ]
0.72502613
0
Gets new geofences and draws markers on the map
public void updateGeofences() { MainActivity mainActivity = (MainActivity) getActivity(); if(view != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : updateGeofences : view is not null "); Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences); TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : updateGeofences : about to get new geofences "); boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences(); if (!gotGeofences) { btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); } if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) { gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences(); if (!gotGeofences) { btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); }else{ btnRequestGeofences.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); } } else { if (txtRequestGeofences != null) { txtRequestGeofences.setVisibility(View.GONE); btnRequestGeofences.setVisibility(View.GONE); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "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 }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "private void getLocations() {\n TripSave tripSave = TripHelper.tripOngoing();\n if (tripSave != null) {\n for (LocationSave locationSave : tripSave.getLocations()) {\n if (locationSave != null) {\n tripTabFragment.drawPolyLine(new LatLng(locationSave.getLatitude(), locationSave.getLongitude()));\n }\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n for(int i=0; i<coordinatesStringList.length; i+=2){\n pont = new LatLng(Double.parseDouble(coordinatesStringList[i]), Double.parseDouble(coordinatesStringList[i+1]));\n latLngList.add(pont);\n MarkerOptions markerOptions=new MarkerOptions();\n mMap.addMarker(new MarkerOptions().position(pont).title(\"Marker in Sydney\").icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)));\n\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n// Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n// ArrayList<String> addresses = geocoder.getFromLocation(marker.getPosition().latitude(), marker.getPosition().longitude(), 1); //1 num of possible location returned\n// String address = addresses.get(0).getAddressLine(0); //0 to obtain first possible address\n// String city = addresses.get(0).getLocality();\n// String state = addresses.get(0).getAdminArea();\n// String country = addresses.get(0).getCountryName();\n// String postalCode = addresses.get(0).getPostalCode();\n// //create your custom title\n// String title = address +\"-\"+city+\"-\"+state;\n// marker.setTitle(title);\n// marker.showInfoWindow();\n// return true;\n// }\n// });\n }\n\n\n PolylineOptions polylineOptions = new PolylineOptions();\n\n// Create polyline options with existing LatLng ArrayList\n polylineOptions.addAll(latLngList);\n polylineOptions\n .width(5)\n .color(Color.RED);\n\n// Adding multiple points in map using polyline and arraylist\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.addPolyline(polylineOptions);\n }", "private void setupMarkers() {\n \t\tGPSFilterPolygon polygon = this.area.getPolygon();\n \n \t\tif ( polygon != null ) {\n \t\t\tfinal LatLngBounds.Builder builder = LatLngBounds.builder();\n \n \t\t\t// Put markers for each edge.\n \t\t\tfor ( GPSLatLng pos : polygon.getPoints() ) {\n \t\t\t\tLatLng point = this.convertLatLng( pos );\n \n \t\t\t\tbuilder.include( point );\n \n \t\t\t\tthis.addMarker( point );\n \t\t\t}\n \n \t\t\t// Add listener that moves camera so that all markers are in users view.\n \t\t\tthis.googleMap.setOnCameraChangeListener( new OnCameraChangeListener() {\n \t\t\t\t@Override\n \t\t\t\tpublic void onCameraChange( CameraPosition arg0 ) {\n \t\t\t\t\t// Move camera.\n \t\t\t\t\tmoveCameraToPolygon( builder, false );\n \n \t\t\t\t\t// Remove listener to prevent position reset on camera move.\n \t\t\t\t\tgoogleMap.setOnCameraChangeListener( null );\n \t\t\t\t}\n \t\t\t} );\n \n \t\t\tthis.updateGuiPolygon();\n \t\t}\n \t}", "void addMarkers() {\n\n Map<String, ProductDetailsCartItem> restaurantGeolocations = new HashMap<>();\n for (UserProductsItem userProductsItem : userProductsItemList) {\n for (ProductDetailsCartItem productDetailsCartItem : userProductsItem.getCartDetails()) {\n ProductDetailsCartItem restaurantDetails = new ProductDetailsCartItem(productDetailsCartItem.getRestaurantGeolocation(), productDetailsCartItem.getRestaurantAddress());\n restaurantGeolocations.put(productDetailsCartItem.getRestaurantName(), restaurantDetails);\n\n }\n }\n restaurantListServices.removeElements();\n LatLng position = new LatLng(0, 0);\n String address = \"\";\n int restaurantPosition = 0;\n for (HashMap.Entry<String, ProductDetailsCartItem> restaurantDetails : restaurantGeolocations.entrySet()) {\n try {\n String geolocation = restaurantDetails.getValue().getRestaurantGeolocation();\n address = restaurantDetails.getValue().getRestaurantAddress();\n String[] lat_long = geolocation.split(\",\");\n\n double lat = Double.parseDouble(lat_long[0]);\n double lng = Double.parseDouble(lat_long[1]);\n position = new LatLng(lat, lng);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n } finally {\n MarkerOptions mo = new MarkerOptions().position(position).title(restaurantDetails.getKey());\n mo.visible(true);\n // mo.flat(true);\n mo.snippet(address);\n\n Marker marker = googleMap.addMarker(mo);\n marker.showInfoWindow();\n // polylineOptions.add(position);\n RestaurantMapItem restaurantMapItem = new RestaurantMapItem(restaurantDetails.getKey(), restaurantDetails.getValue().getRestaurantAddress(), ++restaurantPosition, position, marker);\n restaurantListServices.addRestaurant(restaurantMapItem);\n\n }\n }\n\n UiSettings settings = googleMap.getUiSettings();\n settings.setMapToolbarEnabled(true);\n settings.setMyLocationButtonEnabled(true);\n settings.setCompassEnabled(true);\n googleMap.setContentDescription(\"restaurants\");\n googleMap.setTrafficEnabled(true);\n\n\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, 12));\n\n googleMap.setOnMyLocationButtonClickListener(this);\n googleMap.setOnMyLocationClickListener(this);\n\n checkPermissions();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n\n restaurantListViewAdapter.notifyDataSetChanged();\n /*if (mMutablePolyline != null) {\n mMutablePolyline.remove();\n }\n mMutablePolyline = googleMap.addPolyline(polylineOptions);\n*/\n }", "public void generateMarkers() {\n\t\tgooglemap.clear();\n\t\tgooglemap.setMyLocationEnabled(true);\n\t\t//generateRouteLine();\n\t\tdouble itinerary_latitude;\n\t\tdouble itinerary_longitude;\n\t\tString itinerary_name;\n\n\t\tLatLng latlng;\n\t\tmarkers = new ArrayList<Marker>();\n\n\t\t//zoom out to make sure all markers are displayed in screen\n\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder(); \n\t\tbuilder.include(new LatLng(parentActivity.getUserLat(),parentActivity.getUserLon()));\n\n\n\t\tfor( int x=parentActivity.getItinerary().itin.size(); x > 0; x-- ){\n\t\t\tEntity obj = parentActivity.getItinerary().itin.get(x-1);\n\t\t\titinerary_latitude = Double.parseDouble( obj.getLatitude() );\n\t\t\titinerary_longitude = Double.parseDouble( obj.getLongitude() );\n\t\t\titinerary_name = obj.getName();\n\t\t\tlatlng = new LatLng(itinerary_latitude, itinerary_longitude);\n\n\t\t\tint markerImage = supportClassObj.chooseMarkerImage(x);\n\t\t\t\n\t\t\tMarker marker = googlemap.addMarker(new MarkerOptions()\n\t\t\t\t.position(latlng)\n\t\t\t\t.snippet(\"Navigate\")\n\t\t\t\t.title(itinerary_name)\n\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(markerImage)));\n\t\t\t\n\t\t\tmarker.showInfoWindow();\n\t\t\tmarker.hideInfoWindow();\n\n\t\t\tmarkers.add(marker);\n\n\t\t\t//setting bounds for googlemap\n\t\t\tbuilder.include(latlng); \n\t\t}\n\t\t\n\t\tgooglemap.setOnMarkerClickListener(new OnMarkerClickListener(){\n\t\t\t@Override\n\t\t\tpublic boolean onMarkerClick(Marker marker) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor( String leg : parentActivity.getItinerary().getPolyline() ){\n\t\t\thandleGetDirectionsResult(decodePoly(leg));\n\t\t}\n\t\t\n\t\t// multipliers for height based off percentage of screen size map will use\n\t\tint width = this.getResources().getDisplayMetrics().widthPixels;\n\t\tint padding = (int) (width * .145);\n\t\tgooglemap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), \n width, \n (int)(this.getResources().getDisplayMetrics().heightPixels * 0.8 * 0.6 * 0.8), padding));\n\t\t\n\t}", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "private void plottingMarkers(){\r\n if (nameList.size()==0) {\r\n }\r\n else {\r\n for (int i = 0; i < nameList.size(); i++) {\r\n Loc2LatLng = new LatLng(Double.parseDouble(latList.get(i)), Double.parseDouble(lngList.get(i)));\r\n MarkerOptions markerSavedLocations = new MarkerOptions();\r\n markerSavedLocations.title(nameList.get(i));\r\n markerSavedLocations.position(Loc2LatLng);\r\n map.addMarker(markerSavedLocations);\r\n }\r\n }\r\n }", "private void getData(){\n mapFStreets = new ArrayList<>();\n mapFAreas = new ArrayList<>();\n mapIcons = new ArrayList<>();\n coastLines = new ArrayList<>();\n //Get a rectangle of the part of the map shown on screen\n bounds.updateBounds(getVisibleRect());\n Rectangle2D windowBounds = bounds.getBounds();\n sorted = zoomLevel >= 5;\n\n coastLines = (Collection<MapFeature>) (Collection<?>) model.getVisibleCoastLines(windowBounds);\n\n Collection < MapData > bigRoads = model.getVisibleBigRoads(windowBounds, sorted);\n mapFStreets = (Collection<MapFeature>)(Collection<?>) bigRoads;\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n else if (zoomLevel > 4)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleLanduse(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport() && zoomLevel > 9)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n else if (zoomLevel > 7)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>)model.getVisibleNatural(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n else if(zoomLevel > 7)\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleStreets(windowBounds, sorted));\n\n if (drawAttributeManager.isTransport())\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n else if(zoomLevel > 7) {\n mapFStreets.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleRailways(windowBounds, sorted));\n }\n\n if (drawAttributeManager.isTransport() && zoomLevel > 14)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n else if(zoomLevel > 10)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBuildings(windowBounds, sorted));\n\n if(zoomLevel > 14)\n mapIcons = (Collection<MapIcon>) (Collection<?>) model.getVisibleIcons(windowBounds);\n\n if (!drawAttributeManager.isTransport())\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n else {\n if (zoomLevel > 3)\n mapFAreas.addAll((Collection<MapFeature>)(Collection<?>) model.getVisibleBigForests(windowBounds, sorted));\n }\n mapFAreas.addAll((Collection<MapFeature>) (Collection<?>) model.getVisibleBikLakes(windowBounds, sorted));\n\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }", "public static void instantiate(){\n listOfpoints = new ArrayList<>(12);\n listOfPolygons = new ArrayList<>(listOfpoints.size());\n\n for ( int i= 0 ; i < 70; i++ ){\n listOfpoints.add(new ArrayList<LatLng>());\n }\n\n listOfpoints.get(0).add(new LatLng(44.4293595,26.1035863));\n listOfpoints.get(0).add(new LatLng(44.4295434,26.1035434));\n listOfpoints.get(0).add(new LatLng(44.4297579,26.103479));\n listOfpoints.get(0).add(new LatLng(44.431566,26.1033503));\n listOfpoints.get(0).add(new LatLng(44.4327305,26.1031572));\n listOfpoints.get(0).add(new LatLng(44.4337724,26.1029211));\n listOfpoints.get(0).add(new LatLng(44.4342474,26.1028138));\n listOfpoints.get(0).add(new LatLng( 44.4348756,26.1025563));\n listOfpoints.get(0).add(new LatLng(44.4353199,26.1023203));\n listOfpoints.get(0).add(new LatLng( 44.4353046,26.101977));\n listOfpoints.get(0).add(new LatLng( 44.4352893,26.1015478));\n listOfpoints.get(0).add(new LatLng(44.4351974,26.1010758));\n listOfpoints.get(0).add(new LatLng(44.4350595,26.100432));\n listOfpoints.get(0).add(new LatLng(44.4348756,26.0995523));\n listOfpoints.get(0).add(new LatLng(44.4346458,26.0983292));\n listOfpoints.get(0).add(new LatLng(44.4343547,26.098415));\n listOfpoints.get(0).add(new LatLng( 44.4340176,26.0983506));\n listOfpoints.get(0).add(new LatLng( 44.4327918,26.0975996));\n listOfpoints.get(0).add(new LatLng(44.4318878,26.0972134));\n listOfpoints.get(0).add(new LatLng( 44.4307692,26.0968701));\n listOfpoints.get(0).add(new LatLng( 44.4300644,26.0968271));\n listOfpoints.get(0).add(new LatLng( 44.4298498,26.0972992));\n listOfpoints.get(0).add(new LatLng(44.4297732,26.0977713));\n listOfpoints.get(0).add(new LatLng(44.4296966,26.0985867));\n listOfpoints.get(0).add(new LatLng (44.4296506,26.0994235));\n listOfpoints.get(0).add(new LatLng (44.4295587,26.1002389));\n listOfpoints.get(0).add(new LatLng (44.4294361,26.1007754));\n listOfpoints.get(0).add(new LatLng (44.4292369,26.1016766));\n listOfpoints.get(0).add(new LatLng (44.429099,26.1025778));\n listOfpoints.get(0).add(new LatLng (44.4289917,26.1033717));\n\n\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n listOfpoints.get(1).add(new LatLng (44.43630606,26.1017829));\n listOfpoints.get(1).add(new LatLng (44.4370654,26.101461));\n listOfpoints.get(1).add(new LatLng (44.4382451,26.1007958));\n listOfpoints.get(1).add(new LatLng (44.4393176,26.1002379));\n listOfpoints.get(1).add(new LatLng (44.4406045,26.0996371));\n listOfpoints.get(1).add(new LatLng (44.4418301,26.0990792));\n listOfpoints.get(1).add(new LatLng (44.4415084,26.0983067));\n listOfpoints.get(1).add(new LatLng (44.4412173,26.0977059));\n listOfpoints.get(1).add(new LatLng (44.4409875,26.097148));\n listOfpoints.get(1).add(new LatLng (44.4406811,26.0965472));\n listOfpoints.get(1).add(new LatLng (44.4404207,26.0959893));\n listOfpoints.get(1).add(new LatLng (44.4400989,26.0963326));\n listOfpoints.get(1).add(new LatLng (44.4393636,26.0968691));\n listOfpoints.get(1).add(new LatLng (44.4390725,26.0969549));\n listOfpoints.get(1).add(new LatLng (44.4381532,26.0971051));\n listOfpoints.get(1).add(new LatLng (44.4372952,26.0975557));\n listOfpoints.get(1).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(1).add(new LatLng (44.4358244,26.0977918));\n listOfpoints.get(1).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(1).add(new LatLng (44.4348132,26.0979205));\n listOfpoints.get(1).add(new LatLng (44.4348591,26.0983497));\n listOfpoints.get(1).add(new LatLng (44.4352115,26.1003452));\n listOfpoints.get(1).add(new LatLng (44.435472,26.1017185));\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n\n\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n listOfpoints.get(2).add(new LatLng (44.435899,26.1039688));\n listOfpoints.get(2).add(new LatLng (44.4360216,26.1044623));\n listOfpoints.get(2).add(new LatLng (44.4360982,26.1049988));\n listOfpoints.get(2).add(new LatLng (44.4362361,26.1055781));\n listOfpoints.get(2).add(new LatLng (44.4363127,26.1059));\n listOfpoints.get(2).add(new LatLng (44.4364506,26.1063721));\n listOfpoints.get(2).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(2).add(new LatLng (44.4367264,26.1068441));\n listOfpoints.get(2).add(new LatLng (44.4369715,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4374312,26.1073591));\n listOfpoints.get(2).add(new LatLng (44.4380593,26.1076381));\n listOfpoints.get(2).add(new LatLng (44.4386722,26.1078741));\n listOfpoints.get(2).add(new LatLng (44.439239,26.1080672));\n listOfpoints.get(2).add(new LatLng (44.4399744,26.1083033));\n listOfpoints.get(2).add(new LatLng (44.4406485,26.1084106));\n listOfpoints.get(2).add(new LatLng (44.4407557,26.1080458));\n listOfpoints.get(2).add(new LatLng (44.440817,26.1075737));\n listOfpoints.get(2).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(2).add(new LatLng (44.4410928,26.1070587));\n listOfpoints.get(2).add(new LatLng (44.4419814,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4422877,26.1071875));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.107445));\n listOfpoints.get(2).add(new LatLng (44.443498,26.107402));\n listOfpoints.get(2).add(new LatLng (44.4433754,26.10693));\n listOfpoints.get(2).add(new LatLng (44.4432988,26.1065008));\n listOfpoints.get(2).add(new LatLng (44.4431763,26.1059858));\n listOfpoints.get(2).add(new LatLng (44.4429465,26.1052992));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1044838));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1036469));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1029818));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.1027457));\n listOfpoints.get(2).add(new LatLng (44.4431303,26.1025311));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1022737));\n listOfpoints.get(2).add(new LatLng (44.4427627,26.101866));\n listOfpoints.get(2).add(new LatLng (44.4426707,26.1015656));\n listOfpoints.get(2).add(new LatLng (44.4426554,26.101072));\n listOfpoints.get(2).add(new LatLng (44.4427014,26.1002781));\n listOfpoints.get(2).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(2).add(new LatLng (44.4420426,26.0993125));\n listOfpoints.get(2).add(new LatLng (44.4412,26.0997202));\n listOfpoints.get(2).add(new LatLng (44.4400663,26.100321));\n listOfpoints.get(2).add(new LatLng (44.4390399,26.100836));\n listOfpoints.get(2).add(new LatLng (44.4382279,26.1012651));\n listOfpoints.get(2).add(new LatLng (44.4374924,26.1016514));\n listOfpoints.get(2).add(new LatLng (44.4366038,26.1021449));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1026384));\n listOfpoints.get(2).add(new LatLng (44.4357305,26.1027886));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n\n\n listOfpoints.get(3).add(new LatLng (44.4290806,26.1040332));\n listOfpoints.get(3).add(new LatLng (44.4295709,26.1054494));\n listOfpoints.get(3).add(new LatLng (44.4302604,26.1070373));\n listOfpoints.get(3).add(new LatLng (44.4307508,26.1080887));\n listOfpoints.get(3).add(new LatLng (44.432804,26.111994));\n listOfpoints.get(3).add(new LatLng (44.4329113,26.1123373));\n listOfpoints.get(3).add(new LatLng (44.4330798,26.1136248));\n listOfpoints.get(3).add(new LatLng (44.4332483,26.1150195));\n listOfpoints.get(3).add(new LatLng (44.433325,26.1158349));\n listOfpoints.get(3).add(new LatLng (44.4347959,26.1162855));\n listOfpoints.get(3).add(new LatLng (44.4359143,26.1166288));\n listOfpoints.get(3).add(new LatLng (44.4365272,26.1168005));\n listOfpoints.get(3).add(new LatLng (44.4367723,26.1168434));\n listOfpoints.get(3).add(new LatLng (44.4373852,26.1166503));\n listOfpoints.get(3).add(new LatLng (44.43809,26.1163713));\n listOfpoints.get(3).add(new LatLng (44.4378755,26.1154272));\n listOfpoints.get(3).add(new LatLng (44.435516,26.1027672));\n listOfpoints.get(3).add(new LatLng (44.433708,26.1034109));\n listOfpoints.get(3).add(new LatLng (44.4330032,26.1035826));\n listOfpoints.get(3).add(new LatLng (44.4321451,26.1038401));\n listOfpoints.get(3).add(new LatLng (44.4309959,26.1039259));\n listOfpoints.get(3).add(new LatLng (44.4302451,26.1039903));\n listOfpoints.get(3).add(new LatLng (44.4296628,26.1039903));\n listOfpoints.get(3).add(new LatLng(44.4290806,26.1040332));\n\n\n\n listOfpoints.get(4).add(new LatLng ( 44.4343669 ,26.0798289));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0801508));\n listOfpoints.get(4).add(new LatLng (44.4335088 ,26.0905363));\n listOfpoints.get(4).add(new LatLng (44.4333862 ,26.092124));\n listOfpoints.get(4).add(new LatLng ( 44.433233 ,26.0926177));\n listOfpoints.get(4).add(new LatLng ( 44.4329879 ,26.0932614));\n listOfpoints.get(4).add(new LatLng (44.4327427 , 26.0936906));\n listOfpoints.get(4).add(new LatLng (44.4301838 ,26.0965659));\n listOfpoints.get(4).add(new LatLng (44.4301685 ,26.0967161));\n listOfpoints.get(4).add(new LatLng (44.4305209 ,26.096759));\n listOfpoints.get(4).add(new LatLng (44.4311338 ,26.0968878));\n listOfpoints.get(4).add(new LatLng (44.4317468 ,26.097038));\n listOfpoints.get(4).add(new LatLng (44.4323137 ,26.0972955));\n listOfpoints.get(4).add(new LatLng (44.4327427 ,26.0974457));\n listOfpoints.get(4).add(new LatLng (44.4333709 ,26.0978534));\n listOfpoints.get(4).add(new LatLng (44.4338919 ,26.0981538));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0982611));\n listOfpoints.get(4).add(new LatLng ( 44.4345354 ,26.0982611));\n listOfpoints.get(4).add(new LatLng (44.4346886 ,26.0981752));\n listOfpoints.get(4).add(new LatLng (44.4345814, 26.0918667));\n listOfpoints.get(4).add(new LatLng (44.4343669 ,26.0798289));\n\n\n listOfpoints.get(5).add(new LatLng (44.4348405,26.097773));\n listOfpoints.get(5).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(5).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(5).add(new LatLng (44.4372952, 26.0975557));\n listOfpoints.get(5).add(new LatLng (44.4381532, 26.0971051));\n listOfpoints.get(5).add(new LatLng ( 44.4393636,26.0968691));\n listOfpoints.get(5).add(new LatLng(44.4397739, 26.0964855));\n listOfpoints.get(5).add(new LatLng (44.4402029,26.0960993));\n listOfpoints.get(5).add(new LatLng (44.4406778,26.0956487));\n listOfpoints.get(5).add(new LatLng(44.4405706,26.0952195));\n listOfpoints.get(5).add(new LatLng (44.4403408 ,26.0942539));\n listOfpoints.get(5).add(new LatLng (44.440065 ,26.0931811));\n listOfpoints.get(5).add(new LatLng (44.4400497, 26.0919151));\n listOfpoints.get(5).add(new LatLng (44.4398199 ,26.0897693));\n listOfpoints.get(5).add(new LatLng (44.4397893 ,26.0891041));\n listOfpoints.get(5).add(new LatLng (44.4399271 , 26.0879668));\n listOfpoints.get(5).add(new LatLng (44.4399731 ,26.0873017));\n listOfpoints.get(5).add(new LatLng (44.4399884 ,26.0867223));\n listOfpoints.get(5).add(new LatLng (44.4365719, 26.0887179));\n listOfpoints.get(5).add(new LatLng (44.434672 ,26.0898337));\n listOfpoints.get(5).add(new LatLng (44.4348405 ,26.097773));\n\n\n listOfpoints.get(6).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(6).add(new LatLng (44.4365354,26.1075151));\n listOfpoints.get(6).add(new LatLng (44.4375926,26.113137));\n listOfpoints.get(6).add(new LatLng (44.4378224,26.114167));\n listOfpoints.get(6).add(new LatLng (44.4435828,26.1191452));\n listOfpoints.get(6).add(new LatLng (44.4440117, 26.1184585));\n listOfpoints.get(6).add(new LatLng (44.4448849, 26.1172784));\n listOfpoints.get(6).add(new LatLng (44.4457888,26.1161411));\n listOfpoints.get(6).add(new LatLng (44.4462483, 26.1149395));\n listOfpoints.get(6).add(new LatLng (44.4466773, 26.113137));\n listOfpoints.get(6).add(new LatLng (44.4467998, 26.1121929));\n listOfpoints.get(6).add(new LatLng (44.4467539, 26.1112917));\n listOfpoints.get(6).add(new LatLng (44.4469683, 26.1101973));\n listOfpoints.get(6).add(new LatLng (44.4458041, 26.1093176));\n listOfpoints.get(6).add(new LatLng (44.4453905, 26.1091888));\n listOfpoints.get(6).add(new LatLng (44.4448083, 26.1089099));\n listOfpoints.get(6).add(new LatLng (44.4442109, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4435828, 26.1076224));\n listOfpoints.get(6).add(new LatLng (44.4433377, 26.107558));\n listOfpoints.get(6).add(new LatLng (44.4420662,26.1072791));\n listOfpoints.get(6).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(6).add(new LatLng (44.4407946,26.1082018));\n listOfpoints.get(6).add(new LatLng ( 44.4406107,26.1085451));\n listOfpoints.get(6).add(new LatLng (44.43986, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4384659, 26.1079014));\n listOfpoints.get(6).add(new LatLng (44.4372095, 26.1073864));\n listOfpoints.get(6).add(new LatLng (44.4365425, 26.1067583));\n\n\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n listOfpoints.get(7).add(new LatLng ( 44.4265883,26.1107511));\n listOfpoints.get(7).add(new LatLng (44.4261898,26.118905));\n listOfpoints.get(7).add(new LatLng (44.4274311,26.1189909));\n listOfpoints.get(7).add(new LatLng (44.4276303,26.1189265));\n listOfpoints.get(7).add(new LatLng (44.4285497,26.1191625));\n listOfpoints.get(7).add(new LatLng (44.4288408,26.1193342));\n listOfpoints.get(7).add(new LatLng (44.4294997,26.1199564));\n listOfpoints.get(7).add(new LatLng (44.4297909, 26.1200852));\n listOfpoints.get(7).add(new LatLng (44.4303272,26.1203427));\n listOfpoints.get(7).add(new LatLng (44.431124, 26.1205787));\n listOfpoints.get(7).add(new LatLng (44.4328861, 26.1207289));\n listOfpoints.get(7).add(new LatLng (44.4329933, 26.1206431));\n listOfpoints.get(7).add(new LatLng (44.4331159, 26.1194844));\n listOfpoints.get(7).add(new LatLng (44.4331925,26.118154));\n listOfpoints.get(7).add(new LatLng (44.4332844,26.1160512));\n listOfpoints.get(7).add(new LatLng (44.4328094,26.112339));\n listOfpoints.get(7).add(new LatLng (44.4327022, 26.1120171));\n listOfpoints.get(7).add(new LatLng (44.4299135, 26.1064596));\n listOfpoints.get(7).add(new LatLng (44.4289634,26.1040778));\n listOfpoints.get(7).add(new LatLng (44.4281819,26.1039705));\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n\n\n\n\n listOfpoints.get(8).add (new LatLng (44.4262461,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4260163,26.1014488));\n listOfpoints.get(8).add (new LatLng (44.4259397,26.1023715));\n listOfpoints.get(8).add (new LatLng (44.4258784,26.103616));\n listOfpoints.get(8).add (new LatLng (44.426001,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.42643,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.4272882,26.1038735));\n listOfpoints.get(8).add (new LatLng (44.4282995,26.1038306));\n listOfpoints.get(8).add (new LatLng (44.4289278,26.1035731));\n listOfpoints.get(8).add (new LatLng (44.4289431,26.1028006));\n listOfpoints.get(8).add (new LatLng (44.4291423,26.1015132));\n listOfpoints.get(8).add (new LatLng (44.4286366,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4284834,26.1010196));\n listOfpoints.get(8).add (new LatLng (44.4271043,26.1008694));\n listOfpoints.get(8).add (new LatLng (44.4262461, 26.1007836));\n\n\n\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n listOfpoints.get(9).add(new LatLng (44.4284834,26.1010196));\n listOfpoints.get(9).add(new LatLng (44.4290094,26.1000479));\n listOfpoints.get(9).add(new LatLng (44.4292545,26.0986961));\n listOfpoints.get(9).add(new LatLng (44.4293465,26.0971726));\n listOfpoints.get(9).add(new LatLng (44.4294844,26.0964216));\n listOfpoints.get(9).add(new LatLng (44.4301739,26.0956276));\n listOfpoints.get(9).add(new LatLng (44.432411,26.0931385));\n listOfpoints.get(9).add(new LatLng (44.4327022,26.0925163));\n listOfpoints.get(9).add(new LatLng (44.4328401,26.0919584));\n listOfpoints.get(9).add(new LatLng (44.4329014, 26.0913576));\n listOfpoints.get(9).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(9).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(9).add(new LatLng (44.4265882, 26.0922588));\n listOfpoints.get(9).add(new LatLng (44.4269867,26.0926879));\n listOfpoints.get(9).add(new LatLng (44.4267108,26.0998763));\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n\n\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(10).add(new LatLng (44.4215507, 26.0903665));\n listOfpoints.get(10).add(new LatLng (44.4255811,26.0980483));\n listOfpoints.get(10).add(new LatLng ( 44.4265772,26.0999795));\n listOfpoints.get(10).add(new LatLng (44.4266998,26.099722));\n listOfpoints.get(10).add(new LatLng (44.4269867, 26.0926879));\n listOfpoints.get(10).add(new LatLng (44.4265882,26.0922588));\n listOfpoints.get(10).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n\n\n listOfpoints.get(11).add(new LatLng (44.4214281, 26.0905382));\n listOfpoints.get(11).add(new LatLng (44.4207385, 26.0915467));\n listOfpoints.get(11).add(new LatLng (44.4199568, 26.0929629));\n listOfpoints.get(11).add(new LatLng (44.4192059,26.0943576));\n listOfpoints.get(11).add(new LatLng (44.4187155,26.095409));\n listOfpoints.get(11).add(new LatLng (44.4186235,26.0957524));\n listOfpoints.get(11).add(new LatLng (44.4189607, 26.0968253));\n listOfpoints.get(11).add(new LatLng (44.4212442,26.1039063));\n listOfpoints.get(11).add(new LatLng (44.4227001,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.4251367,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.425765,26.103799));\n listOfpoints.get(11).add(new LatLng (44.425811,26.1027476));\n listOfpoints.get(11).add(new LatLng (44.4259182,26.101503));\n listOfpoints.get(11).add(new LatLng (44.4260715,26.1009237));\n listOfpoints.get(11).add(new LatLng (44.4264086,26.1001297));\n listOfpoints.get(11).add(new LatLng (44.4260255, 26.0993143));\n listOfpoints.get(11).add(new LatLng (44.4252899, 26.0978981));\n listOfpoints.get(11).add(new LatLng (44.424064,26.0955593));\n listOfpoints.get(11).add(new LatLng (44.4230372,26.0935851));\n listOfpoints.get(11).add(new LatLng (44.4214281,26.0905382));\n\n\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n listOfpoints.get(12).add(new LatLng (44.4216123,26.1052654));\n listOfpoints.get(12).add(new LatLng (44.4226851,26.1084411));\n listOfpoints.get(12).add(new LatLng (44.4237731,26.1117241));\n listOfpoints.get(12).add(new LatLng (44.4244168,26.11181));\n listOfpoints.get(12).add(new LatLng (44.4263629,26.1118743));\n listOfpoints.get(12).add(new LatLng (44.4264242,26.1109946));\n listOfpoints.get(12).add(new LatLng (44.4265315,26.1078832));\n listOfpoints.get(12).add(new LatLng (44.4267154,26.1041496));\n listOfpoints.get(12).add(new LatLng (44.4254588, 26.1042354));\n listOfpoints.get(12).add(new LatLng (44.4242482,26.1041925));\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n\n\n\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n listOfpoints.get(13).add(new LatLng (44.4208987, 26.1041756));\n listOfpoints.get(13).add(new LatLng (44.4155345,26.1045404));\n listOfpoints.get(13).add(new LatLng (44.4156111, 26.1051198));\n listOfpoints.get(13).add(new LatLng (44.4156724, 26.106257));\n listOfpoints.get(13).add(new LatLng (44.4157184,26.1068793));\n listOfpoints.get(13).add(new LatLng (44.4157797, 26.1071153));\n listOfpoints.get(13).add(new LatLng (44.415841, 26.1077805));\n listOfpoints.get(13).add(new LatLng (44.4159024,26.1090465));\n listOfpoints.get(13).add(new LatLng (44.416025,26.1110635));\n listOfpoints.get(13).add(new LatLng (44.4161629,26.1116643));\n listOfpoints.get(13).add(new LatLng (44.4163468, 26.112072));\n listOfpoints.get(13).add(new LatLng (44.4166993,26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4170518, 26.1133595));\n listOfpoints.get(13).add(new LatLng (44.4177109, 26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4184006,26.1118575));\n listOfpoints.get(13).add(new LatLng (44.4190136,26.1112566));\n listOfpoints.get(13).add(new LatLng (44.4199331, 26.1107846));\n listOfpoints.get(13).add(new LatLng (44.4215883,26.1101838));\n listOfpoints.get(13).add(new LatLng (44.4229369,26.10954));\n listOfpoints.get(13).add(new LatLng (44.422753, 26.1089178));\n listOfpoints.get(13).add(new LatLng (44.4222626,26.1074372));\n listOfpoints.get(13).add(new LatLng (44.4217262,26.1059137));\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n\n\n\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n listOfpoints.get(14).add(new LatLng (44.4169314,26.1139266));\n listOfpoints.get(14).add(new LatLng (44.4177284,26.1143128));\n listOfpoints.get(14).add(new LatLng (44.4185253,26.1147205));\n listOfpoints.get(14).add(new LatLng (44.4237666,26.1189047));\n listOfpoints.get(14).add(new LatLng (44.4237819,26.1191408));\n listOfpoints.get(14).add(new LatLng (44.4240425,26.1191622));\n listOfpoints.get(14).add(new LatLng (44.4258814,26.1192481));\n listOfpoints.get(14).add(new LatLng (44.425912,26.1188404));\n listOfpoints.get(14).add(new LatLng (44.426004,26.1167804));\n listOfpoints.get(14).add(new LatLng (44.4261113,26.1148063));\n listOfpoints.get(14).add(new LatLng (44.4262798,26.1120812));\n listOfpoints.get(14).add(new LatLng (44.4238739,26.1119525));\n listOfpoints.get(14).add(new LatLng (44.4235674,26.1115662));\n listOfpoints.get(14).add(new LatLng (44.4230157,26.109914));\n listOfpoints.get(14).add(new LatLng (44.4218817,26.1103646));\n listOfpoints.get(14).add(new LatLng (44.4200733,26.1110512));\n listOfpoints.get(14).add(new LatLng (44.4187246,26.1118666));\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n\n\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n listOfpoints.get(15).add(new LatLng (44.4334184,26.0843973));\n listOfpoints.get(15).add(new LatLng (44.4305378,26.0839467));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0840969));\n listOfpoints.get(15).add(new LatLng (44.4305531,26.0845475));\n listOfpoints.get(15).add(new LatLng (44.4306604,26.0853844));\n listOfpoints.get(15).add(new LatLng (44.4302773,26.0908131));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0910277));\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n\n\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n listOfpoints.get(16).add(new LatLng (44.4252956,26.0790543));\n listOfpoints.get(16).add(new LatLng (44.4246213,26.0901265));\n listOfpoints.get(16).add(new LatLng (44.4247746,26.0905127));\n listOfpoints.get(16).add(new LatLng (44.4298621,26.0909634));\n listOfpoints.get(16).add(new LatLng (44.4300919,26.0907273));\n listOfpoints.get(16).add(new LatLng (44.430475,26.0853414));\n listOfpoints.get(16).add(new LatLng ( 44.4291112,26.0806422));\n listOfpoints.get(16).add(new LatLng (44.428391,26.0795693));\n listOfpoints.get(16).add(new LatLng (44.4277781,26.0794835));\n listOfpoints.get(16).add(new LatLng (44.42574,26.0784535));\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n\n\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n listOfpoints.get(17).add(new LatLng (44.433312,26.1178736));\n listOfpoints.get(17).add(new LatLng (44.4331128,26.1208562));\n listOfpoints.get(17).add(new LatLng (44.4327757,26.1238603));\n listOfpoints.get(17).add(new LatLng (44.4325765,26.1256413));\n listOfpoints.get(17).add(new LatLng (44.4354264,26.1251477));\n listOfpoints.get(17).add(new LatLng (44.4389196,26.122723));\n listOfpoints.get(17).add(new LatLng (44.4391954,26.1224012));\n listOfpoints.get(17).add(new LatLng (44.4381383,26.1165003));\n listOfpoints.get(17).add(new LatLng (44.4368666,26.1169724));\n listOfpoints.get(17).add(new LatLng (44.4364683,26.1169295));\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n\n\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n listOfpoints.get(18).add(new LatLng (44.4453896, 26.0909388));\n listOfpoints.get(18).add(new LatLng (44.4444245,26.0918185));\n listOfpoints.get(18).add(new LatLng (44.4428313, 26.093342));\n listOfpoints.get(18).add(new LatLng (44.4413912,26.0947797));\n listOfpoints.get(18).add(new LatLng (44.4405333,26.0959169));\n listOfpoints.get(18).add(new LatLng (44.4419274,26.0990069));\n listOfpoints.get(18).add(new LatLng (44.4433368,26.0983202));\n listOfpoints.get(18).add(new LatLng (44.4452824,26.0973761));\n listOfpoints.get(18).add(new LatLng (44.446707,26.0966894));\n listOfpoints.get(18).add(new LatLng (44.4468296,26.0961959));\n listOfpoints.get(18).add(new LatLng (44.4465385,26.0945651));\n listOfpoints.get(18).add(new LatLng (44.4462628,26.0935351));\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n\n\n listOfpoints.get(19).add(new LatLng (44.4401196,26.0817507));\n listOfpoints.get(19).add(new LatLng (44.4401043,26.0831669));\n listOfpoints.get(19).add(new LatLng (44.4402115,26.0846046));\n listOfpoints.get(19).add(new LatLng (44.440089,26.0863641));\n listOfpoints.get(19).add(new LatLng (44.4399358,26.0894755));\n listOfpoints.get(19).add(new LatLng ( 44.4402115, 26.0932949));\n listOfpoints.get(19).add(new LatLng (44.4407937,26.0953763));\n listOfpoints.get(19).add(new LatLng (44.440855,26.0952047));\n listOfpoints.get(19).add(new LatLng (44.4450832,26.0910419));\n listOfpoints.get(19).add(new LatLng (44.4454509,26.0905698));\n listOfpoints.get(19).add(new LatLng (44.4445011,26.0879949));\n listOfpoints.get(19).add(new LatLng (44.4437964,26.0862783));\n listOfpoints.get(19).add(new LatLng (44.4434287,26.0840681));\n listOfpoints.get(19).add(new LatLng (44.443061, 26.0812143));\n listOfpoints.get(19).add(new LatLng (44.4423257, 26.0809997));\n listOfpoints.get(19).add(new LatLng (44.4419887, 26.0810211));\n listOfpoints.get(19).add(new LatLng (44.4411767, 26.0813215));\n listOfpoints.get(19).add(new LatLng (44.4401196, 26.0817507));\n\n\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n listOfpoints.get(20).add(new LatLng (44.4145114,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.0990294));\n listOfpoints.get(20).add(new LatLng (44.4143735, 26.0993727));\n listOfpoints.get(20).add(new LatLng (44.4144195, 26.0998233));\n listOfpoints.get(20).add(new LatLng (44.4142969, 26.1008104));\n listOfpoints.get(20).add(new LatLng (44.4140976,26.1009177));\n listOfpoints.get(20).add(new LatLng (44.4138983,26.1008962));\n listOfpoints.get(20).add(new LatLng (44.4138064,26.1006602));\n listOfpoints.get(20).add(new LatLng (44.4137451,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4130247,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4127335,26.0984286));\n listOfpoints.get(20).add(new LatLng (44.4113386,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4102503, 26.0985788));\n listOfpoints.get(20).add(new LatLng (44.414021,26.1043509));\n listOfpoints.get(20).add(new LatLng (44.4143122,26.1043938));\n listOfpoints.get(20).add(new LatLng (44.4159522,26.1042865));\n listOfpoints.get(20).add(new LatLng (44.4191554,26.104029));\n listOfpoints.get(20).add(new LatLng (44.4210711,26.1038574));\n listOfpoints.get(20).add(new LatLng (44.4208259,26.1030205));\n listOfpoints.get(20).add(new LatLng (44.4203508,26.1016258));\n listOfpoints.get(20).add(new LatLng (44.4198297,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4192167, 26.0981067));\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n\n\n listOfpoints.get(21).add(new LatLng (44.410189,26.0984071));\n listOfpoints.get(21).add(new LatLng (44.4103883,26.0984715));\n listOfpoints.get(21).add(new LatLng (44.4128867,26.0983213));\n listOfpoints.get(21).add(new LatLng (44.4138524, 26.1000594));\n listOfpoints.get(21).add(new LatLng (44.4138524,26.1004671));\n listOfpoints.get(21).add(new LatLng (44.4139597,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4141742,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.1003812));\n listOfpoints.get(21).add(new LatLng (44.4143275,26.0996946));\n listOfpoints.get(21).add(new LatLng (44.4141589,26.0986646));\n listOfpoints.get(21).add(new LatLng (44.418435,26.0957464));\n listOfpoints.get(21).add(new LatLng (44.4190021,26.0946306));\n listOfpoints.get(21).add(new LatLng (44.4183737,26.0934504));\n listOfpoints.get(21).add(new LatLng (44.4176534, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4165652, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4155996,26.0927423));\n listOfpoints.get(21).add(new LatLng (44.4149406,26.0921415));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.0919055));\n listOfpoints.get(21).add(new LatLng (44.412994, 26.0920986));\n listOfpoints.get(21).add(new LatLng (44.4098211,26.0943945));\n listOfpoints.get(21).add(new LatLng (44.4096679,26.0947164));\n listOfpoints.get(21).add(new LatLng (44.4096985, 26.0953816));\n listOfpoints.get(21).add(new LatLng (44.4088401, 26.0962399));\n listOfpoints.get(21).add(new LatLng (44.4088248,26.0966047));\n listOfpoints.get(21).add(new LatLng (44.410189, 26.0984071));\n\n\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n listOfpoints.get(22).add(new LatLng (44.4252745,26.0779102));\n listOfpoints.get(22).add(new LatLng (44.426102,26.0783394));\n listOfpoints.get(22).add(new LatLng (44.4286458, 26.079541));\n listOfpoints.get(22).add(new LatLng (44.4293813,26.0807855));\n listOfpoints.get(22).add(new LatLng (44.4303313,26.0837038));\n listOfpoints.get(22).add(new LatLng (44.4329668,26.08409));\n listOfpoints.get(22).add(new LatLng (44.4335797,26.0839613));\n listOfpoints.get(22).add(new LatLng (44.4337023,26.0821159));\n listOfpoints.get(22).add(new LatLng (44.4339474,26.0797556));\n listOfpoints.get(22).add(new LatLng (44.434499,26.078039));\n listOfpoints.get(22).add(new LatLng (44.4358473,26.0748632));\n listOfpoints.get(22).add(new LatLng (44.4351732,26.073962));\n listOfpoints.get(22).add(new LatLng (44.433212,26.0710867));\n listOfpoints.get(22).add(new LatLng (44.4312201,26.0683401));\n listOfpoints.get(22).add(new LatLng (44.4299329,26.067396));\n listOfpoints.get(22).add(new LatLng (44.4283087,26.0655506));\n listOfpoints.get(22).add(new LatLng (44.4274812,26.0668381));\n listOfpoints.get(22).add(new LatLng (44.4261633,26.0691984));\n listOfpoints.get(22).add(new LatLng (44.4249374,26.0715587));\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n\n\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n listOfpoints.get(23).add(new LatLng (44.4169069,26.0695417));\n listOfpoints.get(23).add(new LatLng (44.4131364,26.073447));\n listOfpoints.get(23).add(new LatLng (44.4139948,26.0749491));\n listOfpoints.get(23).add(new LatLng (44.4156807,26.0782106));\n listOfpoints.get(23).add(new LatLng (44.4178265,26.0819443));\n listOfpoints.get(23).add(new LatLng (44.4184089,26.0840471));\n listOfpoints.get(23).add(new LatLng (44.4213514,26.0900982));\n listOfpoints.get(23).add(new LatLng (44.4240486, 26.0903986));\n listOfpoints.get(23).add(new LatLng (44.424447,26.0897978));\n listOfpoints.get(23).add(new LatLng (44.4252132,26.0783394));\n listOfpoints.get(23).add(new LatLng (44.4236808, 26.0737474));\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n\n\n\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(24).add(new LatLng (44.442854,26.1011417));\n listOfpoints.get(24).add(new LatLng (44.4434668,26.1027725));\n listOfpoints.get(24).add(new LatLng (44.4430685, 26.1033304));\n listOfpoints.get(24).add(new LatLng (44.4430685,26.1047895));\n listOfpoints.get(24).add(new LatLng (44.4437732,26.1076648));\n listOfpoints.get(24).add(new LatLng (44.4446617,26.1085661));\n listOfpoints.get(24).add(new LatLng (44.4461629,26.1092956));\n listOfpoints.get(24).add(new LatLng (44.447174,26.1100252));\n listOfpoints.get(24).add(new LatLng (44.4473272,26.108609));\n listOfpoints.get(24).add(new LatLng (44.4480624,26.107064));\n listOfpoints.get(24).add(new LatLng (44.4480931,26.1060341));\n listOfpoints.get(24).add(new LatLng (44.4476948,26.1029871));\n listOfpoints.get(24).add(new LatLng (44.448522, 26.1028583));\n listOfpoints.get(24).add(new LatLng (44.4499006,26.102515));\n listOfpoints.get(24).add(new LatLng (44.4509729, 26.101485));\n listOfpoints.get(24).add(new LatLng (44.4529335,26.1007555));\n listOfpoints.get(24).add(new LatLng (44.452719,26.0935457));\n listOfpoints.get(24).add(new LatLng (44.4521063,26.0865934));\n listOfpoints.get(24).add(new LatLng (44.4506359,26.0897262));\n listOfpoints.get(24).add(new LatLng (44.4472046,26.0966785));\n listOfpoints.get(24).add(new LatLng (44.4465306,26.0971077));\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n\n\n listOfpoints.get(25).add(new LatLng (44.3944544,26.1201103));\n listOfpoints.get(25).add(new LatLng (44.3948837,26.1205394));\n listOfpoints.get(25).add(new LatLng (44.400587,26.1207969));\n listOfpoints.get(25).add(new LatLng (44.4069336,26.1209686));\n listOfpoints.get(25).add(new LatLng (44.4075468,26.1204536));\n listOfpoints.get(25).add(new LatLng (44.4081599,26.119252));\n listOfpoints.get(25).add(new LatLng (44.4083439, 26.1177499));\n listOfpoints.get(25).add(new LatLng (44.4084665, 26.1148317));\n listOfpoints.get(25).add(new LatLng (44.4090183,26.1131151));\n listOfpoints.get(25).add(new LatLng (44.4102139, 26.1109693));\n listOfpoints.get(25).add(new LatLng (44.411992,26.106549));\n listOfpoints.get(25).add(new LatLng (44.4128197, 26.105562));\n listOfpoints.get(25).add(new LatLng (44.4140152, 26.1047037));\n listOfpoints.get(25).add(new LatLng (44.4105512, 26.099468));\n listOfpoints.get(25).add(new LatLng (44.4088344, 26.0971077));\n listOfpoints.get(25).add(new LatLng (44.4074854,26.0960777));\n listOfpoints.get(25).add(new LatLng (44.4067803, 26.0957773));\n listOfpoints.get(25).add(new LatLng (44.4047262, 26.096936));\n listOfpoints.get(25).add(new LatLng (44.4024267, 26.098481));\n listOfpoints.get(25).add(new LatLng (44.4015068, 26.0996826));\n listOfpoints.get(25).add(new LatLng (44.3998818, 26.1055191));\n listOfpoints.get(25).add(new LatLng (44.3944544, 26.1201103));\n\n\n\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4526408,26.0898486));\n listOfpoints.get(26).add(new LatLng (44.4530697,26.0983887));\n listOfpoints.get(26).add(new LatLng (44.4558573,26.0971013));\n listOfpoints.get(26).add(new LatLng ( 44.4622592,26.0925522));\n listOfpoints.get(26).add(new LatLng ( 44.4635762, 26.0910073));\n listOfpoints.get(26).add(new LatLng (44.4658121,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4631474,26.0864153));\n listOfpoints.get(26).add(new LatLng (44.4534067,26.0861578));\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n\n\n\n listOfpoints.get(27).add(new LatLng (44.4346864, 26.0895482));\n listOfpoints.get(27).add(new LatLng (44.4398343, 26.0864583));\n listOfpoints.get(27).add(new LatLng (44.439865,26.0816947));\n listOfpoints.get(27).add(new LatLng (44.4420098,26.0807076));\n listOfpoints.get(27).add(new LatLng (44.4429903, 26.0808793));\n listOfpoints.get(27).add(new LatLng (44.4426532,26.0791626));\n listOfpoints.get(27).add(new LatLng (44.4405084, 26.0729399));\n listOfpoints.get(27).add(new LatLng (44.440202, 26.0727253));\n listOfpoints.get(27).add(new LatLng (44.4384555, 26.0702363));\n listOfpoints.get(27).add(new LatLng (44.4362186, 26.0744849));\n listOfpoints.get(27).add(new LatLng (44.4344413,26.0792914));\n listOfpoints.get(27).add(new LatLng (44.4346864,26.0895482));\n\n\n\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n listOfpoints.get(28).add(new LatLng (44.443061,26.0812143));\n listOfpoints.get(28).add(new LatLng (44.4437562,26.0855141));\n listOfpoints.get(28).add(new LatLng (44.4440626,26.0866299));\n listOfpoints.get(28).add(new LatLng (44.444798, 26.0884753));\n listOfpoints.get(28).add(new LatLng (44.4465443,26.0937539));\n listOfpoints.get(28).add(new LatLng (44.4468813,26.0958138));\n listOfpoints.get(28).add(new LatLng (44.4471264,26.0961142));\n listOfpoints.get(28).add(new LatLng (44.4492097, 26.0919943));\n listOfpoints.get(28).add(new LatLng (44.4507109,26.0889473));\n listOfpoints.get(28).add(new LatLng (44.4519056, 26.0864153));\n listOfpoints.get(28).add(new LatLng (44.4518137,26.0848275));\n listOfpoints.get(28).add(new LatLng (44.4481987, 26.0827246));\n listOfpoints.get(28).add(new LatLng (44.4455026,26.081523));\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n\n\n\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n listOfpoints.get(29).add(new LatLng (44.437967, 26.115168));\n listOfpoints.get(29).add(new LatLng (44.4410924, 26.131905));\n listOfpoints.get(29).add(new LatLng (44.4413375,26.1327204));\n listOfpoints.get(29).add(new LatLng (44.443758, 26.1284717));\n listOfpoints.get(29).add(new LatLng (44.4467299, 26.1259827));\n listOfpoints.get(29).add(new LatLng (44.4480167,26.1254248));\n listOfpoints.get(29).add(new LatLng (44.4491809, 26.124266));\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n\n\n listOfpoints.get(30).add(new LatLng (44.4129016,26.0735409));\n listOfpoints.get(30).add(new LatLng (44.4072915,26.0791628));\n listOfpoints.get(30).add(new LatLng (44.4031525,26.0816948));\n listOfpoints.get(30).add(new LatLng (44.4003317,26.0844414));\n listOfpoints.get(30).add(new LatLng (44.3973268,26.0850422));\n listOfpoints.get(30).add(new LatLng (44.4005463,26.0880463));\n listOfpoints.get(30).add(new LatLng (44.4017115, 26.0912221));\n listOfpoints.get(30).add(new LatLng (44.4043176,26.0963719));\n listOfpoints.get(30).add(new LatLng (44.4048695, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4060652,26.0956423));\n listOfpoints.get(30).add(new LatLng (44.4070462,26.0953848));\n listOfpoints.get(30).add(new LatLng (44.4084871, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4094682, 26.0951703));\n listOfpoints.get(30).add(new LatLng (44.4094375, 26.0944836));\n listOfpoints.get(30).add(new LatLng (44.4132388, 26.09178));\n listOfpoints.get(30).add(new LatLng (44.4145263, 26.091737));\n listOfpoints.get(30).add(new LatLng (44.4163656,26.0929387));\n listOfpoints.get(30).add(new LatLng (44.4183273,26.0930674));\n listOfpoints.get(30).add(new LatLng (44.4189404,26.0941832));\n listOfpoints.get(30).add(new LatLng (44.4212086, 26.0904067));\n listOfpoints.get(30).add(new LatLng (44.4210553,26.0898488));\n listOfpoints.get(30).add(new LatLng (44.4186339, 26.0850852));\n listOfpoints.get(30).add(new LatLng (44.4181741,26.0840123));\n listOfpoints.get(30).add(new LatLng (44.4176836, 26.0822527));\n listOfpoints.get(30).add(new LatLng (44.4171932,26.0813944));\n listOfpoints.get(30).add(new LatLng (44.4150781, 26.077575));\n listOfpoints.get(30).add(new LatLng (44.4129016, 26.0735409));\n\n\n\n listOfpoints.get(31).add(new LatLng (44.4152528, 26.1045537));\n listOfpoints.get(31).add(new LatLng (44.4142412, 26.1048541));\n listOfpoints.get(31).add(new LatLng (44.4125552,26.1062274));\n listOfpoints.get(31).add(new LatLng (44.4118501,26.1074291));\n listOfpoints.get(31).add(new LatLng (44.4107158,26.1103473));\n listOfpoints.get(31).add(new LatLng (44.4093976,26.1127935));\n listOfpoints.get(31).add(new LatLng (44.4087844, 26.1144243));\n listOfpoints.get(31).add(new LatLng (44.4085392, 26.1156259));\n listOfpoints.get(31).add(new LatLng (44.4085392,26.1170421));\n listOfpoints.get(31).add(new LatLng (44.4083246, 26.1195741));\n listOfpoints.get(31).add(new LatLng (44.4074355, 26.1209903));\n listOfpoints.get(31).add(new LatLng (44.409183, 26.1223636));\n listOfpoints.get(31).add(new LatLng (44.4168774, 26.1136518));\n listOfpoints.get(31).add(new LatLng (44.4158658, 26.1113344));\n listOfpoints.get(31).add(new LatLng (44.4156513, 26.1077295));\n listOfpoints.get(31).add(new LatLng (44.4152528,26.1045537));\n\n\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n listOfpoints.get(32).add(new LatLng (44.4164766, 26.114537));\n listOfpoints.get(32).add(new LatLng (44.4110201,26.120631));\n listOfpoints.get(32).add(new LatLng (44.4094872,26.122648));\n listOfpoints.get(32).add(new LatLng (44.4131046, 26.1296003));\n listOfpoints.get(32).add(new LatLng (44.4151891, 26.1329906));\n listOfpoints.get(32).add(new LatLng (44.4171203, 26.1348789));\n listOfpoints.get(32).add(new LatLng (44.4201242, 26.1365526));\n listOfpoints.get(32).add(new LatLng (44.4204001,26.1351364));\n listOfpoints.get(32).add(new LatLng (44.4206759, 26.1333339));\n listOfpoints.get(32).add(new LatLng (44.42181,26.1313169));\n listOfpoints.get(32).add(new LatLng (44.4228827, 26.1314028));\n listOfpoints.get(32).add(new LatLng (44.4255799, 26.1284845));\n listOfpoints.get(32).add(new LatLng (44.4256412, 26.1274975));\n listOfpoints.get(32).add(new LatLng (44.4257638, 26.1234634));\n listOfpoints.get(32).add(new LatLng (44.425917, 26.1195152));\n listOfpoints.get(32).add(new LatLng (44.4238635, 26.1194294));\n listOfpoints.get(32).add(new LatLng (44.4193273,26.115567));\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n\n\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n listOfpoints.get(33).add(new LatLng (44.4255799,26.1284845));\n listOfpoints.get(33).add(new LatLng (44.4318104,26.1386596));\n listOfpoints.get(33).add(new LatLng (44.4320863,26.1385309));\n listOfpoints.get(33).add(new LatLng (44.4313814,26.1329948));\n listOfpoints.get(33).add(new LatLng (44.4316879,26.129819));\n listOfpoints.get(33).add(new LatLng (44.4326992,26.1229526));\n listOfpoints.get(33).add(new LatLng (44.4328861,26.1207289));\n listOfpoints.get(33).add(new LatLng (44.4300024, 26.1205493));\n listOfpoints.get(33).add(new LatLng (44.4288684,26.1196481));\n listOfpoints.get(33).add(new LatLng (44.4275797,26.1191541));\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n\n\n listOfpoints.get(34).add(new LatLng (44.4202782, 26.1364709));\n listOfpoints.get(34).add(new LatLng (44.4204314,26.1366855));\n listOfpoints.get(34).add(new LatLng (44.4255806,26.1375009));\n listOfpoints.get(34).add(new LatLng (44.4293579,26.1390888));\n listOfpoints.get(34).add(new LatLng (44.4303615,26.139196));\n listOfpoints.get(34).add(new LatLng (44.4317406,26.1386596));\n listOfpoints.get(34).add(new LatLng (44.4266686,26.1303877));\n listOfpoints.get(34).add(new LatLng (44.4255882,26.128596));\n listOfpoints.get(34).add(new LatLng (44.4250212,26.1291968));\n listOfpoints.get(34).add(new LatLng (44.4230214, 26.1315571));\n listOfpoints.get(34).add(new LatLng (44.4227685,26.1316644));\n listOfpoints.get(34).add(new LatLng (44.4217877,26.1315678));\n listOfpoints.get(34).add(new LatLng (44.4207762,26.1334668));\n listOfpoints.get(34).add(new LatLng (44.4202782,26.1364709));\n\n\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n listOfpoints.get(35).add(new LatLng (44.4437985,26.1194425));\n listOfpoints.get(35).add(new LatLng (44.4469926,26.1222749));\n listOfpoints.get(35).add(new LatLng (44.4492443, 26.1240881));\n listOfpoints.get(35).add(new LatLng (44.4504315,26.123144));\n listOfpoints.get(35).add(new LatLng (44.4512893,26.1217492));\n listOfpoints.get(35).add(new LatLng (44.451421, 26.1212347));\n listOfpoints.get(35).add(new LatLng (44.4523401, 26.1180161));\n listOfpoints.get(35).add(new LatLng (44.4527077, 26.1145399));\n listOfpoints.get(35).add(new LatLng (44.452944, 26.1009052));\n listOfpoints.get(35).add(new LatLng (44.4516573,26.1013558));\n listOfpoints.get(35).add(new LatLng (44.4510217,26.1016777));\n listOfpoints.get(35).add(new LatLng (44.4500413,26.1025574));\n listOfpoints.get(35).add(new LatLng (44.449712,26.1027291));\n listOfpoints.get(35).add(new LatLng (44.4477666,26.1031153));\n listOfpoints.get(35).add(new LatLng (44.4479198,26.1042526));\n listOfpoints.get(35).add(new LatLng (44.448027,26.1051967));\n listOfpoints.get(35).add(new LatLng (44.4481419,26.1058619));\n listOfpoints.get(35).add(new LatLng (44.4481189, 26.1070206));\n listOfpoints.get(35).add(new LatLng (44.448004,26.1073425));\n listOfpoints.get(35).add(new LatLng (44.4473836,26.1088338));\n listOfpoints.get(35).add(new LatLng (44.4472917,26.1100569));\n listOfpoints.get(35).add(new LatLng (44.4471385, 26.1102929));\n listOfpoints.get(35).add(new LatLng (44.4469241,26.1116877));\n listOfpoints.get(35).add(new LatLng (44.4469394,26.1122456));\n listOfpoints.get(35).add(new LatLng (44.4467403,26.1136403));\n listOfpoints.get(35).add(new LatLng (44.445959,26.1161938));\n listOfpoints.get(35).add(new LatLng (44.4448254,26.1176744));\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n\n\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n listOfpoints.get(36).add(new LatLng (44.4372662,26.123983));\n listOfpoints.get(36).add(new LatLng (44.4356115, 26.1252275));\n listOfpoints.get(36).add(new LatLng (44.4344471, 26.1254207));\n listOfpoints.get(36).add(new LatLng (44.4324705,26.1258069));\n listOfpoints.get(36).add(new LatLng (44.4315052, 26.1327377));\n listOfpoints.get(36).add(new LatLng (44.432256,26.1385742));\n listOfpoints.get(36).add(new LatLng (44.4351059,26.1373511));\n listOfpoints.get(36).add(new LatLng (44.4376339, 26.1363641));\n listOfpoints.get(36).add(new LatLng (44.4389822, 26.1353985));\n listOfpoints.get(36).add(new LatLng (44.4401772,26.1345402));\n listOfpoints.get(36).add(new LatLng (44.4411883, 26.1334458));\n listOfpoints.get(36).add(new LatLng (44.4402231, 26.1281458));\n listOfpoints.get(36).add(new LatLng (44.4398861,26.126279));\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n\n\n\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n listOfpoints.get(37).add(new LatLng (44.3977135, 26.1097995));\n listOfpoints.get(37).add(new LatLng (44.3909519,26.1099282));\n listOfpoints.get(37).add(new LatLng (44.3874558, 26.1100784));\n listOfpoints.get(37).add(new LatLng (44.3877779, 26.1129538));\n listOfpoints.get(37).add(new LatLng (44.3881766, 26.1154428));\n listOfpoints.get(37).add(new LatLng (44.3886059, 26.1165586));\n listOfpoints.get(37).add(new LatLng (44.3894799, 26.1180178));\n listOfpoints.get(37).add(new LatLng (44.3906606, 26.1193052));\n listOfpoints.get(37).add(new LatLng (44.3927152, 26.1205927));\n listOfpoints.get(37).add(new LatLng (44.3936352, 26.1206785));\n listOfpoints.get(37).add(new LatLng (44.3940339, 26.1202279));\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n\n\n\n listOfpoints.get(38).add(new LatLng (44.389256,26.0917973));\n listOfpoints.get(38).add(new LatLng (44.3892556,26.0920523));\n listOfpoints.get(38).add(new LatLng (44.4003643, 26.0970731));\n listOfpoints.get(38).add(new LatLng (44.4008548, 26.0971482));\n listOfpoints.get(38).add(new LatLng (44.4030625, 26.0971601));\n listOfpoints.get(38).add(new LatLng (44.4043195,26.0965593));\n listOfpoints.get(38).add(new LatLng (44.4019587, 26.0920531));\n listOfpoints.get(38).add(new LatLng (44.4005636,26.0883195));\n listOfpoints.get(38).add(new LatLng (44.3987104,26.0864919));\n listOfpoints.get(38).add(new LatLng (44.3972443, 26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3961557,26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3946992,26.0841584));\n listOfpoints.get(38).add(new LatLng (44.3918473,26.0856819));\n listOfpoints.get(38).add(new LatLng (44.3912493,26.08639));\n listOfpoints.get(38).add(new LatLng (44.389256, 26.0917973));\n\n\n\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n listOfpoints.get(39).add(new LatLng (44.4011008,26.0974224));\n listOfpoints.get(39).add(new LatLng (44.399997,26.0972078));\n listOfpoints.get(39).add(new LatLng (44.389065,26.0922189));\n listOfpoints.get(39).add(new LatLng (44.3863339,26.0922418));\n listOfpoints.get(39).add(new LatLng (44.387806,26.0981212));\n listOfpoints.get(39).add(new LatLng (44.3887261,26.1004386));\n listOfpoints.get(39).add(new LatLng (44.3889714,26.1023269));\n listOfpoints.get(39).add(new LatLng (44.3887567,26.1040435));\n listOfpoints.get(39).add(new LatLng (44.3875607,26.1097513));\n listOfpoints.get(39).add(new LatLng (44.3977341,26.1097306));\n listOfpoints.get(39).add(new LatLng (44.3979142,26.1101973));\n listOfpoints.get(39).add(new LatLng (44.397964,26.1101222));\n listOfpoints.get(39).add(new LatLng (44.3996198,26.1059165));\n listOfpoints.get(39).add(new LatLng (44.4016128,26.0990715));\n listOfpoints.get(39).add(new LatLng (44.4030402,26.0978593));\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n\n\n\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n listOfpoints.get(40).add(new LatLng (44.4494277,26.1245701));\n listOfpoints.get(40).add(new LatLng (44.4610682, 26.1325953));\n listOfpoints.get(40).add(new LatLng (44.4618646,26.1326811));\n listOfpoints.get(40).add(new LatLng (44.4644374, 26.1345265));\n listOfpoints.get(40).add(new LatLng (44.4660607, 26.1368439));\n listOfpoints.get(40).add(new LatLng (44.4665813,26.1365435));\n listOfpoints.get(40).add(new LatLng (44.4663976,26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4667345, 26.1349985));\n listOfpoints.get(40).add(new LatLng (44.4681739, 26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4701952, 26.1371014));\n listOfpoints.get(40).add(new LatLng (44.4719714, 26.1368868));\n listOfpoints.get(40).add(new LatLng (44.4730739, 26.1358998));\n listOfpoints.get(40).add(new LatLng (44.4731964,26.1346981));\n listOfpoints.get(40).add(new LatLng (44.4687252,26.1305783));\n listOfpoints.get(40).add(new LatLng (44.466857,26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4662751, 26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4658769, 26.1300633));\n listOfpoints.get(40).add(new LatLng (44.4666426, 26.129162));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1285183));\n listOfpoints.get(40).add(new LatLng (44.4697971, 26.1290333));\n listOfpoints.get(40).add(new LatLng (44.4723389, 26.1319945));\n listOfpoints.get(40).add(new LatLng (44.4743294,26.1327669));\n listOfpoints.get(40).add(new LatLng (44.4750338,26.1320374));\n listOfpoints.get(40).add(new LatLng (44.4756462,26.1297199));\n listOfpoints.get(40).add(new LatLng (44.4742376,26.1249563));\n listOfpoints.get(40).add(new LatLng (44.4742988, 26.1238835));\n listOfpoints.get(40).add(new LatLng (44.4741457,26.1231968));\n listOfpoints.get(40).add(new LatLng (44.4676533,26.1269734));\n listOfpoints.get(40).add(new LatLng (44.4668876,26.1267588));\n listOfpoints.get(40).add(new LatLng (44.4649275,26.1207506));\n listOfpoints.get(40).add(new LatLng (44.4648662,26.120064));\n listOfpoints.get(40).add(new LatLng (44.4674389,26.118562));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1177895));\n listOfpoints.get(40).add(new LatLng (44.4710833,26.1160729));\n listOfpoints.get(40).add(new LatLng (44.4714202,26.1163304));\n listOfpoints.get(40).add(new LatLng (44.4722777,26.116502));\n listOfpoints.get(40).add(new LatLng (44.4729208,26.1131117));\n listOfpoints.get(40).add(new LatLng (44.4723083,26.1107084));\n listOfpoints.get(40).add(new LatLng (44.4725227,26.1095926));\n listOfpoints.get(40).add(new LatLng (44.4733801,26.1087343));\n listOfpoints.get(40).add(new LatLng (44.4735945, 26.1082194));\n listOfpoints.get(40).add(new LatLng (44.4700727,26.1101076));\n listOfpoints.get(40).add(new LatLng (44.4533184,26.1047861));\n listOfpoints.get(40).add(new LatLng (44.4531039,26.105344));\n listOfpoints.get(40).add(new LatLng (44.4528589,26.1152146));\n listOfpoints.get(40).add(new LatLng (44.4526138,26.1174891));\n listOfpoints.get(40).add(new LatLng (44.452093,26.1197207));\n listOfpoints.get(40).add(new LatLng (44.4508982,26.1229822));\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n\n\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n listOfpoints.get(41).add(new LatLng (44.4550165,26.1051764));\n listOfpoints.get(41).add(new LatLng (44.4698103,26.1097469));\n listOfpoints.get(41).add(new LatLng (44.4709588,26.1093392));\n listOfpoints.get(41).add(new LatLng (44.4739216,26.1077299));\n listOfpoints.get(41).add(new LatLng (44.4734929,26.1050262));\n listOfpoints.get(41).add(new LatLng (44.4721455,26.105155));\n listOfpoints.get(41).add(new LatLng (44.4701242,26.1040392));\n listOfpoints.get(41).add(new LatLng (44.467521, 26.101593));\n listOfpoints.get(41).add(new LatLng (44.4673067, 26.1001768));\n listOfpoints.get(41).add(new LatLng (44.4664185,26.099061));\n listOfpoints.get(41).add(new LatLng (44.4660816,26.0979023));\n listOfpoints.get(41).add(new LatLng (44.4662041,26.0968294));\n listOfpoints.get(41).add(new LatLng (44.4671535,26.0960569));\n listOfpoints.get(41).add(new LatLng (44.4677661,26.0958853));\n listOfpoints.get(41).add(new LatLng (44.4680723,26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4691748,26.0952415));\n listOfpoints.get(41).add(new LatLng (44.4720536,26.0967865));\n listOfpoints.get(41).add(new LatLng (44.4742278,26.0964861));\n listOfpoints.get(41).add(new LatLng (44.4749015, 26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4747178,26.0948124));\n listOfpoints.get(41).add(new LatLng (44.4719617,26.0923662));\n listOfpoints.get(41).add(new LatLng (44.4714717,26.0908642));\n listOfpoints.get(41).add(new LatLng (44.4717167,26.0897913));\n listOfpoints.get(41).add(new LatLng (44.4723598,26.0888901));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0894909));\n listOfpoints.get(41).add(new LatLng (44.4732785,26.0900917));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0907783));\n listOfpoints.get(41).add(new LatLng (44.4735235,26.0912075));\n listOfpoints.get(41).add(new LatLng (44.4740135,26.0907354));\n listOfpoints.get(41).add(new LatLng (44.4734316,26.0891046));\n listOfpoints.get(41).add(new LatLng (44.4724211,26.0881176));\n listOfpoints.get(41).add(new LatLng (44.4661428,26.0866585));\n listOfpoints.get(41).add(new LatLng (44.4639989,26.09095));\n listOfpoints.get(41).add(new LatLng (44.4621305,26.0931387));\n listOfpoints.get(41).add(new LatLng (44.4558053,26.0973375));\n listOfpoints.get(41).add(new LatLng (44.4531632,26.0985928));\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n\n\n\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n listOfpoints.get(42).add(new LatLng (44.4404676, 26.072638));\n listOfpoints.get(42).add(new LatLng (44.4426125, 26.0786676));\n listOfpoints.get(42).add(new LatLng (44.4427656, 26.0791182));\n listOfpoints.get(42).add(new LatLng (44.4429801, 26.0806202));\n listOfpoints.get(42).add(new LatLng (44.4461972, 26.0758781));\n listOfpoints.get(42).add(new LatLng ( 44.4465955, 26.0753846));\n listOfpoints.get(42).add(new LatLng ( 44.4468405, 26.0753202));\n listOfpoints.get(42).add(new LatLng (44.4474227, 26.0759639));\n listOfpoints.get(42).add(new LatLng (44.4501186, 26.0695052));\n listOfpoints.get(42).add(new LatLng ( 44.4472848, 26.063776));\n listOfpoints.get(42).add(new LatLng ( 44.4461972,26.0623597));\n listOfpoints.get(42).add(new LatLng (44.4454925, 26.0618233));\n listOfpoints.get(42).add(new LatLng ( 44.4442057,26.0612654));\n listOfpoints.get(42).add(new LatLng (44.4432099,26.0609435));\n listOfpoints.get(42).add(new LatLng ( 44.4429035,26.062467));\n listOfpoints.get(42).add(new LatLng (44.4385679, 26.0699558));\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n\n\n\n listOfpoints.get(43).add(new LatLng ( 44.4430787,26.0806953));\n listOfpoints.get(43).add(new LatLng ( 44.443126, 26.0810753));\n listOfpoints.get(43).add(new LatLng ( 44.4455924,26.0813757));\n listOfpoints.get(43).add(new LatLng (44.4467107,26.0816761));\n listOfpoints.get(43).add(new LatLng (44.4514593,26.0842939));\n listOfpoints.get(43).add(new LatLng (44.4518575,26.0844441));\n listOfpoints.get(43).add(new LatLng (44.4519188,26.0818906));\n listOfpoints.get(43).add(new LatLng (44.4520107,26.0813971));\n listOfpoints.get(43).add(new LatLng (44.452026,26.0767193));\n listOfpoints.get(43).add(new LatLng (44.4527, 26.0732861));\n listOfpoints.get(43).add(new LatLng ( 44.4511682,26.0706039));\n listOfpoints.get(43).add(new LatLng (44.4503219, 26.069692));\n listOfpoints.get(43).add(new LatLng (44.4502719,26.0698017));\n listOfpoints.get(43).add(new LatLng (44.4475595, 26.0760068));\n listOfpoints.get(43).add(new LatLng (44.447414, 26.0761356));\n listOfpoints.get(43).add(new LatLng (44.4468242, 26.0754811));\n listOfpoints.get(43).add(new LatLng (44.4465485, 26.0755562));\n listOfpoints.get(43).add(new LatLng (44.4462728, 26.0759746));\n listOfpoints.get(43).add(new LatLng (44.4430787,26.0806953));\n\n\n\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n listOfpoints.get(44).add(new LatLng (44.4299706,26.0672689));\n listOfpoints.get(44).add(new LatLng (44.431342,26.068213));\n listOfpoints.get(44).add(new LatLng (44.4358314, 26.0745752));\n listOfpoints.get(44).add(new LatLng (44.4382828,26.0698974));\n listOfpoints.get(44).add(new LatLng (44.4353105,26.0630095));\n listOfpoints.get(44).add(new LatLng (44.435096,26.0616792));\n listOfpoints.get(44).add(new LatLng (44.4344678, 26.0595763));\n listOfpoints.get(44).add(new LatLng (44.4320315, 26.0595334));\n listOfpoints.get(44).add(new LatLng (44.4316178, 26.0600913));\n listOfpoints.get(44).add(new LatLng (44.4291968, 26.0639));\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n\n\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n listOfpoints.get(45).add(new LatLng (44.441285, 26.1333359));\n listOfpoints.get(45).add(new LatLng (44.4414535,26.1345376));\n listOfpoints.get(45).add(new LatLng (44.4428936,26.1475195));\n listOfpoints.get(45).add(new LatLng (44.443154,26.1493863));\n listOfpoints.get(45).add(new LatLng (44.4434451, 26.149794));\n listOfpoints.get(45).add(new LatLng (44.4437515,26.1497082));\n listOfpoints.get(45).add(new LatLng (44.4445175,26.1494721));\n listOfpoints.get(45).add(new LatLng (44.4454979,26.1488713));\n listOfpoints.get(45).add(new LatLng (44.4459574,26.1481847));\n listOfpoints.get(45).add(new LatLng (44.447091,26.147262));\n listOfpoints.get(45).add(new LatLng (44.448148,26.1456527));\n listOfpoints.get(45).add(new LatLng (44.4520847, 26.1353101));\n listOfpoints.get(45).add(new LatLng (44.4529577,26.1321129));\n listOfpoints.get(45).add(new LatLng (44.4531262,26.1316623));\n listOfpoints.get(45).add(new LatLng (44.4536776, 26.1311473));\n listOfpoints.get(45).add(new LatLng (44.4547192, 26.1298813));\n listOfpoints.get(45).add(new LatLng (44.455148,26.1288513));\n listOfpoints.get(45).add(new LatLng (44.449833, 26.1251177));\n listOfpoints.get(45).add(new LatLng (44.4491437, 26.12471));\n listOfpoints.get(45).add(new LatLng (44.4477038,26.1259545));\n listOfpoints.get(45).add(new LatLng (44.4462332, 26.1266841));\n listOfpoints.get(45).add(new LatLng (44.4447013, 26.1279501));\n listOfpoints.get(45).add(new LatLng (44.4436596, 26.129259));\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n\n\n\n listOfpoints.get(46).add(new LatLng (44.4322314,26.1388506));\n listOfpoints.get(46).add(new LatLng (44.4335155,26.1535014));\n listOfpoints.get(46).add(new LatLng (44.4338066,26.1552395));\n listOfpoints.get(46).add(new LatLng (44.434971,26.1596598));\n listOfpoints.get(46).add(new LatLng (44.4350966, 26.1598576));\n listOfpoints.get(46).add(new LatLng (44.4421748,26.1571969));\n listOfpoints.get(46).add(new LatLng (44.4425731, 26.1570252));\n listOfpoints.get(46).add(new LatLng (44.4429102, 26.1561669));\n listOfpoints.get(46).add(new LatLng (44.443477, 26.1502231));\n listOfpoints.get(46).add(new LatLng (44.4429255, 26.1494077));\n listOfpoints.get(46).add(new LatLng (44.442328, 26.144215));\n listOfpoints.get(46).add(new LatLng (44.4418837, 26.1404384));\n listOfpoints.get(46).add(new LatLng (44.4412556, 26.1349882));\n listOfpoints.get(46).add(new LatLng (44.4411331, 26.1338295));\n listOfpoints.get(46).add(new LatLng (44.4406428,26.1344732));\n listOfpoints.get(46).add(new LatLng (44.4388656, 26.1357821));\n listOfpoints.get(46).add(new LatLng (44.4374868, 26.1367048));\n listOfpoints.get(46).add(new LatLng (44.4350813, 26.137606));\n listOfpoints.get(46).add(new LatLng (44.4322314, 26.1388506));\n\n\n\n listOfpoints.get(47).add(new LatLng (44.4202257, 26.1368063));\n listOfpoints.get(47).add(new LatLng (44.4179627,26.1463187));\n listOfpoints.get(47).add(new LatLng (44.4227749, 26.149709));\n listOfpoints.get(47).add(new LatLng (44.4231734, 26.1503527));\n listOfpoints.get(47).add(new LatLng (44.4237251, 26.1504386));\n listOfpoints.get(47).add(new LatLng (44.4261157, 26.1495373));\n listOfpoints.get(47).add(new LatLng (44.4262996, 26.1508463));\n listOfpoints.get(47).add(new LatLng (44.4268206, 26.1524341));\n listOfpoints.get(47).add(new LatLng (44.4283937, 26.1547449));\n listOfpoints.get(47).add(new LatLng (44.433251, 26.1534574));\n listOfpoints.get(47).add(new LatLng (44.4320712, 26.1388662));\n listOfpoints.get(47).add(new LatLng (44.430401,26.139467));\n listOfpoints.get(47).add(new LatLng (44.4295736, 26.1393812));\n listOfpoints.get(47).add(new LatLng (44.4254668, 26.137686));\n listOfpoints.get(47).add(new LatLng (44.4241642,26.1374929));\n listOfpoints.get(47).add(new LatLng (44.4202257,26.1368063));\n\n\n\n listOfpoints.get(48).add(new LatLng (44.4234516,26.1510693));\n listOfpoints.get(48).add(new LatLng (44.425076, 26.1630856));\n listOfpoints.get(48).add(new LatLng (44.4292135,26.1619484));\n listOfpoints.get(48).add(new LatLng(44.4286618, 26.1578285));\n listOfpoints.get(48).add(new LatLng (44.4287078,26.156026));\n listOfpoints.get(48).add(new LatLng (44.4286925,26.1557042));\n listOfpoints.get(48).add(new LatLng (44.4269762, 26.1532151));\n listOfpoints.get(48).add(new LatLng (44.4262407, 26.151713));\n listOfpoints.get(48).add(new LatLng (44.4259189, 26.1499535));\n listOfpoints.get(48).add(new LatLng (44.4237122, 26.1506402));\n listOfpoints.get(48).add(new LatLng (44.4234516, 26.1510693));\n\n\n\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n listOfpoints.get(49).add(new LatLng (44.4286925, 26.1557042));\n listOfpoints.get(49).add(new LatLng (44.4287964, 26.1580645));\n listOfpoints.get(49).add(new LatLng (44.4290876, 26.1602317));\n listOfpoints.get(49).add(new LatLng (44.4302981,26.1670124));\n listOfpoints.get(49).add(new LatLng (44.4357222, 26.1692654));\n listOfpoints.get(49).add(new LatLng (44.4362584,26.1689865));\n listOfpoints.get(49).add(new LatLng (44.4366108, 26.1683857));\n listOfpoints.get(49).add(new LatLng (44.4367794,26.1675274));\n listOfpoints.get(49).add(new LatLng (44.433332, 26.1536442));\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n\n\n\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.14650));\n listOfpoints.get(50).add(new LatLng (44.4142265, 26.15554));\n listOfpoints.get(50).add(new LatLng (44.41369, 26.1578359));\n listOfpoints.get(50).add(new LatLng (44.4131842,26.1635008));\n listOfpoints.get(50).add(new LatLng (44.4133221, 26.1636295));\n listOfpoints.get(50).add(new LatLng (44.4154679, 26.1645951));\n listOfpoints.get(50).add(new LatLng (44.4169393, 26.1648526));\n listOfpoints.get(50).add(new LatLng (44.4181654, 26.1648097));\n listOfpoints.get(50).add(new LatLng (44.420403, 26.1642732));\n listOfpoints.get(50).add(new LatLng (44.4248319, 26.1631574));\n listOfpoints.get(50).add(new LatLng (44.4232688, 26.151227));\n listOfpoints.get(50).add(new LatLng (44.4226558, 26.1500253));\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.1465063));\n\n\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n listOfpoints.get(51).add(new LatLng (44.4079354,26.1261736));\n listOfpoints.get(51).add(new LatLng (44.3993506, 26.1595188));\n listOfpoints.get(51).add(new LatLng (44.4000559,26.1602484));\n listOfpoints.get(51).add(new LatLng (44.407077,26.1638962));\n listOfpoints.get(51).add(new LatLng (44.4081807, 26.1641108));\n listOfpoints.get(51).add(new LatLng (44.4091004, 26.1638104));\n listOfpoints.get(51).add(new LatLng (44.4114916, 26.162995));\n listOfpoints.get(51).add(new LatLng (44.4129018, 26.16351));\n listOfpoints.get(51).add(new LatLng (44.413147, 26.1608063));\n listOfpoints.get(51).add(new LatLng (44.4135762, 26.1567723));\n listOfpoints.get(51).add(new LatLng (44.4148943, 26.1529957));\n listOfpoints.get(51).add(new LatLng (44.4176838,26.1461722));\n listOfpoints.get(51).add(new LatLng (44.4183121,26.1435329));\n listOfpoints.get(51).add(new LatLng (44.4200133, 26.1367523));\n listOfpoints.get(51).add(new LatLng (44.4175152,26.1354433));\n listOfpoints.get(51).add(new LatLng (44.4159825, 26.1342417));\n listOfpoints.get(51).add(new LatLng (44.4146031,26.1324822));\n listOfpoints.get(51).add(new LatLng (44.4113383,26.1266242));\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n\n\n listOfpoints.get(52).add(new LatLng (44.3988714,26.159323));\n listOfpoints.get(52).add(new LatLng (44.4079468,26.1248191));\n listOfpoints.get(52).add(new LatLng (44.4088665, 26.1225875));\n listOfpoints.get(52).add(new LatLng (44.4080694,26.1217721));\n listOfpoints.get(52).add(new LatLng (44.4065059,26.1213858));\n listOfpoints.get(52).add(new LatLng (44.3941185, 26.120785));\n listOfpoints.get(52).add(new LatLng (44.3862678, 26.1391528));\n listOfpoints.get(52).add(new LatLng (44.3887826,26.1415131));\n listOfpoints.get(52).add(new LatLng (44.3886293, 26.1448605));\n listOfpoints.get(52).add(new LatLng (44.3891813, 26.1464484));\n listOfpoints.get(52).add(new LatLng (44.389304, 26.1472209));\n listOfpoints.get(52).add(new LatLng (44.3927079, 26.155761));\n listOfpoints.get(52).add(new LatLng (44.3941492, 26.1572631));\n listOfpoints.get(52).add(new LatLng (44.3985648, 26.16031));\n listOfpoints.get(52).add(new LatLng (44.3988714, 26.159323));\n\n\n\n listOfpoints.get(53).add(new LatLng (44.3886499, 26.1177499));\n listOfpoints.get(53).add(new LatLng (44.3892939, 26.1179645));\n listOfpoints.get(53).add(new LatLng (44.3881592, 26.1159046));\n listOfpoints.get(53).add(new LatLng (44.3876838,26.1132224));\n listOfpoints.get(53).add(new LatLng (44.3873311, 26.1100895));\n listOfpoints.get(53).add(new LatLng (44.3887879, 26.1032445));\n listOfpoints.get(53).add(new LatLng (44.3888645, 26.1022789));\n listOfpoints.get(53).add(new LatLng (44.3886192, 26.1005838));\n listOfpoints.get(53).add(new LatLng (44.3883738,26.0998542));\n listOfpoints.get(53).add(new LatLng (44.3876225,26.097923));\n listOfpoints.get(53).add(new LatLng (44.3869478, 26.0954554));\n listOfpoints.get(53).add(new LatLng (44.3862577, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3860584, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3789427, 26.0917003));\n listOfpoints.get(53).add(new LatLng (44.3757526,26.1157758));\n listOfpoints.get(53).add(new LatLng (44.375998,26.1173208));\n listOfpoints.get(53).add(new LatLng (44.3765195,26.1189945));\n listOfpoints.get(53).add(new LatLng (44.3769183,26.1194665));\n listOfpoints.get(53).add(new LatLng (44.3775624, 26.1194236));\n listOfpoints.get(53).add(new LatLng (44.3786973,26.1184366));\n listOfpoints.get(53).add(new LatLng (44.3824393,26.1150248));\n listOfpoints.get(53).add(new LatLng (44.3831447, 26.114939));\n listOfpoints.get(53).add(new LatLng (44.3840802, 26.1151106));\n listOfpoints.get(53).add(new LatLng (44.3879598, 26.1175568));\n listOfpoints.get(53).add(new LatLng (44.3886499,26.1177499));\n\n\n listOfpoints.get(54).add(new LatLng ( 44.3939843, 26.1207857));\n listOfpoints.get(54).add(new LatLng (44.3928679,26.120861));\n listOfpoints.get(54).add(new LatLng (44.3916643, 26.1202602));\n listOfpoints.get(54).add(new LatLng (44.3901386, 26.1189727));\n listOfpoints.get(54).add(new LatLng (44.3894869, 26.1181573));\n listOfpoints.get(54).add(new LatLng (44.3881836, 26.1178784));\n listOfpoints.get(54).add(new LatLng (44.3839589, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3830541, 26.1151318));\n listOfpoints.get(54).add(new LatLng (44.382479, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3814899, 26.1160544));\n listOfpoints.get(54).add(new LatLng (44.3792585,26.1181466));\n listOfpoints.get(54).add(new LatLng (44.3765793, 26.1204638));\n listOfpoints.get(54).add(new LatLng (44.3792479, 26.1275449));\n listOfpoints.get(54).add(new LatLng (44.379524,26.135098));\n listOfpoints.get(54).add(new LatLng (44.3856888, 26.1398616));\n listOfpoints.get(54).add(new LatLng (44.3939843,26.1207857));\n\n\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n listOfpoints.get(55).add(new LatLng (44.3767422, 26.0507223));\n listOfpoints.get(55).add(new LatLng (44.3901146,26.0632536));\n listOfpoints.get(55).add(new LatLng (44.4006018,26.0712359));\n listOfpoints.get(55).add(new LatLng (44.4064272, 26.0638544));\n listOfpoints.get(55).add(new LatLng (44.4054461,26.0626528));\n listOfpoints.get(55).add(new LatLng (44.3997432, 26.0485766));\n listOfpoints.get(55).add(new LatLng (44.3817726,26.0459158));\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n\n\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n listOfpoints.get(56).add(new LatLng (44.4007746, 26.0715552));\n listOfpoints.get(56).add(new LatLng (44.3971564,26.0688944));\n listOfpoints.get(56).add(new LatLng (44.3905634, 26.0639591));\n listOfpoints.get(56).add(new LatLng (44.3862699, 26.078207));\n listOfpoints.get(56).add(new LatLng (44.38124,26.0855027));\n listOfpoints.get(56).add(new LatLng (44.3802585, 26.0858031));\n listOfpoints.get(56).add(new LatLng (44.3797064, 26.0867901));\n listOfpoints.get(56).add(new LatLng (44.3790009,26.091425));\n listOfpoints.get(56).add(new LatLng (44.3848591,26.091897));\n listOfpoints.get(56).add(new LatLng (44.3890301,26.0918541));\n listOfpoints.get(56).add(new LatLng (44.3909928, 26.0865755));\n listOfpoints.get(56).add(new LatLng (44.3915141,26.0856314));\n listOfpoints.get(56).add(new LatLng (44.3946727, 26.0839608));\n listOfpoints.get(56).add(new LatLng (44.3961445,26.0850122));\n listOfpoints.get(56).add(new LatLng (44.3967425,26.0849907));\n listOfpoints.get(56).add(new LatLng (44.4002074, 26.0843041));\n listOfpoints.get(56).add(new LatLng (44.4029362, 26.0816648));\n listOfpoints.get(56).add(new LatLng (44.4055576,26.0799267));\n listOfpoints.get(56).add(new LatLng (44.4070752,26.0791113));\n listOfpoints.get(56).add(new LatLng (44.4130379,26.0732319));\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n\n\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n listOfpoints.get(57).add(new LatLng (44.4056207, 26.0623124));\n listOfpoints.get(57).add(new LatLng (44.4131623,26.0729554));\n listOfpoints.get(57).add(new LatLng (44.4204884,26.0654452));\n listOfpoints.get(57).add(new LatLng (44.4181895,26.0583212));\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n\n\n listOfpoints.get(58).add(new LatLng (44.414413, 26.0354062));\n listOfpoints.get(58).add(new LatLng (44.415394, 26.0475512));\n listOfpoints.get(58).add(new LatLng (44.4158231,26.0502978));\n listOfpoints.get(58).add(new LatLng (44.4181221,26.0576363));\n listOfpoints.get(58).add(new LatLng (44.4207888, 26.0658331));\n listOfpoints.get(58).add(new LatLng (44.4237005, 26.0731287));\n listOfpoints.get(58).add(new LatLng (44.4298608,26.0624857));\n listOfpoints.get(58).add(new LatLng (44.4293091,26.0617562));\n listOfpoints.get(58).add(new LatLng (44.4290027,26.0610266));\n listOfpoints.get(58).add(new LatLng (44.4275316, 26.0600825));\n listOfpoints.get(58).add(new LatLng (44.426275, 26.0585375));\n listOfpoints.get(58).add(new LatLng (44.4259379,26.0566922));\n listOfpoints.get(58).add(new LatLng (44.4253862, 26.0520573));\n listOfpoints.get(58).add(new LatLng (44.4242829,26.0473366));\n listOfpoints.get(58).add(new LatLng (44.4229037,26.0406847));\n listOfpoints.get(58).add(new LatLng (44.4221374,26.0347624));\n listOfpoints.get(58).add(new LatLng (44.4165281,26.0346766));\n listOfpoints.get(58).add(new LatLng (44.414413,26.0354062));\n\n\n listOfpoints.get(59).add(new LatLng (44.4224216, 26.0344395));\n listOfpoints.get(59).add(new LatLng (44.422437, 26.0360274));\n listOfpoints.get(59).add(new LatLng (44.423004,26.040276));\n listOfpoints.get(59).add(new LatLng (44.4255632,26.0522065));\n listOfpoints.get(59).add(new LatLng (44.4259156,26.055468));\n listOfpoints.get(59).add(new LatLng (44.42636,26.0583219));\n listOfpoints.get(59).add(new LatLng (44.4274787,26.059781));\n listOfpoints.get(59).add(new LatLng (44.4290264, 26.0608325));\n listOfpoints.get(59).add(new LatLng (44.4293328,26.0616264));\n listOfpoints.get(59).add(new LatLng (44.4299764,26.0623989));\n listOfpoints.get(59).add(new LatLng (44.4319071,26.0594162));\n listOfpoints.get(59).add(new LatLng (44.4345885, 26.0593948));\n listOfpoints.get(59).add(new LatLng (44.4342361, 26.0348472));\n listOfpoints.get(59).add(new LatLng (44.4273254, 26.0330877));\n listOfpoints.get(59).add(new LatLng (44.4237396,26.0342893));\n listOfpoints.get(59).add(new LatLng (44.4224216,26.0344395));\n\n\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n listOfpoints.get(60).add(new LatLng (44.4343687, 26.0351665));\n listOfpoints.get(60).add(new LatLng (44.4347671,26.059757));\n listOfpoints.get(60).add(new LatLng (44.435334, 26.0617097));\n listOfpoints.get(60).add(new LatLng (44.4355025, 26.0629327));\n listOfpoints.get(60).add(new LatLng (44.4356864,26.0635979));\n listOfpoints.get(60).add(new LatLng (44.4371728, 26.0669608));\n listOfpoints.get(60).add(new LatLng (44.4383602, 26.0697182));\n listOfpoints.get(60).add(new LatLng (44.4427184,26.0621798));\n listOfpoints.get(60).add(new LatLng (44.4429329,26.0609782));\n listOfpoints.get(60).add(new LatLng (44.447161,26.0392201));\n listOfpoints.get(60).add(new LatLng (44.4427491,26.0356152));\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n\n\n listOfpoints.get(61).add(new LatLng (44.4053059, 26.0112059));\n listOfpoints.get(61).add(new LatLng (44.384914, 26.0334789));\n listOfpoints.get(61).add(new LatLng (44.3778596, 26.0462677));\n listOfpoints.get(61).add(new LatLng (44.3811722,26.0454952));\n listOfpoints.get(61).add(new LatLng (44.399879, 26.0482418));\n listOfpoints.get(61).add(new LatLng (44.4002162, 26.0489714));\n listOfpoints.get(61).add(new LatLng (44.4169858,26.0575115));\n listOfpoints.get(61).add(new LatLng (44.4180893, 26.0579407));\n listOfpoints.get(61).add(new LatLng (44.4156984,26.0508167));\n listOfpoints.get(61).add(new LatLng (44.4151773,26.0472977));\n listOfpoints.get(61).add(new LatLng (44.414135,26.0356247));\n listOfpoints.get(61).add(new LatLng (44.4110082, 26.0104334));\n listOfpoints.get(61).add(new LatLng (44.4061643,26.0117208));\n listOfpoints.get(61).add(new LatLng (44.4053059,26.0112059));\n\n\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n listOfpoints.get(62).add(new LatLng (44.4103304, 26.0034906));\n listOfpoints.get(62).add(new LatLng (44.4127522,26.0228884));\n listOfpoints.get(62).add(new LatLng (44.4144076,26.0351192));\n listOfpoints.get(62).add(new LatLng (44.4167986,26.0343897));\n listOfpoints.get(62).add(new LatLng (44.4221013, 26.0343038));\n listOfpoints.get(62).add(new LatLng (44.4271277, 26.0328018));\n listOfpoints.get(62).add(new LatLng (44.4343295, 26.0347544));\n listOfpoints.get(62).add(new LatLng (44.4344597, 26.0345399));\n listOfpoints.get(62).add(new LatLng (44.436423, 26.0347646));\n listOfpoints.get(62).add(new LatLng (44.4424747, 26.0213321));\n listOfpoints.get(62).add(new LatLng (44.4459215, 26.0171264));\n listOfpoints.get(62).add(new LatLng (44.4457043,26.0167004));\n listOfpoints.get(62).add(new LatLng (44.4252662, 25.9987613));\n listOfpoints.get(62).add(new LatLng (44.4235193, 25.9990188));\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n\n\n listOfpoints.get(63).add(new LatLng (44.450683, 26.0692569));\n listOfpoints.get(63).add(new LatLng (44.4530725,26.0733768));\n listOfpoints.get(63).add(new LatLng (44.4523986, 26.0762092));\n listOfpoints.get(63).add(new LatLng (44.4522454,26.0783979));\n listOfpoints.get(63).add(new LatLng (44.4521842,26.0858652));\n listOfpoints.get(63).add(new LatLng (44.4658762, 26.0861656));\n listOfpoints.get(63).add(new LatLng (44.4661262, 26.0856151));\n listOfpoints.get(63).add(new LatLng (44.4670374, 26.0787379));\n listOfpoints.get(63).add(new LatLng (44.467496, 26.0777089));\n listOfpoints.get(63).add(new LatLng (44.4773875,26.0721728));\n listOfpoints.get(63).add(new LatLng (44.4779387,26.0720012));\n listOfpoints.get(63).add(new LatLng (44.482103,26.0611007));\n listOfpoints.get(63).add(new LatLng (44.4811232,26.0571525));\n listOfpoints.get(63).add(new LatLng (44.4748153, 26.0461661));\n listOfpoints.get(63).add(new LatLng (44.4716917, 26.0438487));\n listOfpoints.get(63).add(new LatLng (44.4690579,26.0436771));\n listOfpoints.get(63).add(new LatLng (44.4667916, 26.0449645));\n listOfpoints.get(63).add(new LatLng (44.4519663, 26.0668513));\n listOfpoints.get(63).add(new LatLng (44.450683,26.0692569));\n\n\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n listOfpoints.get(64).add(new LatLng (44.466193, 26.0862472));\n listOfpoints.get(64).add(new LatLng (44.4723947,26.0878994));\n listOfpoints.get(64).add(new LatLng (44.4731756,26.0883715));\n listOfpoints.get(64).add(new LatLng (44.4739718,26.090131));\n listOfpoints.get(64).add(new LatLng (44.4744158, 26.090882));\n listOfpoints.get(64).add(new LatLng (44.4748292,26.0909678));\n listOfpoints.get(64).add(new LatLng (44.4753498,26.0906889));\n listOfpoints.get(64).add(new LatLng (44.4774321, 26.0888006));\n listOfpoints.get(64).add(new LatLng (44.4801879,26.0864832));\n listOfpoints.get(64).add(new LatLng (44.4868014,26.0859682));\n listOfpoints.get(64).add(new LatLng (44.4880873,26.0854532));\n listOfpoints.get(64).add(new LatLng (44.489618,26.0824491));\n listOfpoints.get(64).add(new LatLng (44.4904753, 26.0788443));\n listOfpoints.get(64).add(new LatLng (44.4890057,26.0784151));\n listOfpoints.get(64).add(new LatLng (44.478167, 26.0727074));\n listOfpoints.get(64).add(new LatLng (44.4678468, 26.0779216));\n listOfpoints.get(64).add(new LatLng (44.467219, 26.0788228));\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n\n\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n listOfpoints.get(65).add(new LatLng (44.443222,26.0605852));\n listOfpoints.get(65).add(new LatLng (44.4450067,26.0611538));\n listOfpoints.get(65).add(new LatLng (44.4465463,26.062173));\n listOfpoints.get(65).add(new LatLng (44.4472816,26.0631386));\n listOfpoints.get(65).add(new LatLng (44.448913,26.0666577));\n listOfpoints.get(65).add(new LatLng (44.4502551,26.0690373));\n listOfpoints.get(65).add(new LatLng (44.4664896,26.0448331));\n listOfpoints.get(65).add(new LatLng (44.4688479,26.0434168));\n listOfpoints.get(65).add(new LatLng (44.469491,26.0403269));\n listOfpoints.get(65).add(new LatLng (44.4702566,26.037237));\n listOfpoints.get(65).add(new LatLng (44.4701035,26.0353058));\n listOfpoints.get(65).add(new LatLng (44.4613441,26.0305422));\n listOfpoints.get(65).add(new LatLng (44.4611297,26.0346621));\n listOfpoints.get(65).add(new LatLng (44.4606089,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.4595369,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.458618,26.0354775));\n listOfpoints.get(65).add(new LatLng (44.4545745,26.0376233));\n listOfpoints.get(65).add(new LatLng (44.4501632,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4494892,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4485701,26.039297));\n listOfpoints.get(65).add(new LatLng (44.4477429,26.0380953));\n listOfpoints.get(65).add(new LatLng (44.4466093,26.0430306));\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n\n\n\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0912642));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0917148));\n listOfpoints.get(66).add(new LatLng (44.4743313,26.0922513));\n listOfpoints.get(66).add(new LatLng (44.4750816,26.0927019));\n listOfpoints.get(66).add(new LatLng (44.4758471,26.0937962));\n listOfpoints.get(66).add(new LatLng (44.4762758,26.0947189));\n listOfpoints.get(66).add(new LatLng (44.4766127,26.0962853));\n listOfpoints.get(66).add(new LatLng (44.4765514,26.0971436));\n listOfpoints.get(66).add(new LatLng (44.4761227,26.0977444));\n listOfpoints.get(66).add(new LatLng (44.4753878,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4745457,26.0985384));\n listOfpoints.get(66).add(new LatLng (44.4734585,26.0989675));\n listOfpoints.get(66).add(new LatLng (44.4729073,26.0990104));\n listOfpoints.get(66).add(new LatLng (44.4718508,26.0986671));\n listOfpoints.get(66).add(new LatLng (44.471223,26.0980663));\n listOfpoints.get(66).add(new LatLng (44.469263,26.0970792));\n listOfpoints.get(66).add(new LatLng (44.4689567,26.0971651));\n listOfpoints.get(66).add(new LatLng (44.468773,26.0975728));\n listOfpoints.get(66).add(new LatLng (44.4687424,26.0981092));\n listOfpoints.get(66).add(new LatLng (44.4688955,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4692017,26.0986886));\n listOfpoints.get(66).add(new LatLng (44.4694774,26.0985598));\n listOfpoints.get(66).add(new LatLng (44.4704268,26.0990319));\n listOfpoints.get(66).add(new LatLng (44.4707483,26.0994396));\n listOfpoints.get(66).add(new LatLng (44.4719733,26.1024651));\n listOfpoints.get(66).add(new LatLng (44.4735963,26.1028943));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1035809));\n listOfpoints.get(66).add(new LatLng (44.4741322,26.1042676));\n listOfpoints.get(66).add(new LatLng (44.4735351,26.1047396));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1077866));\n listOfpoints.get(66).add(new LatLng (44.4738413,26.1079583));\n listOfpoints.get(66).add(new LatLng (44.473826,26.1085591));\n listOfpoints.get(66).add(new LatLng (44.4733667,26.1097822));\n listOfpoints.get(66).add(new LatLng (44.4732595,26.1107478));\n listOfpoints.get(66).add(new LatLng (44.4734432,26.1111555));\n listOfpoints.get(66).add(new LatLng (44.4763087,26.1089172));\n listOfpoints.get(66).add(new LatLng (44.4946789,26.1040249));\n listOfpoints.get(66).add(new LatLng (44.4968217,26.0792198));\n listOfpoints.get(66).add(new LatLng (44.490592,26.0788336));\n listOfpoints.get(66).add(new LatLng (44.4898573,26.0820737));\n listOfpoints.get(66).add(new LatLng (44.4894593,26.0830178));\n listOfpoints.get(66).add(new LatLng (44.4882229,26.0855306));\n listOfpoints.get(66).add(new LatLng (44.4870595,26.0860456));\n listOfpoints.get(66).add(new LatLng (44.4801439,26.0866335));\n listOfpoints.get(66).add(new LatLng (44.4761173,26.090174));\n listOfpoints.get(66).add(new LatLng (44.4751527,26.0912469));\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n\n listOfpoints.get(67).add(new LatLng (44.4671287, 26.121282));\n listOfpoints.get(67).add(new LatLng (44.46768,26.1231274));\n listOfpoints.get(67).add(new LatLng (44.4696095,26.1234278));\n listOfpoints.get(67).add(new LatLng (44.4712938,26.1224408));\n listOfpoints.get(67).add(new LatLng (44.4723657,26.1229557));\n listOfpoints.get(67).add(new LatLng (44.4727944, 26.1226553));\n listOfpoints.get(67).add(new LatLng (44.4740193, 26.1226982));\n listOfpoints.get(67).add(new LatLng (44.4745399,26.1236424));\n listOfpoints.get(67).add(new LatLng (44.4743668,26.1243164));\n listOfpoints.get(67).add(new LatLng (44.4747037, 26.1250031));\n listOfpoints.get(67).add(new LatLng (44.4751324,26.1257541));\n listOfpoints.get(67).add(new LatLng (44.4758673,26.1267626));\n listOfpoints.get(67).add(new LatLng (44.4761736, 26.127578));\n listOfpoints.get(67).add(new LatLng (44.491758,26.1285221));\n listOfpoints.get(67).add(new LatLng (44.4931662, 26.1377919));\n listOfpoints.get(67).add(new LatLng (44.494452,26.1444008));\n listOfpoints.get(67).add(new LatLng (44.4947581,26.1462033));\n listOfpoints.get(67).add(new LatLng (44.4958601, 26.1472332));\n listOfpoints.get(67).add(new LatLng (44.4969009, 26.1458599));\n listOfpoints.get(67).add(new LatLng (44.4984926, 26.1450875));\n listOfpoints.get(67).add(new LatLng (44.5000231,26.1446583));\n listOfpoints.get(67).add(new LatLng (44.5006353,26.1435425));\n listOfpoints.get(67).add(new LatLng (44.5012475,26.1424267));\n listOfpoints.get(67).add(new LatLng (44.5057774, 26.144315));\n listOfpoints.get(67).add(new LatLng (44.5070629, 26.137191));\n listOfpoints.get(67).add(new LatLng (44.5066956, 26.1233723));\n listOfpoints.get(67).add(new LatLng (44.502227,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4952479,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4782558,26.1086953));\n listOfpoints.get(67).add(new LatLng (44.4765716,26.1090386));\n listOfpoints.get(67).add(new LatLng (44.4734175,26.1114848));\n listOfpoints.get(67).add(new LatLng (44.4739994,26.1124289));\n listOfpoints.get(67).add(new LatLng (44.4744587,26.1137163));\n listOfpoints.get(67).add(new LatLng (44.474275,26.1152613));\n listOfpoints.get(67).add(new LatLng (44.4738156,26.1171067));\n listOfpoints.get(67).add(new LatLng (44.4729582,26.1180937));\n listOfpoints.get(67).add(new LatLng (44.4705695, 26.1195099));\n listOfpoints.get(67).add(new LatLng (44.4677826,26.1202395));\n listOfpoints.get(67).add(new LatLng (44.4671287,26.121282));\n\n\n //Stockholm\n listOfpoints.get(68).add(new LatLng(59.339281, 18.005316));\n listOfpoints.get(68).add(new LatLng(59.263986, 18.253591));\n listOfpoints.get(68).add(new LatLng(59.260869, 17.878596));\n\n //Stockholm\n listOfpoints.get(69).add(new LatLng(59.342841, 18.040179));\n listOfpoints.get(69).add(new LatLng(59.355275, 17.884694));\n listOfpoints.get(69).add(new LatLng(59.423065, 18.075748));\n\n\n for(int i = 0 ; i < listOfpoints.size(); i++){\n listOfPolygons.add( MapsActivity.instance.mMap.addPolygon(new PolygonOptions()\n .addAll(listOfpoints.get(i))\n .strokeWidth(0)\n .fillColor(Color.argb(50, 0, 250, 0))) );\n }\n\n\n\n\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n ArrayList<LatLng> list = new ArrayList<LatLng>();\n //get the location name from latitude and longitude\n Geocoder geocoder = new Geocoder(getApplicationContext());\n /*CameraUpdate center =\n CameraUpdateFactory.newLatLng(new LatLng(10.339012, 123.911545));\n CameraUpdate zoom = CameraUpdateFactory.zoomTo(18);\n\n mMap.moveCamera(center);\n mMap.animateCamera(zoom);*/\n try {\n List<Address> addresses =\n geocoder.getFromLocation(latitude, longitude, 1);\n String result = addresses.get(0).getSubLocality() + \":\";\n result += addresses.get(0).getLocality() + \":\";\n result += addresses.get(0).getCountryCode();\n latLng = new LatLng(latitude, longitude);\n pos=latLng;\n //Marker.remove();\n mMap.clear();\n\n points.add(latLng); //added\n\n if(active)\n {\n latitLong(pos);\n }\n redrawLine(); //added\n\n /*Polyline line = mMap.addPolysline(new PolylineOptions()\n .add(pos)\n .width(5)\n .color(Color.RED));*/\n\n //===============memarker\n /*mMap.addMarker(new MarkerOptions().position(latLng).title(result).icon(BitmapDescriptorFactory\n .fromResource(R.drawable.memarker)));*/\n\n\n\n //list.add(latLng);\n //drawPolyLineOnMap(list);\n /* PolylineOptions options = new PolylineOptions().width(5).color(Color.BLUE).geodesic(true);\n for (int z = 0; z < list.size(); z++) {\n LatLng point = list.get(z);\n options.add(point);\n }\n polyline = mMap.addPolyline(options);*/\n\n //polylines.setPoints(list);\n\n //PolylineOptions polylines = new PolylineOptions().width(5).color(Color.BLUE).geodesic(true).add(list);\n //mMap.setOnPolylineClickListener(this);\n //=====================\n /*polyline = new PolylineOptions();\n polyline.color(ORANGE);\n polyline.width(5);\n list.add(latLng);\n polyline.addAll(list);\n //mMap.addPolyline(polyline);\n mMap.addPolyline(polyline);*/\n //=====================\n\n\n //==========\n profileMarker(latLng);\n //===============\n //mMap.setMaxZoomPreference(18);\n\n\n //Toast.makeText(getBaseContext(),\n //range+\"\", Toast.LENGTH_LONG).show();\n CircleOptions circleOptions = new CircleOptions()\n .center(latLng)\n .radius(range)\n .strokeWidth(2)\n .strokeColor(ORANGE)\n .fillColor(Color.parseColor(\"#500084d3\")); //\n // Supported formats are: #RRGGBB #AARRGGBB\n // #AA is the alpha, or amount of transparency\n\n mMap.addCircle(circleOptions);\n\n //----------setMapUI();\n //=============//mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(latLng, 0));\n //====================================================rotunda\n\n\n /*Location mepzLocation = new Location(\"mepzlocation\");\n mepzLocation.setLatitude(10.348958);//10.348958, 123.903147\n mepzLocation.setLongitude(123.903147);\n mepszone = mMap.addMarker(new MarkerOptions()\n .position(TWENTYKPH)\n .title(\"20KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.twentyk)));\n\n mepszone.setTag(0);\n\n Location paseoLocation = new Location(\"paseolocation\");\n paseoLocation.setLatitude(10.345268);\n paseoLocation.setLongitude(123.907426);\n paseostr = mMap.addMarker(new MarkerOptions()\n .position(THIRTYKPH)\n .title(\"30KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.thirtyk)));\n\n paseostr.setTag(0);\n*/ if(!explore)\n {\n resetCamera();\n }\n\n //==============================\n final LatLng baniladFOURTYKPH = new LatLng(baniladlat, baniladlong);//10.339012, 123.911545//baniladlat, baniladlong\n Marker baniladstr;\n\n Location baniladLocation = new Location(\"baniladlocation\");\n baniladLocation.setLatitude(baniladlat);\n baniladLocation.setLongitude(baniladlong);\n\n baniladstr = mMap.addMarker(new MarkerOptions()\n .position(baniladFOURTYKPH)\n .title(baniladLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(baniladLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.fourtyk)));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n baniladstr.setTag(0);\n\n //=================================\n final LatLng banilad2FOURTYKPH = new LatLng(banilad2lat, banilad2long);//10.339012, 123.911545//baniladlat, baniladlong\n //Marker banilad2str;\n\n Location banilad2Location = new Location(\"banilad2location\");\n banilad2Location.setLatitude(banilad2lat);\n banilad2Location.setLongitude(banilad2long);\n\n banilad2str = mMap.addMarker(new MarkerOptions()\n .position(banilad2FOURTYKPH)\n .title(banilad2Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(banilad2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n banilad2str.setTag(0);\n\n //=================================\n final LatLng maboloFOURTYKPH = new LatLng(mabololat, mabololong);//10.339012, 123.911545//baniladlat, baniladlong\n Marker mabolostr;\n\n Location maboloLocation = new Location(\"mabololocation\");\n maboloLocation.setLatitude(mabololat);\n maboloLocation.setLongitude(mabololong);\n\n mabolostr = mMap.addMarker(new MarkerOptions()\n .position(maboloFOURTYKPH)\n .title(maboloLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(maboloLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n mabolostr.setTag(0);\n //=================================\n final LatLng mabolo2TWENTYKPH = new LatLng(mabolo2lat, mabolo2long);//10.339012, 123.911545//baniladlat, baniladlong\n Marker mabolo2str;\n\n Location mabolo2Location = new Location(\"mabolo2location\");\n mabolo2Location.setLatitude(mabolo2lat);\n mabolo2Location.setLongitude(mabolo2long);\n\n mabolo2str = mMap.addMarker(new MarkerOptions()\n .position(mabolo2TWENTYKPH)\n .title(mabolo2Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(mabolo2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n mabolo2str.setTag(0);\n //=================================\n final LatLng smFOURTYKPH = new LatLng(smlat, smlong);//10.339012, 123.911545//baniladlat, baniladlong\n Marker smstr;\n\n Location smLocation = new Location(\"smlocation\");\n smLocation.setLatitude(smlat);\n smLocation.setLongitude(smlong);\n\n smstr = mMap.addMarker(new MarkerOptions()\n .position(smFOURTYKPH)\n .title(smLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(smLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n smstr.setTag(0);\n //=================================\n final LatLng sm2FOURTYKPH = new LatLng(sm2lat, sm2long);//10.339012, 123.911545//baniladlat, baniladlong\n Marker sm2str;\n\n Location sm2Location = new Location(\"sm2location\");\n sm2Location.setLatitude(sm2lat);\n sm2Location.setLongitude(sm2long);\n\n sm2str = mMap.addMarker(new MarkerOptions()\n .position(sm2FOURTYKPH)\n .title(sm2Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(sm2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n sm2str.setTag(0);\n //=================================\n final LatLng sm3FOURTYKPH = new LatLng(sm3lat, sm3long);//10.339012, 123.911545//baniladlat, baniladlong\n Marker sm3str;\n\n Location sm3Location = new Location(\"sm3location\");\n sm3Location.setLatitude(sm3lat);\n sm3Location.setLongitude(sm3long);\n\n sm3str = mMap.addMarker(new MarkerOptions()\n .position(sm3FOURTYKPH)\n .title(sm3Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(sm3Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n sm3str.setTag(0);\n //=================================\n final LatLng sergioFOURTYKPH = new LatLng(sergiolat, sergiolong);//10.339012, 123.911545//baniladlat, baniladlong\n Marker sergiostr;\n\n Location sergioLocation = new Location(\"sergiolocation\");\n sergioLocation.setLatitude(sergiolat);\n sergioLocation.setLongitude(sergiolong);\n\n sergiostr = mMap.addMarker(new MarkerOptions()\n .position(sergioFOURTYKPH)\n .title(sergioLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(sergioLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n sergiostr.setTag(0);\n //=================================\n final LatLng sergio2FOURTYKPH = new LatLng(sergio2lat, sergio2long);//10.339012, 123.911545//baniladlat, baniladlong\n Marker sergio2str;\n\n Location sergio2Location = new Location(\"sergio2location\");\n sergio2Location.setLatitude(sergio2lat);\n sergio2Location.setLongitude(sergio2long);\n\n sergio2str = mMap.addMarker(new MarkerOptions()\n .position(sergio2FOURTYKPH)\n .title(sergio2Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(sergio2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n sergio2str.setTag(0);\n //=================================\n final LatLng tunnelMinSixty = new LatLng(tunnellat, tunnellong);\n Marker tunnelstr;\n\n Location tunnelLocation = new Location(\"tunnellocation\");\n tunnelLocation.setLatitude(tunnellat);\n tunnelLocation.setLongitude(tunnellong);\n\n tunnelstr = mMap.addMarker(new MarkerOptions()\n .position(tunnelMinSixty)\n .title(tunnelLimit+\"KPH\")\n .snippet(\"minimum \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitchGreen(tunnelLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n tunnelstr.setTag(0);\n //=================================\n final LatLng tunnel2MinSixty = new LatLng(tunnel2lat, tunnel2long);\n Marker tunnel2str;\n\n Location tunnel2Location = new Location(\"tunnel2location\");\n tunnel2Location.setLatitude(tunnel2lat);\n tunnel2Location.setLongitude(tunnel2long);\n\n tunnel2str = mMap.addMarker(new MarkerOptions()\n .position(tunnel2MinSixty)\n .title(tunnel2Limit+\"KPH\")\n .snippet(\"minimum \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitchGreen(tunnel2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n tunnel2str.setTag(0);\n //=================================\n final LatLng cscrMinSixty = new LatLng(cscrlat, cscrlong);\n Marker cscrstr;\n\n Location cscrLocation = new Location(\"cscrlocation\");\n cscrLocation.setLatitude(cscrlat);\n cscrLocation.setLongitude(cscrlong);\n\n cscrstr = mMap.addMarker(new MarkerOptions()\n .position(cscrMinSixty)\n .title(cscrLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(cscrLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cscrstr.setTag(0);\n //=================================\n final LatLng cscr2MinSixty = new LatLng(cscr2lat, cscr2long);\n Marker cscr2str;\n\n Location cscr2Location = new Location(\"cscr2location\");\n cscr2Location.setLatitude(cscr2lat);\n cscr2Location.setLongitude(cscr2long);\n\n cscr2str = mMap.addMarker(new MarkerOptions()\n .position(cscr2MinSixty)\n .title(cscr2Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(cscr2Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cscr2str.setTag(0);\n //=================================\n final LatLng cscr3MinSixty = new LatLng(cscr3lat, cscr3long);\n Marker cscr3str;\n\n Location cscr3Location = new Location(\"cscr3location\");\n cscr3Location.setLatitude(cscr3lat);\n cscr3Location.setLongitude(cscr3long);\n\n cscr3str = mMap.addMarker(new MarkerOptions()\n .position(cscr3MinSixty)\n .title(cscr3Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(cscr3Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cscr3str.setTag(0);\n //=================================\n final LatLng cscr4MinSixty = new LatLng(cscr4lat, cscr4long);\n Marker cscr4str;\n\n Location cscr4Location = new Location(\"cscr4location\");\n cscr4Location.setLatitude(cscr4lat);\n cscr4Location.setLongitude(cscr4long);\n\n cscr4str = mMap.addMarker(new MarkerOptions()\n .position(cscr4MinSixty)\n .title(cscr4Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(cscr4Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cscr4str.setTag(0);\n //=================================\n final LatLng cscr5MinSixty = new LatLng(cscr5lat, cscr5long);\n Marker cscr5str;\n\n Location cscr5Location = new Location(\"cscr5location\");\n cscr5Location.setLatitude(cscr5lat);\n cscr5Location.setLongitude(cscr5long);\n\n cscr5str = mMap.addMarker(new MarkerOptions()\n .position(cscr5MinSixty)\n .title(cscr5Limit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(cscr5Limit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cscr5str.setTag(0);\n //=================================\n final LatLng rizalMinSixty = new LatLng(rizallat, rizallong);\n Marker rizalstr;\n\n Location rizalLocation = new Location(\"rizallocation\");\n rizalLocation.setLatitude(rizallat);\n rizalLocation.setLongitude(rizallong);\n\n rizalstr = mMap.addMarker(new MarkerOptions()\n .position(rizalMinSixty)\n .title(rizalLimit+\"KPH\")\n .snippet(\"allowable \\nspeed limit\")\n .icon(BitmapDescriptorFactory.fromResource(getIconUsingSwitch(rizalLimit))));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n rizalstr.setTag(0);\n\n\n /*if (location.distanceTo(paseoLocation) < range) {\n minimum=false;\n marker=paseostr;\n //Toast.makeText(MapView.this, \"Max speed is 30KPH\", Toast.LENGTH_LONG).show();\n limit.setText(baniladLimit);\n paseostr.showInfoWindow();\n mLastShownInfoWindowMarker = paseostr;\n success=false;\n click(paseostr);\n } else if (location.distanceTo(mepzLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Paghinay sa pangpang!...\", Toast.LENGTH_LONG).show();\n limit.setText(\"20\");\n marker=mepszone;\n mepszone.showInfoWindow();\n mLastShownInfoWindowMarker = mepszone;\n success=false;\n click(mepszone);\n } else*/\n if (location.distanceTo(baniladLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n success=false;\n limit.setText(baniladLimit);\n marker=baniladstr;\n baniladstr.showInfoWindow();\n mLastShownInfoWindowMarker =baniladstr;\n click(baniladstr);\n } else if (location.distanceTo(banilad2Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(banilad2Limit);\n success=false;\n marker=banilad2str;\n banilad2str.showInfoWindow();\n mLastShownInfoWindowMarker = banilad2str;\n click(banilad2str);\n } else if (location.distanceTo(maboloLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(maboloLimit);\n success=false;\n marker= mabolostr;\n mabolostr.showInfoWindow();\n mLastShownInfoWindowMarker = mabolostr;\n click(mabolostr);\n } else if (location.distanceTo(mabolo2Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(mabolo2Limit);\n success=false;\n marker= mabolo2str;\n mabolo2str.showInfoWindow();\n mLastShownInfoWindowMarker = mabolo2str;\n click(mabolo2str);\n } else if (location.distanceTo(smLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(smLimit);\n success=false;\n marker= smstr;\n smstr.showInfoWindow();\n mLastShownInfoWindowMarker = smstr;\n click(smstr);\n } else if (location.distanceTo(sm2Location) < range) {\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(sm2Limit);\n success=false;\n marker= sm2str;\n sm2str.showInfoWindow();\n mLastShownInfoWindowMarker = sm2str;\n click(sm2str);\n } else if (location.distanceTo(sm3Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(sm3Limit);\n success=false;\n marker= sm3str;\n sm3str.showInfoWindow();\n mLastShownInfoWindowMarker = sm3str;\n click(sm3str);\n } else if (location.distanceTo(sergioLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(sergioLimit);\n success=false;\n marker= sergiostr;\n sergiostr.showInfoWindow();\n mLastShownInfoWindowMarker = sergiostr;\n click(sergiostr);\n } else if (location.distanceTo(sergio2Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"You are in banilad...\", Toast.LENGTH_LONG).show();\n limit.setText(sergio2Limit);\n success=false;\n marker= sergio2str;\n sergio2str.showInfoWindow();\n mLastShownInfoWindowMarker = sergio2str;\n click(sergio2str);\n } else if (location.distanceTo(tunnelLocation) < range) {\n minimum=true;\n limit.setText(tunnelLimit);\n success=false;\n marker= tunnelstr;\n tunnelstr.showInfoWindow();\n mLastShownInfoWindowMarker = tunnelstr;\n click(tunnelstr);\n //if below 60kph\n if (location.distanceTo(tunnelLocation) < range)\n {\n String speedo = blueKph.getText().toString();\n speed = Integer.parseInt(speedo);\n String limitation = limit.getText().toString();\n speedlimit = Integer.parseInt(limitation);\n if(speed<speedlimit){\n /*LayoutInflater inflater = getLayoutInflater();\n View layout = inflater.inflate(R.layout.toast,\n (ViewGroup) findViewById(R.id.toast_layout_root));\n\n ImageView image = (ImageView) layout.findViewById(R.id.image);\n image.setImageResource(R.drawable.sixtygreen);\n TextView text = (TextView) layout.findViewById(R.id.text);\n text.setText(\"Speed must be minimum of 60KPH!\");\n\n Toast toast = new Toast(getApplicationContext());\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setView(layout);\n toast.show();*/\n\n Context context=getApplicationContext();\n LayoutInflater inflater=getLayoutInflater();\n\n View customToastroot =inflater.inflate(R.layout.toast, null);\n\n Toast customtoast=new Toast(context);\n\n customtoast.setView(customToastroot);\n customtoast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL,0, 0);\n customtoast.setDuration(Toast.LENGTH_LONG);\n customtoast.show();\n }\n }\n } else if (location.distanceTo(tunnel2Location) < range) {\n minimum=true;\n limit.setText(tunnel2Limit);\n success=false;\n marker= tunnel2str;\n tunnel2str.showInfoWindow();\n mLastShownInfoWindowMarker = tunnel2str;\n click(tunnel2str);\n //if below 60kph\n if (location.distanceTo(tunnel2Location) < range)\n {\n String speedo = blueKph.getText().toString();\n speed = Integer.parseInt(speedo);\n String limitation = limit.getText().toString();\n speedlimit = Integer.parseInt(limitation);\n if(speed<speedlimit)\n {\n /*LayoutInflater inflater = getLayoutInflater();\n View layout = inflater.inflate(R.layout.toast,\n (ViewGroup) findViewById(R.id.toast_layout_root));\n\n ImageView image = (ImageView) layout.findViewById(R.id.image);\n image.setImageResource(R.drawable.sixtygreen);\n TextView text = (TextView) layout.findViewById(R.id.text);\n text.setText(\"Speed must be minimum of 60KPH!\");\n\n Toast toast = new Toast(getApplicationContext());\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setView(layout);\n toast.show();*/\n\n Context context=getApplicationContext();\n LayoutInflater inflater=getLayoutInflater();\n\n View customToastroot =inflater.inflate(R.layout.toast, null);\n\n Toast customtoast=new Toast(context);\n\n customtoast.setView(customToastroot);\n customtoast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL,0, 0);\n customtoast.setDuration(Toast.LENGTH_LONG);\n customtoast.show();\n }\n }\n } else if (location.distanceTo(cscrLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(cscrLimit);\n success=false;\n marker= cscrstr;\n cscrstr.showInfoWindow();\n mLastShownInfoWindowMarker = cscrstr;\n click(cscrstr);\n } else if (location.distanceTo(cscr2Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(cscr2Limit);\n success=false;\n marker= cscr2str;\n cscr2str.showInfoWindow();\n mLastShownInfoWindowMarker = cscr2str;\n click(cscr2str);\n } else if (location.distanceTo(cscr3Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(cscr3Limit);\n success=false;\n marker= cscr3str;\n cscr3str.showInfoWindow();\n mLastShownInfoWindowMarker = cscr3str;\n click(cscr3str);\n } else if (location.distanceTo(cscr4Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(cscr4Limit);\n success=false;\n marker= cscr4str;\n cscr4str.showInfoWindow();\n mLastShownInfoWindowMarker = cscr4str;\n click(cscr4str);\n } else if (location.distanceTo(cscr5Location) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(cscr5Limit);\n success=false;\n marker= cscr5str;\n cscr5str.showInfoWindow();\n mLastShownInfoWindowMarker = cscr5str;\n click(cscr5str);\n } else if (location.distanceTo(rizalLocation) < range) {\n minimum=false;\n //Toast.makeText(MapView.this, \"Minimum of 60kph speed.\", Toast.LENGTH_LONG).show();\n limit.setText(rizalLimit);\n success=false;\n marker= rizalstr;\n rizalstr.showInfoWindow();\n mLastShownInfoWindowMarker = rizalstr;\n click(rizalstr);\n } else {\n minimum=false;\n //successs=false;\n /*marker= driver_marker;\n //successs=false;\n while (!successs) {\n try {\n Timer timer = new Timer();\n TimerTask updateProfile = new CustomTimerTask(MapView.this);\n timer.scheduleAtFixedRate(updateProfile, 10,5000);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n successs = true;\n }*/\n //Toast.makeText(MapView.this, \"NONE SPEEDLIMIT ZONE...\", Toast.LENGTH_LONG).show();\n //limit.setText(\"0\");\n if (mLastShownInfoWindowMarker != null && mLastShownInfoWindowMarker.isInfoWindowShown()) {\n mLastShownInfoWindowMarker.hideInfoWindow();\n }\n }\n\n }catch (java.lang.SecurityException ex) {\n Log.i(TAG, \"fail to request location update, ignore\", ex);\n } catch (IllegalArgumentException ex) {\n Log.d(TAG, \"gps provider does not exist \" + ex.getMessage());\n } catch (IOException e) {\n e.printStackTrace();\n }\n while (!success) {\n try {\n fab.setEnabled(true);\n fab2.setEnabled(true);\n //progressDialogs.show();\n /*final Animation myAnim = AnimationUtils.loadAnimation(MapView.this, R.anim.bounce);\n // Use bounce interpolator with amplitude 0.2 and frequency 20\n MyBounceInterpolator interpolator = new MyBounceInterpolator(0.2, 20);\n myAnim.setInterpolator(interpolator);\n\n fab.startAnimation(myAnim);*/\n resetCamera();\n success = true;\n mProgressBar.setVisibility(View.GONE);\n load.setVisibility(View.GONE);\n /* click(paseostr);\n click(mepszone);\n click(baniladstr);\n click(banilad2str);\n click(mabolostr);\n click(mabolo2str);\n click(smstr);\n click(sm2str);\n click(sm3str);\n click(sergiostr);\n click(sergio2str);\n click(tunnelstr);\n click(tunnel2str);\n click(cscrstr);\n click(cscr2str);\n click(cscr3str);\n click(cscr4str);\n click(cscr5str);\n click(rizalstr);*/\n //progressDialogs.dismiss();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n final TextView textLat = (TextView) this.findViewById(R.id.TextLat);\n final TextView textLong = (TextView) this.findViewById(R.id.TextLng);\n\n\n polygon = mMap.addPolygon(new PolygonOptions()\n .add(new LatLng(15, 95),\n new LatLng(15, 105.08),\n new LatLng(4.92, 105.08),\n new LatLng(4.92, 95))\n .strokeColor(Color.RED).strokeWidth(1)\n .fillColor(Color.parseColor(\"#30000000\")));\n\n float lat = 15;\n float lng = 95;\n int i = 0;\n for (i = 0; i < 122; i++) {\n line = mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(lat, 95), new LatLng(lat, 105.08))\n .width(1)\n .color(Color.RED));\n\n line = mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(15, lng), new LatLng(4.92, lng))\n .width(1)\n .color(Color.RED));\n\n lat = (float) (lat - 0.0826);\n lng = (float) (lng + 0.0826);\n }\n\n LatLng coordinateThailand = new LatLng(14, 100);\n mMap.addMarker(new MarkerOptions().position(coordinateThailand).title(\"Thailand\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(coordinateThailand));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinateThailand,10));\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n public void onMapClick(LatLng latLng) {\n\n Log.e(\"latlong\", latLng.latitude + \"-\" + latLng.longitude);\n textLat.setText(\"\"+latLng.latitude);\n textLong.setText(\"\"+latLng.longitude);\n\n Double f1 = latLng.latitude;\n Double f2 = latLng.longitude;\n\n\n pLng = f2%95;\n pLat = f1%15;\n Log.i(\"test\", pLat + \"-\" + pLng);\n\n pLng=pLng/0.0826;\n pLat=pLat/0.0826;\n kLng =pLng.intValue();\n kLat =pLat.intValue();\n kLat=kLat-60;\n Log.i(\"test2\", kLat + \"-\" + kLng);\n\n if (flag>0)\n {polygon2.remove();}\n\n\n if(kLat>=0&kLat<=121&kLng>=0&kLng<=121) {\n polygon2 = mMap.addPolygon(new PolygonOptions()\n .add(new LatLng(4.92 + (0.0826 * kLat), 95 + (0.0826 * kLng)),\n new LatLng(4.92 + (0.0826 * kLat), 95 + (0.0826 * kLng) + 0.0826),\n new LatLng(4.92 + (0.0826 * kLat) + 0.0826, 95 + (0.0826 * kLng) + 0.0826),\n new LatLng(4.92 + (0.0826 * kLat) + 0.0826, 95 + (0.0826 * kLng)))\n .strokeColor(Color.BLUE).strokeWidth(1)\n .fillColor(Color.parseColor(\"#283593\")));\n }\n flag=flag+1;\n\n\n kLat=121-kLat; //point array\n\n\n\n\n }\n\n\n\n });\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add LatLng values for all the points of interest on the map.\n LatLng center = new LatLng(53.411068, -2.982297);\n LatLng james = new LatLng(53.412226, -2.981376);\n LatLng tom = new LatLng(53.413403, -2.980732);\n LatLng marybone = new LatLng(53.411238, -2.987441);\n LatLng library = new LatLng(53.411137, -2.988401);\n LatLng henry = new LatLng(53.410551, -2.984382);\n LatLng cherie = new LatLng(53.412666, -2.981698);\n LatLng tower = new LatLng(53.410537, -2.974883);\n LatLng peter = new LatLng(53.412086, -2.980728);\n LatLng kingsway = new LatLng(53.409686, -2.985622);\n\n // Add properties for the camera positioning.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 15));\n\n\n // Add markers for each point on the map.\n mMap.addMarker(new MarkerOptions().position(james).title(\"James Parson's Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tom).title(\"Tom Reilly Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(marybone).title(\"Marybone Lecture Theatre\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(library).title(\"Avril Robarts LRC\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(henry).title(\"Henry Cotton Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(cherie).title(\"Cherie Booth Lecture Building\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(tower).title(\"LJMU Tower\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(peter).title(\"Peter Jost Enterprise Center\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n mMap.addMarker(new MarkerOptions().position(kingsway).title(\"Kingsway House\").icon(BitmapDescriptorFactory.fromResource(R.drawable.icon2)));\n }", "private HashMap<String, Marker> loadNMarkers(){\n HashMap<String, Marker> map = new HashMap<String, Marker>();\n if (googleMap != null) {\n googleMap.clear();\n }\n float alpha = (float) 0.5;\n if (main.state.getBookingState() != State.RESERVE_BIKE_SELECTION_STATE && main.state.getBookingState() != State.RESERVE_DOCK_SELECTION_STATE){\n alpha = 1;\n }\n for (Station station : stationList) {\n float fillLevel = station.getFillLevel(); // change the marker colors depending on the station fill levels\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)).alpha(alpha));\n marker.setTag(station.getId()); // set tag to reference markers later\n map.put(station.getId(), marker);\n }\n return map;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n gmap = googleMap;\n\n for (Earthquake earthquake: earthquakeList){\n // Create a new coordinates based on the earthquakes geo latitude and geo longitude\n LatLng latLng = new LatLng(earthquake.getGeoLat(), earthquake.getGeoLong());\n // Add the location of the earthquake as a marker on GoogleMaps based on its coordinates\n if (earthquake.getMagnitude() <= 1){\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n }\n else if (earthquake.getMagnitude() <= 2) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_CYAN));\n }\n else if (earthquake.getMagnitude() <= 3) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n else if (earthquake.getMagnitude() <= 4) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n }\n else if (earthquake.getMagnitude() <= 5) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET));\n }\n else if (earthquake.getMagnitude() <= 6) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));\n }\n else if (earthquake.getMagnitude() <= 7) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ROSE));\n }\n else if (earthquake.getMagnitude() <= 8) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n }\n else if (earthquake.getMagnitude() <= 9) {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n }\n else {\n // Set the title to the earthquake's location name\n gmap.addMarker(new MarkerOptions().position(latLng).title(earthquake.getLocation())).setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n }\n\n }\n // Coordinates for London\n LatLng london = new LatLng(51.509865, -0.118092);\n // Moves the camera to the location of London\n // This is to just focus the camera on the UK\n gmap.moveCamera(CameraUpdateFactory.newLatLng(london));\n // Displays the Zoom in and out controls on the Map UI\n gmap.getUiSettings().setZoomControlsEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n // Add polylines to the map.\n // Polylines are useful to show a route or some other connection between points.\n Polyline polyline1;\n// polyline1 = googleMap.addPolyline(new PolylineOptions()\n// .clickable(true)\n// .add(\n// new LatLng(5.7070, 6.7909),\n// new LatLng(5.7360, 6.8834),\n// new LatLng(6.1111, 6.5421)\n// ));\n PolylineOptions polylineOptions = new PolylineOptions();\n// for (po : init){\n polylineOptions.add(new LatLng(6.572997708, 3.319332056)).clickable(true);\n// polylineOptions.add(new LatLng(5.7070, 6.7909)).clickable(true);\n// polylineOptions.add(new LatLng(5.7360, 6.8834)).clickable(true);\n// polylineOptions.add(new LatLng(6.1111, 6.5421)).clickable(true);\n polylineOptions.add(new LatLng(4.9690, 8.3470)).clickable(true);\n\n// }\n\n polyline1 = googleMap.addPolyline(polylineOptions);\n\n// List<String> ll = new ArrayList<>();\n// ll.add(\"5.7070, 6.7909\");\n// ll.add(\"5.7360, 6.8834\");\n// ll.add(\"6.1111, 6.5421\");\n// mSydney = mMap.addMarker(new MarkerOptions()\n// .position(SYDNEY)\n// .title(\"Sydney\");\n\n // Store a data object with the polyline, used here to indicate an arbitrary type.\n polyline1.setTag(\"A\");\n\n MarkerOptions options = new MarkerOptions();\n// options.position(new LatLng(5.7070, 6.7909));\n// options.position(new LatLng(5.7360, 6.8834));\n// options.position(new LatLng(6.1111, 6.5421));\n\n googleMap.addMarker(options.position(new LatLng(5.7070, 6.7909)));\n googleMap.addMarker(options.position(new LatLng(5.7360, 6.8834)));\n googleMap.addMarker(options.position(new LatLng(6.1111, 6.5421)));\n // Style the polyline.\n stylePolyline(polyline1);\n\n// Polyline polyline2 = googleMap.addPolyline(new PolylineOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-29.501, 119.700),\n// new LatLng(-27.456, 119.672),\n// new LatLng(-25.971, 124.187),\n// new LatLng(-28.081, 126.555),\n// new LatLng(-28.848, 124.229),\n// new LatLng(-28.215, 123.938)));\n// polyline2.setTag(\"B\");\n// stylePolyline(polyline2);\n\n // Add polygons to indicate areas on the map.\n// Polygon polygon1 = googleMap.addPolygon(new PolygonOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-27.457, 153.040),\n// new LatLng(-33.852, 151.211),\n// new LatLng(-37.813, 144.962),\n// new LatLng(-34.928, 138.599)));\n // Store a data object with the polygon, used here to indicate an arbitrary type.\n// polygon1.setTag(\"alpha\");\n // Style the polygon.\n// stylePolygon(polygon1);\n\n// Polygon polygon2 = googleMap.addPolygon(new PolygonOptions()\n// .clickable(true)\n// .add(\n// new LatLng(-31.673, 128.892),\n// new LatLng(-31.952, 115.857),\n// new LatLng(-17.785, 122.258),\n// new LatLng(-12.4258, 130.7932)));\n// polygon2.setTag(\"beta\");\n// stylePolygon(polygon2);\n\n // Position the map's camera near Alice Springs in the center of Australia,\n // and set the zoom factor so most of Australia shows on the screen.\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(5.7070, 6.7909), 4));\n\n // Set listeners for click events.\n googleMap.setOnPolylineClickListener(this);\n googleMap.setOnPolygonClickListener(this);\n\n // Set a listener for marker click.\n googleMap.setOnMarkerClickListener(this);\n\n }", "public void initMapMarkers() {\n\t\tmyMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder myLocMarkerBuilder = new MapMarkerBuilder();\n\t\tmyLocMarkerBuilder.setMarkerId(MARKER_ID_MY_LOCATION);\n\t\tmyLocMarkerBuilder.setIsAccuracyCircleSupported(true);\n\t\tmyLocMarkerBuilder.setAccuracyCircleBaseColor(new FColorRGB(32/255f, 173/255f, 229/255f));\n\t\tmyLocMarkerBuilder.setBaseOrder(-206000);\n\t\tmyLocMarkerBuilder.setIsHidden(true);\n\t\tBitmap myLocationBitmap = OsmandResources.getBitmap(\"map_pedestrian_location\");\n\t\tif (myLocationBitmap != null) {\n\t\t\tmyLocMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tmyLocationBitmap.getWidth(), myLocationBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(myLocationBitmap)));\n\t\t}\n\t\tmyLocationMarker = myLocMarkerBuilder.buildAndAddToCollection(myMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(myMarkersCollection);\n\n\t\t// Create context pin marker\n\t\tcontextPinMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder contextMarkerBuilder = new MapMarkerBuilder();\n\t\tcontextMarkerBuilder.setMarkerId(MARKER_ID_CONTEXT_PIN);\n\t\tcontextMarkerBuilder.setIsAccuracyCircleSupported(false);\n\t\tcontextMarkerBuilder.setBaseOrder(-210000);\n\t\tcontextMarkerBuilder.setIsHidden(true);\n\t\tBitmap pinBitmap = OsmandResources.getBitmap(\"map_pin_context_menu\");\n\t\tif (pinBitmap != null) {\n\t\t\tcontextMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tpinBitmap.getWidth(), pinBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(pinBitmap)));\n\t\t\tcontextMarkerBuilder.setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.Top);\n\t\t\tcontextMarkerBuilder.setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal);\n\t\t}\n\t\tcontextPinMarker = contextMarkerBuilder.buildAndAddToCollection(contextPinMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(contextPinMarkersCollection);\n\t}", "private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 14.0f));\n mMap.addMarker(new MarkerOptions().position(center).title(title));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 14.0f));\n//\n Log.i(\"tag\", otherPoints.size() + \"\");\n for (LatLng p : otherPoints) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.baseline_album_black_18);\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(p.latitude, p.longitude))\n .title(\"\")\n .icon(icon));\n }\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng korea = new LatLng(0,0);\n LatLng busan = new LatLng(ListOfLat[0], ListOfLong[0]);\n mMap.addMarker(new MarkerOptions().position(busan).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"Point : 1\"));\n for(int i=1; i<=size; i++){\n korea = new LatLng(ListOfLat[i-1], ListOfLong[i-1]);\n busan = new LatLng(ListOfLat[i], ListOfLong[i]);\n PolylineOptions aa = new PolylineOptions().add(korea).add(busan);\n mMap.addMarker(new MarkerOptions().position(busan).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"Point : \"+(i+1)));\n mMap.addPolyline(aa);\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(busan));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n this.googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(10.3157, 123.8854), 15.00f));\n this.googleMap.setOnMarkerClickListener(this);\n\n /*LatLng sunrise = new LatLng(10.2778832, 123.8530936);\n\n this.googleMap.addMarker(new MarkerOptions().position(sunrise).title(\"Sunrise\"));*/\n retrieveJobs();\n //LatLng sunrise = new LatLng(10.2778832,123.8530936);\n //this.googleMap.addMarker(new MarkerOptions().position(sunrise).title(\"Sunrise\"));\n }", "private void loadCrimes(LatLng Loc){\n //create a new instance of parser class. Parser class queries Data.octo.dc.gov for crime data\n mParser = new Parser();\n\n //try and parse data\n try {\n mParser.parse(getResources().getAssets().open(DATA, 0));\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //get the data from the parser and stores in TreeSet\n mCrimesList= mParser.nearestCrimes(Loc.latitude, Loc.longitude, mRadius);\n\n //Loop through and plot crimes\n List<Address> address;\n int i = 1;\n\n //iterate through crimes and querey google to get latitude and longitude of particular addresses\n for(Crime c: mCrimesList){\n try {\n address = mGeocoder.getFromLocationName(c.address ,1,\n mBounds[0], mBounds[1],mBounds[2], mBounds[3]);\n if(address == null || address.size() == 0){\n Log.i(TAG, \"***Crime:\" + c.offense + \" @ \" + c.address + \" NOT PLOTTED\");\n /*Crimes with addresses that can't be found are added to bad crimes list\n to be removed */\n mBadCrimesList.add(c);\n Log.i(TAG, mBadCrimesList.toString());\n if(i<=MAX_CRIMES) {\n continue;\n }else{\n removeBadCrimes();\n return;\n }\n }\n LatLng coor = new LatLng(address.get(0).getLatitude(), address.get(0).getLongitude());\n\n //Create pin\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n\n //this put geofence around crime points. Team decided to comment out to remove clutter\n /*Circle crime_circle = mMap.addCircle(new CircleOptions()\n .center(new LatLng(coor.latitude, coor.longitude))\n .radius(CIRCLE_SIZE)\n .strokeColor(Color.RED)\n .fillColor(RED_COLOR));\n c.circle = crime_circle;*/\n\n\n //crime object gets reference to its own pin\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"null marker\");\n }\n if(c.circle == null){\n Log.i(TAG, \"null circle\");\n }\n c.Lat = coor.latitude;\n c.Long = coor.longitude;\n\n //start out crime by being invisible\n c.setVisable(false);\n Log.i(TAG, \"Crime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }catch(IOException e){\n //catch any issue that google throws\n Log.i(TAG, \"I/O EXCEPTION while plotting crime\");\n mBadCrimesList.add(c);\n continue;\n }\n i++;\n if(i > MAX_CRIMES ){\n removeBadCrimes();\n return;\n }\n }\n\n }", "public void reloadMarkers() {\n this.markers.reload();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n if (!multi) {\n LatLng localEntrega = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(localEntrega).title(\"Local de Entrega\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localEntrega, 14));\n } else {\n myapp = (EntregasApp)getApplicationContext();\n manager = new Manager(myapp);\n LatLng primeiraEntrega;\n\n primeiraEntrega = new LatLng(0,0);\n\n int i = 0;\n List<Documento> documentos = manager.findDocumentoByDataRomaneio(myapp.getDate());\n\n for (Documento documento : documentos ){\n LatLng localEntrega;\n if (documento.getDestinatario().getLatitude()!=null){\n i = i + 1;\n latitude = Double.valueOf(documento.getDestinatario().getLatitude());\n longitude = Double.valueOf(documento.getDestinatario().getLongitude());\n\n localEntrega = new LatLng(latitude, longitude);\n\n if(i==1){\n primeiraEntrega = new LatLng(latitude,longitude);\n }\n\n mMap.addMarker(new MarkerOptions().position(localEntrega)\n .title(documento.getDestinatario().getNome()));\n }\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(primeiraEntrega, 10));\n\n // Check if we were successful in obtaining the map.\n /*\n if (mMap != null) {\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location arg0) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.truck);\n mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"Minha Localização\").icon(icon));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(arg0.getLatitude(), arg0.getLongitude()), 6));\n }\n });\n\n\n }\n\n */\n\n }\n\n }", "private void addMarker() {\n /** Make sure that the map has been initialised **/\n LatLng lt = new LatLng(58.722599, -103.798828);\n float focus = 1f;\n if (null != mMap) {\n ArrayList<EarthQuake> earthQuakes = (ArrayList<EarthQuake>) getIntent().getSerializableExtra(\"quakeArrayList\");\n getIntent().removeExtra(\"quakeArrayList\");\n int position = getIntent().getIntExtra(\"position\", 0);\n if (earthQuakes != null) {\n if(position==0) {\n for (int i = 0; i < earthQuakes.size(); i++) {\n mMap.addMarker(\n new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(i).getDateTime() + \"\\n\" + earthQuakes.get(i).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(i).getLat(), earthQuakes.get(i).getLon()))\n );\n }\n }else if(position>0){\n lt=new LatLng(earthQuakes.get(position).getLat(),earthQuakes.get(position).getLon());\n mMap.addMarker( new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(position).getDateTime() + \"\\n\" + earthQuakes.get(position).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(position).getLat(), earthQuakes.get(position).getLon())));\n focus=4f;\n\n }\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lt, focus));\n\n }\n }", "public void getLandmarksToBeDrawn(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n CostedPath path=shortestRouteDij(lm1,lm2); \n GraphNodeAL<MapPoint> prev=null;\n for(GraphNodeAL<?> n : path.pathList) { \n drawLandmarks((GraphNodeAL<MapPoint>) n);\n if(prev!=null) lineDraw(prev, (GraphNodeAL<MapPoint>) n);\n prev= (GraphNodeAL<MapPoint>) n;\n }\n }", "private void createMarkers(Bundle savedInstanceState) {\n List<MarkerDTO> markerDTOs = null;\n // add the OverlayItem to the ArrayItemizedOverlay\n ArrayList<DescribedMarker> markers = null;\n if (savedInstanceState != null) {\n markerDTOs = savedInstanceState.getParcelableArrayList(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n } else {\n markerDTOs = getIntent().getParcelableArrayListExtra(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n // retrieve geopoint if missing\n if (getIntent().getExtras() == null) {\n return;\n }\n featureIdField = getIntent().getExtras().getString(PARAMETERS.FEATURE_ID_FIELD);\n if (featureIdField == null) {\n featureIdField = FEATURE_DEFAULT_ID;\n }\n if (!MarkerUtils.assignFeaturesFromDb(markers, featureIdField)) {\n Toast.makeText(this, R.string.error_unable_getfeature_db, Toast.LENGTH_LONG).show();\n canConfirm = false;\n // TODO dialog : download features for this area?\n }\n }\n // create an ItemizedOverlay with the default marker\n overlayManager.getMarkerOverlay().getOverlayItems().addAll(markers);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n databaseReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n trackingLocationsList.clear();\n Iterable<DataSnapshot> tracks = dataSnapshot.child(id).getChildren();\n for (DataSnapshot info : tracks) {\n LatLong latLong = info.getValue(LatLong.class);\n trackingLocationsList.add(latLong);\n }\n int i=0;\n LatLng previous,next = null;\n for(LatLong value : trackingLocationsList){\n if(i==0){\n previous = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(previous).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(previous));\n }\n else{\n previous=next;\n next = new LatLng(Double.parseDouble(value.getLatitude()), Double.parseDouble(value.getLongitude()));\n mMap.addMarker(new MarkerOptions().position(next).title(\"Marker\"+i++));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(next));\n }\n mMap.addPolyline(new PolylineOptions()\n .add(previous,next)\n .width(5)\n .color(Color.RED));\n }\n }\n\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "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 }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n\n if(!continuar)\n {\n if (point != null)\n {\n point.remove();\n }\n if(search != null)\n {\n search.remove();\n }\n }else {\n if (point != null)\n {\n point.remove();\n }\n if(search != null)\n {\n search.remove();\n }\n }\n\n initView();\n\n latitud = latLng.latitude;\n longitud = latLng.longitude;\n point = mMap.addMarker(new MarkerOptions().position(latLng).title(geoCoderSearchLatLng(latLng)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n if(!continuar)\n {\n init = point;\n }else\n {\n finit = point;\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n\n stopLocationUpdates();\n }\n });\n\n LatLng sydney = new LatLng(latitud, longitud);\n point = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "public void refresh() {\n if (mMarkerView != null) {\n mMarkerView.setLatLng(GeoJSONUtils.toLatLng(mCoordinate));\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n try {\n Thread.sleep(1500);\n } catch(InterruptedException e) {\n }\n for(int i = 0; i < crimes.size(); i++) {\n LatLng currentCrime = new LatLng(crimes.get(i).getY(),crimes.get(i).getX());\n mMap.addMarker(new MarkerOptions().position(currentCrime).title(crimes.get(i).getOffense()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentCrime));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentCrime, zoomLevel));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(LAT_CENTER,LONG_CENTER) , 14.0f) );\n mMap.setOnMapClickListener(this);\n FloatingActionButton buttonCancel = (FloatingActionButton) findViewById(R.id.resetButton);\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mMap.clear();\n pointsCounter = 0;\n buttonStart.setVisibility(View.GONE);\n }\n }\n\n );\n buttonStart = (FloatingActionButton) findViewById(R.id.startButton);\n buttonStart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestPaths(start, end);\n }\n }\n\n );\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n try {\n parseResponse(new JSONObject(responseStr));\n addMarkers(establishments);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n mMap.setOnMarkerClickListener(this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n for (int i = 0; i < virtualLoc.size(); i++) {\n mMap.addMarker(new MarkerOptions().position(virtualLoc.get(i)).title(names.get(i)));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(20.0f));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(virtualLoc.get(i)));\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(virtualLoc.get(0),15));\n\n /*for (int i = 0; i < names.size(); i++) {\n //LatLng location = new LatLng(locations.get(i).latitude, locations.get(i).longitude);\n googleMap.addMarker(new MarkerOptions()\n .position(locations.get(i))\n .title(names.get(i)));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(locations.get(i)));\n }*/\n }", "public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n // Add a marker in Sydney and move the camera\n\n for( JSONObject jo : this.ubicaciones )\n {\n try{\n Log.i(\"ubicacion\",\n \" lat : \" + jo.get(\"lat\")\n + \" lon : \" + jo.get(\"lon\")\n + \" alt : \" + jo.get(\"alt\")\n );\n LatLng marca = new LatLng( jo.getDouble(\"lat\"), jo.getDouble(\"lon\") );\n\n mMap.addMarker(\n new MarkerOptions()\n .position(marca)\n .icon(\n BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_BLUE)\n )\n );\n// .title(\"Marker in Sydney\"));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(marca));\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n final LatLng thirdIntersection = new LatLng(45.425329, -75.682833);\n final LatLng fourthIntersection = new LatLng(45.426029, -75.681261);\n mMap = googleMap;\n\n // Moving the camera\n LatLngBounds Ottawa = new LatLngBounds(new LatLng(45.421536,-75.682823), new LatLng(45.426280, -75.679894));\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(Ottawa, 0));\n\n // Adding the path\n Polyline polyline = mMap.addPolyline(new PolylineOptions().width(8).color(Color.RED).clickable(true).add(\n new LatLng(45.422159, -75.680215),\n new LatLng(45.425329, -75.682833),\n new LatLng(45.426029, -75.681261)\n ));\n\n // Creating a custom marker\n Marker marker1 = mMap.addMarker(new MarkerOptions().position(new LatLng(45.422159, -75.680215)).title(\"Current Location\"));\n marker1.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.dot));\n\n // Moving the marker\n animateMarker(marker1,thirdIntersection, fourthIntersection);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng balungao = new LatLng(15.902635, 120.701193);\n mMap.addMarker(new MarkerOptions().position(balungao).title(\"Balungao\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(balungao));\n\n mMap.addCircle(new CircleOptions()\n .center(new LatLng(15.902635, 120.701193))\n .radius(100)\n .strokeWidth(10)\n .strokeColor(Color.GREEN)\n .fillColor(Color.argb(128, 0, 0, 255)));\n mMap.addCircle(new CircleOptions()\n .center(new LatLng(15.980597,120.56069))\n .radius(100)\n .strokeWidth(10)\n .strokeColor(Color.GREEN)\n .fillColor(Color.argb(128, 0, 0, 255)));\n mMap.addPolyline(new PolylineOptions()\n .add(new LatLng(15.902635, 120.701193),\n new LatLng(15.90226, 120.701244),\n new LatLng(15.90137, 120.69949),\n new LatLng(15.899913, 120.697461),\n new LatLng(15.898531, 120.694349),\n new LatLng(15.898087, 120.694102),\n new LatLng(15.898077, 120.693024),\n new LatLng(15.897334, 120.697231),\n new LatLng(15.896364, 120.683690),\n new LatLng(15.896735, 120.680429),\n new LatLng(15.897932, 120.673970),\n new LatLng(15.895476, 120.666958),\n new LatLng(15.894434, 120.665596),\n new LatLng(15.893144, 120.660457),\n new LatLng(15.893784, 120.656155),\n new LatLng(15.895530, 120.652107),\n new LatLng(15.895466, 120.650688),\n new LatLng(15.896663, 120.644594),\n new LatLng(15.895714, 120.641826),\n new LatLng(15.895312, 120.640099),\n new LatLng(15.89294, 120.63436),\n new LatLng(15.970590, 120.568950),\n new LatLng(15.970161, 120.585141),\n new LatLng(15.973376, 120.584515),\n new LatLng(15.973578, 120.584728),\n new LatLng(15.974606, 120.584783),\n new LatLng(15.976805, 120.585020),\n new LatLng(15.975866, 120.574357),\n new LatLng(15.975928, 120.570730),\n new LatLng(15.979253, 120.570991),\n new LatLng(15.978930, 120.565683),\n new LatLng(15.98171, 120.560137),\n new LatLng(15.980597,120.56069))\n .width(10)\n .color(Color.BLUE));\n\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng clickedPoint) {\n\n CircleOptions circleOptions = new CircleOptions()\n .center(clickedPoint)\n .zIndex(20)\n .radius(1)\n .fillColor(Color.CYAN)\n .strokeColor(Color.TRANSPARENT);\n\n switch (mCrowdStates)\n {\n case NO_POINTS_SELECTED:\n c1 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.ONE_POINT_SELECTED;\n buttonDelete.setEnabled(true);\n break;\n case ONE_POINT_SELECTED:\n c2 = mMap.addCircle(circleOptions);\n mCrowdStates = crowdStates.TWO_POINTS_SELECTED;\n\n PolygonOptions polygonOptions = new PolygonOptions()\n .add(\n c1.getCenter() //NW C1.latlng\n , new LatLng(c1.getCenter().latitude, c2.getCenter().longitude) //NE C1.lat C2.lon\n , c2.getCenter() //SE C2.latlon\n , new LatLng(c2.getCenter().latitude, c1.getCenter().longitude)) //SW C2.lat C1.lon\n .fillColor(Color.TRANSPARENT)\n .strokeColor(Color.RED);\n\n crowdPolygone = mMap.addPolygon(polygonOptions);\n textViewInfo.setText(\"Crowd Defined!\\n Save or Delete the Crowd\");\n buttonSave.setEnabled(true);\n buttonDrawPixels.setEnabled(true);\n break;\n case TWO_POINTS_SELECTED:\n\n break;\n }\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng bb1 = new LatLng(55.43485652, 9.93543252);\n LatLng bb2 = new LatLng(55.4357145, 9.93682074);\n mMap.addMarker(new MarkerOptions().position(bb1).title(\"BB1\"));\n mMap.addMarker(new MarkerOptions().position(bb2).title(this.coordsys));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(bb1));\n\n\n// Instantiates a new Polyline object and adds points to define a rectangle\n/* PolylineOptions rectOptions = new PolylineOptions()\n .add(new LatLng(55.26, 9.56))\n .add(new LatLng(55.36, 9.56)) // North of the previous point, but at the same longitude\n .add(new LatLng(55.36, 9.66)) // Same latitude, and 30km to the west\n .add(new LatLng(55.26, 9.66)) // Same longitude, and 16km to the south\n .add(new LatLng(55.26, 9.56)); // Closes the polyline.\n\n// Get back the mutable Polyline\n Polyline polyline = mMap.addPolyline(rectOptions);\n */\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Polyline polyline = googleMap.addPolyline(new PolylineOptions().clickable(true).add(\n new LatLng(35.016,143.321),\n new LatLng(34.747,145.592),\n new LatLng(34.364,147.891),\n new LatLng(33.501,150.217),\n new LatLng(32.306,149.248),\n new LatLng(32.491,147.309)));\n // Add a marker in Sydney and move the camera\n LatLng KIT = new LatLng(-28.698980, 77.155147);\n mMap.addMarker(new MarkerOptions().position(KIT).title(\"Marker in Kasturba\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(KIT));\n LatLng GTB = new LatLng(28.700932, 77.208888);\n mMap.addMarker(new MarkerOptions().position(GTB).title(\"Marker in GTB nagar\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(GTB));\n LatLng ny = new LatLng(40.713468, 73.978243);\n mMap.addMarker(new MarkerOptions().position(ny).title(\"New york\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(ny));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n // 34.042709, -118.432666 = home\n // 34.044736, -118.433889\n Polygon polygon = googleMap.addPolygon(new PolygonOptions()\n .clickable(true)\n .add(\n new LatLng(34.044736, -118.433889),\n new LatLng(34.046736, -118.429889),\n new LatLng(34.043736, -118.428889),\n new LatLng(34.042736, -118.431889),\n new LatLng(34.041736, -118.434889),\n new LatLng(34.044736, -118.433889)));\n\n // Store a data object with the polygon, used here to indicate an arbitrary type.\n polygon.setTag(\"Search Area\");\n polygon.setFillColor(COLOR_ORANGE_ARGB);\n\n Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (location == null) { return; }\n }\n double curLatitude = location.getLatitude();\n double curLongitude = location.getLongitude();\n\n if (initialLat == 0) {\n initialLat = curLatitude;\n initialLon = curLongitude;\n }\n\n myLatitude = (forceLat == 0) ? curLatitude : forceLat;\n myLongitude = (forceLon == 0) ? curLongitude : forceLon;\n\n\n this.googleMap = googleMap;\n\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n// LatLng sydney = new LatLng(-33.852, 151.211);\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n\n BitmapDescriptor bm = BitmapDescriptorFactory.fromResource(R.drawable.tracking);\n MarkerOptions marker = new MarkerOptions()\n .position(myLoc)\n .alpha((float) 0.5)\n .anchor(0.5f,0.5f)\n .icon(bm)\n// .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))\n .title(\"My Location\")\n ;\n myMarker = googleMap.addMarker(marker);\n googleMap.animateCamera(CameraUpdateFactory.newLatLng(myLoc));\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLoc, 17));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLng(myLoc));\n// googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc, 16));\n\n\n new Timer().scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n updateLocation();\n }\n }, 0, 2000);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mGoogleMap = googleMap;\n /* MapStyleOptions mapStyleOptions= MapStyleOptions.loadRawResourceStyle(this,R.raw.style_json);\n mGoogleMap.setMapStyle(mapStyleOptions);*/\n Log.d(\"mylog\", \"Added Markers\");\n final Marker[] allMarkers = new Marker[employeeProfileModelList.size()];\n for (int i = 0; i < employeeProfileModelList.size(); i++) {\n\n String ids = employeeProfileModelList.get(i).getID();\n\n if (googleMap != null) {\n }\n selectedEmpId = employeeProfileModelList.get(i).getID();\n }\n mGoogleMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n for (int i = 0; i < employeeProfileModelList.size(); i++) {\n\n // LatLng customMarkerLocationOne = new LatLng(28.583911, 77.319116);\n empid = employeeProfileModelList.get(i).getID();\n empNameList[i] = String.valueOf(employeeProfileModelList.get(i).getName());\n empLat[i] = String.valueOf(employeeProfileModelList.get(i).getLat());\n empLong[i] = String.valueOf(employeeProfileModelList.get(i).getLong());\n employeeid[i] = String.valueOf(employeeProfileModelList.get(i).getID());\n employeemobile[i] = String.valueOf(employeeProfileModelList.get(i).getMobileNo());\n employeeimage[i] = String.valueOf(employeeProfileModelList.get(i).getImage());\n empMobile.add(employeeProfileModelList.get(i).getMobileNo());\n empName.add(employeeProfileModelList.get(i).getName());\n try {\n /* name = dataProfileEmployee.getName();\n mobno = dataProfileEmployee.getMobileNo();\n img_str = dataProfileEmployee.getImage();*/\n\n final int finalI = i;\n final int finalI1 = i;\n final int finalI2 = i;\n db.collection(\"Profile\").document(employeeid[i]).get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n Bitmap smallMarker = null;\n latLng = new LatLng(Double.valueOf(String.valueOf(task.getResult().get(\"lat\"))),\n Double.valueOf(String.valueOf(task.getResult().get(\"long\"))));\n boolean busystatus = (boolean) task.getResult().get(\"busystatus\");\n if (busystatus) {\n int height = 100;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.map_logo);\n Bitmap b = bitmapdraw.getBitmap();\n smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n } else {\n int height = 100;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.map_logo_green_removebg);\n Bitmap b = bitmapdraw.getBitmap();\n smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n }\n\n\n mGoogleMap.addMarker(new MarkerOptions().position(latLng).\n icon(BitmapDescriptorFactory.fromBitmap(smallMarker))).setTitle(empNameList[finalI] + \",\" + employeeid[finalI1] + \",\" + employeeimage[finalI2] + \",\" + employeemobile[finalI2]);\n }\n\n });\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n mGoogleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n mapviewLayout.setVisibility(View.VISIBLE);\n mapviewLayout.setAlpha(0.0f);\n mapviewLayout\n .animate()\n .setDuration(5)\n .alpha(1.0f)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n super.onAnimationEnd(animation);\n mapviewLayout.animate().setListener(null);\n }\n });\n getdrctlayout.setVisibility(View.VISIBLE);\n latl = marker.getPosition().toString().split(Pattern.quote(\"(\"))[1].split(\",\")[0];\n long1 = marker.getPosition().toString().split(Pattern.quote(\"(\"))[1].split(\",\")[1].split(Pattern.quote(\")\"))[0];\n place2 = new MarkerOptions().position(new LatLng(Double.valueOf(latl), Double.valueOf(long1))).title(\"Location 1\");\n new FetchURL(AdminHomePage.this).execute(getUrl(mylocation.getPosition(), place2.getPosition(), \"driving\"), \"driving\");\n\n try {\n idmark = marker.getTitle().split(\",\")[1];\n namemark = marker.getTitle().split(\",\")[0];\n img_strmark = marker.getTitle().split(\",\")[2];\n mobnomark = marker.getTitle().split(\",\")[3];\n String employeeprofimage = AppConfig.BASE_URL + img_strmark;\n customerDetails.setText(namemark);\n if (img_strmark != null) {\n Glide.with(AdminHomePage.this)\n .load(employeeprofimage)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n .skipMemoryCache(true)\n .placeholder(R.drawable.jihuzurblanklogo)\n .into(employeeImage);\n // Glide.with(AdminHomePage.this).load(employeeprofimage).into(employeeImage);\n } else {\n employeeImage.setImageResource(R.drawable.jihuzurblanklogo);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return true;\n }\n });\n\n orderphotorequest.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Map<String, Object> ordernotification = new HashMap<>();\n\n /* ordernotification.put(\"customerid\", false);\n ordernotification.put(\"customermob\", 20.22);\n ordernotification.put(\"employeemob\", false);\n ordernotification.put(\"servicename\", false);*/\n\n ordernotification.put(\"employeeid\", idmark);\n db.collection(\"SendOrderPhoto\").document(idmark)\n .set(ordernotification)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n // Log.d(TAG, \"DocumentSnapshot successfully written!\");\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(), \"Failed!\",\n Toast.LENGTH_LONG).show();\n }\n });\n\n }\n\n });\n\n call.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(\"tel:\" + mobnomark));\n if (ActivityCompat.checkSelfPermission(AdminHomePage.this, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n startActivity(intent);\n }\n });\n try {\n getDirection.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n /* Double latitud=latLng.latitude;\n Double longitud=latLng.longitude;*/\n String label = \"Route for \" + namemark;\n String uriBegin = \"geo:\" + latl + \",\" + long1;\n String query = latl + \",\" + long1 + \"(\" + label + \")\";\n String encodedQuery = Uri.encode(query);\n String uriString = uriBegin + \"?q=\" + encodedQuery + \"&z=16\";\n Uri uri = Uri.parse(uriString);\n try {\n Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);\n startActivity(intent);\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Update Your Google Map\", Toast.LENGTH_LONG).show();\n }\n }\n });\n } catch (Exception e) {\n e.printStackTrace();\n // Toast.makeText(getApplicationContext(), \"Please Select Employee First\", Toast.LENGTH_SHORT).show();\n }\n mGoogleMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n if (idmark == null) {\n Toast.makeText(getApplicationContext(), \"Please Click Marker First!\", Toast.LENGTH_LONG).show();\n } else {\n android.support.v7.app.AlertDialog.Builder dialogBuilder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n LayoutInflater inflater = LayoutInflater.from(AdminHomePage.this);\n final View dialogView = inflater.inflate(R.layout.dialog_reviewemployee, null);\n dialogBuilder.setView(dialogView);\n final String ide = idmark;\n String name = namemark;\n String img_str = img_strmark;\n RatingBar ratingBar = (RatingBar) dialogView.findViewById(R.id.rating);\n final RecyclerView orderNew = (RecyclerView) dialogView.findViewById(R.id.orderNew);\n orderNew.setHasFixedSize(true);\n orderNew.setLayoutManager(new LinearLayoutManager(AdminHomePage.this));\n ImageView oderrun = (ImageView) dialogView.findViewById(R.id.orderRun);\n ImageView orderHist = (ImageView) dialogView.findViewById(R.id.orderHist); /* getRatingForEmployee(ide, ratingBar);\n getMyOrderRunning(orderNew, ide, AdminHomePage.this);*/\n de.hdodenhof.circleimageview.CircleImageView profileimage = (de.hdodenhof.circleimageview.CircleImageView) dialogView.findViewById(R.id.profileImage);\n if (img_str.equals(\"null\")) {\n profileimage.setImageResource(R.drawable.jihuzurblanklogo);\n // Glide.with(AdminHomePage.this).load(\"http://192.168.1.103:7096/Images/Category/1.png\").into(markerImage);\n } else {\n Glide.with(AdminHomePage.this).load(AppConfig.BASE_URL + img_str).into(profileimage);\n }\n dialogBuilder.setTitle(\"Mr/Ms. \" + name.toString());\n dialogBuilder.setNegativeButton(\"Close\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n final android.support.v7.app.AlertDialog b = dialogBuilder.create();\n b.show();\n oderrun.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n b.cancel();\n getSupportActionBar().setTitle(namemark + \"'s\" + \" \" + \"Current Order\");\n Fragment employeeCurrentOrderFragment = new EmployeeCurrentOrderFragment();//Get Fragment Instance\n Bundle data = new Bundle();//Use bundle to pass data\n data.putString(\"EmployeeID\", ide);//put string, int, etc in bundle with a key value\n employeeCurrentOrderFragment.setArguments(data);//Finally set argument bundle to fragment\n fragmentManager.beginTransaction().replace(R.id.home_container, employeeCurrentOrderFragment).commit();//now replace the argument fragment\n\n /* try {\n\n result = new EmployeeOrderHelper.EmployeeGetMyCurrentOrder().execute(ide).get();\n\n List<Order> orderList;\n EmployeeCurrentOrderAdapter employeeCurrentOrderAdapter;\n Gson gson = new Gson();\n Type listType = new TypeToken<List<Order>>() {\n }.getType();\n orderList = new Gson().fromJson(result, listType);\n employeeCurrentOrderAdapter = new EmployeeCurrentOrderAdapter(AdminHomePage.this, orderList);\n orderNew.setAdapter(employeeCurrentOrderAdapter);\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }*/\n\n }\n });\n orderHist.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n b.cancel();\n getSupportActionBar().setTitle(namemark + \"'s\" + \" \" + \"Order History\");\n Fragment employeeHistoryCurrentFragment = new EmployeeHistoryCurrentFragment();//Get Fragment Instance\n Bundle data = new Bundle();//Use bundle to pass data\n data.putString(\"EmployeeID\", ide);//put string, int, etc in bundle with a key value\n employeeHistoryCurrentFragment.setArguments(data);//Finally set argument bundle to fragment\n fragmentManager.beginTransaction().replace(R.id.home_container, employeeHistoryCurrentFragment).commit();//now replace the argument fragment\n\n\n\n /* try {\n\n result = new EmployeeOrderHelper.GetMyCompleteOrderGet().execute(ide).get();\n\n List<Order> orderList;\n EmployeeHistoryAdapter employeeHistoryAdapter;\n Gson gson = new Gson();\n Type listType = new TypeToken<List<Order>>() {\n }.getType();\n orderList = new Gson().fromJson(result, listType);\n employeeHistoryAdapter = new EmployeeHistoryAdapter(AdminHomePage.this, orderList);\n orderNew.setAdapter(employeeHistoryAdapter);\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }*/\n\n }\n });\n }\n }\n });\n }\n }\n });\n mGoogleMap.setOnMyLocationButtonClickListener(onMyLocationButtonClickListener);\n mGoogleMap.setOnMyLocationClickListener(onMyLocationClickListener);\n enableMyLocationIfPermitted();\n mGoogleMap.getUiSettings().setZoomControlsEnabled(true);\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n LatLng latLngs = new LatLng(21.2514, 81.6296);\n builder.include(latLngs);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLngs)\n .zoom(13)\n .bearing(90)\n .tilt(30)\n .build();\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n /* set zoom position by this value */\n //\n }", "private void populateMap(Cursor data) {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n String language = preferences.getString(getActivity().getString(R.string.pref_key_language), getActivity().getString(R.string.pref_language_english));\n\n if (mMap != null && data.moveToFirst()) {\n //Get visibile bounds of map\n LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds;\n if (data.moveToFirst()) {\n do {\n int stationId = data.getInt(StationContract.COL_STATION_ID);\n if (bounds.contains(new LatLng(data.getDouble(StationContract.COL_STATION_LAT), data.getDouble(StationContract.COL_STATION_LONG)))) {\n\n if (mMarkerMap.indexOfKey(stationId)<0) {\n int bikesAvailable = data.getInt(StationContract.COL_BIKES_AVAILABLE);\n int spacesAvailable = data.getInt(StationContract.COL_SPACES_AVAILABLE);\n int markerDrawable = Utilities.getMarkerIconDrawable(bikesAvailable, spacesAvailable);\n String snippet = getString(R.string.snippet_string_bikes) + String.valueOf(bikesAvailable) + \" \" + getString(R.string.snippet_string_spaces) + String.valueOf(spacesAvailable);\n\n\n String title;\n if (language.equals(getActivity().getString(R.string.pref_language_english))) {\n title = data.getString(StationContract.COL_STATION_NAME_EN);\n } else if(language.equals(getActivity().getString(R.string.pref_language_pinyin))){\n int stringId = getResources().getIdentifier(\"station\" + String.valueOf(stationId), \"string\", getActivity().getPackageName());\n title = getString(stringId);\n }\n else {\n title = data.getString(StationContract.COL_STATION_NAME_ZH);\n }\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getDouble(StationContract.COL_STATION_LAT), data.getDouble(StationContract.COL_STATION_LONG))).title(title);\n markerOptions.snippet(snippet);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(markerDrawable));\n Marker marker = mMap.addMarker(markerOptions);\n mIdMap.put(marker, stationId);\n mMarkerMap.put(stationId, marker);\n }\n } else {\n //If the marker was previously on screen, remove it from the map and hashmap\n if (mMarkerMap.indexOfKey(stationId)>=0) {\n mMarkerMap.get(stationId).remove();\n mMarkerMap.remove(stationId);\n }\n }\n\n } while (data.moveToNext());\n }\n //If a station ID has been set from detail fragment, display its info window\n if (mStationId != -1) {\n Marker currentMarker = mMarkerMap.get(mStationId);\n if (currentMarker != null) {\n currentMarker.showInfoWindow();\n }\n }\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_map);\n\n\t\tdb = new DBManager(MapActivity.this);\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tmarker.add(new MarkerOptions());\n\n\t\tmGoogleMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t.findFragmentById(R.id.map)).getMap(); // 화면에 구글맵 표시\n\n\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp)); // 지정위치로\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 이동\n\t\tops.clear(); // 기존에 쌓여있을지 모르는 Polyline clear\n\n\t\tBundle bundle = getIntent().getExtras();\n\n\t\t// 집주소 읽기\n\t\tHomeLocation homeLoc = readSettingOptionFile(getApplicationContext());\n\t\tmyHomeX = homeLoc.x;\n\t\tmyHomeY = homeLoc.y;\n\t\tLog.v(TAG, \"myHomeX= \" + myHomeX + \"myHomeY= \" + myHomeY);\n\n\t\t// Main\n// cal.get(Calendar.YEAR)\n\t\tif (bundle == null) {\n\t\t\tresult = db\n\t\t\t\t\t.read(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1,\n\t\t\t\t\t\t\tcal.get(Calendar.DAY_OF_MONTH));\n\t\t} else {\n\t\t\tresult = db.read(bundle.getInt(\"curyear\"),\n\t\t\t\t\tbundle.getInt(\"curmonth\"), bundle.getInt(\"curday\"));\n\t\t}\n\n\t\t// 처음 화면과 Zoom-level을 설정.\n\t\tif (result.size() < 10) {\n\t\t\tCameraPosition cp = new CameraPosition.Builder()\n\t\t\t\t\t.target((new LatLng(result.get(0).getLatitude(), result\n\t\t\t\t\t\t\t.get(0).getLongitude()))).zoom(17).build();\n\t\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp));\n\t\t} else {\n\t\t\tCameraPosition cp = new CameraPosition.Builder()\n\t\t\t\t\t.target((new LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t.getLatitude(), result.get(result.size() - 1)\n\t\t\t\t\t\t\t.getLongitude()))).zoom(15).build();\n\t\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp));\n\t\t}\n\t\tLog.v(TAG, \"result.size() = \" + result.size());\n\n\t\t// 선택한 Day의 데이터를 바탕으로 행동별로 선을 그려주는 부분\n\t\tops.add(new PolylineOptions());\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\tswitch (result.get(i).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x99FF5A5A));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x9900C6ED));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\t\tnew LatLng(result.get(i).getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\ti).getLongitude())));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tops.add(new PolylineOptions());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (result.get(i).getMotionType()) {\n\t\t\tcase act_walk:\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i - 1).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i - 1).getLongitude())).color(0x99FF5A5A));\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x99FF5A5A));\n\t\t\t\tbreak;\n\t\t\tcase act_run:\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i - 1).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i - 1).getLongitude())).color(0x9900C6ED));\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x9900C6ED));\n\t\t\t\tbreak;\n\t\t\tcase act_stop:\n\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(), result.get(\n\t\t\t\t\t\t\t\ti - 1).getLongitude())));\n\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\tnew LatLng(result.get(i).getLatitude(), result.get(i)\n\t\t\t\t\t\t\t\t.getLongitude())));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tops.add(new PolylineOptions());\n\t\t\tindex++;\n\t\t}\n\n\t\t// 선택한 Day의 데이터를 바탕으로 행동별로 마커와 이동 시간을 그려주는 부분\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tif(result.get(i).getIsSleep() == 1)\n\t\t\t\tcontinue;\n\t\t\tif (i == 0) {\n\t\t\t\tstartIndex = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (i == result.size() - 1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tswitch (result.get(i - 1).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstartIndex = 0;\n\t\t\t\tendIndex = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (result.get(i).getMotionType() == result.get(i - 1)\n\t\t\t\t\t.getMotionType())\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tendIndex = i;\n\t\t\t\tswitch (result.get(i - 1).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t}\n\n\t\t// 마지막 행동에 대한 아이콘\n\t\tswitch (result.get(result.size() - 1).getMotionType()) {\n\t\tcase act_walk:\n\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\tbreak;\n\t\tcase act_run:\n\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\tbreak;\n\t\tcase act_stop:\n\t\t\tmGoogleMap\n\t\t\t\t\t.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\t// 수면여부 판단을 통해 화면에 그림을 그려주는 부분\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tdistanceToHome = distance(myHomeX, myHomeY, result.get(i)\n\t\t\t\t\t.getLatitude(), result.get(i).getLongitude(), 'k');\n\t\t\tLog.v(TAG, \"distanceToHome : \" + distanceToHome + \".........\");\n\t\t\tif (distanceToHome < 0.4)\n\t\t\t\thomeFlag = true;\n\t\t\telse\n\t\t\t\thomeFlag = false;\n\n//\t\t\tLog.v(TAG, \"homeFlag =\" + homeFlag);\n\n\t\t\tif (result.get(i).getIsSleep() == 1 && homeFlag) {\n\t\t\t\tif (sleepCount == 0)\n\t\t\t\t\tsleepCount++;\n\t\t\t\telse {\n\t\t\t\t\tif (result.get(i - 1).getIsSleep() == 1)\n\t\t\t\t\t\tsleepCount++;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tLog.e(TAG, \"sleepCount = \" + sleepCount + \".....\");\n\t\t\tif (sleepCount > 10) {\n\t\t\t\tif (result.get(i-1).getIsSleep() == 1) {\n\t\t\t\t\tmGoogleMap.addCircle(new CircleOptions()\n\t\t\t\t\t\t\t.center(new LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.radius(300).fillColor(0x9900C6ED)\n\t\t\t\t\t\t\t.strokeColor(0x5580F5FF));\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"수면\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.sleep)));\n//\t\t\t\t\tLog.e(TAG, \"수면시 반경표시 .....\");\n\t\t\t\t\tsleepCount=0;\n\t\t\t\t}\n\t\t\t}\n//\t\t\tLog.e(TAG, \"sleepCount = \" + sleepCount + \".....\");\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng hn = new LatLng(14.079526, -87.180662);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(hn));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(hn,7));\n helperFacturacion = new FacturacionHelper(MapListClientesActivity.this);\n\n\n addMarkers();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Polyline polyline = googleMap.addPolyline(new PolylineOptions().width(4).color(Color.BLACK));\n if(postions.size() > 2){\n polyline.setPoints(postions);\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(getCenterOfPolygon(postions), 15));\n }\n else{\n Toast.makeText(this, \"Route too short\", Toast.LENGTH_LONG).show();\n }\n }", "private Polyline initializePolyLine() {\n rectOptions.add(markers.get(0).getPosition());\n return googleMap.addPolyline(rectOptions);\n }", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_google_map);\n //quakeArrayList\n createMapView();\n addMarker();\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n @Override\n public View getInfoContents(Marker marker) {\n LatLng l = marker.getPosition();\n View v = getLayoutInflater().inflate(R.layout.marker_window_layout, null);\n TextView v1 = (TextView) v.findViewById(R.id.marker_window_lat);\n TextView v2 = (TextView) v.findViewById(R.id.marker_window_lon);\n\n String[] tmp = marker.getSnippet().split(\"\\n\");\n\n v1.setText(\"Time Info : \" + tmp[0].replace(\"T\" , \"\\n\"));\n v2.setText(\"Magnitude : \" + tmp[1]);\n return v;\n }\n });\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n marker.showInfoWindow();\n\n return false;\n }\n });\n }", "String getEdgesAtNewLocation(Integer pointId, Double lat, Double lng);", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "public void drawCircle() {\n mMap.clear();\n // Generate the points\n mMap.addPolygon(new PolygonOptions().addAll(points).strokeWidth(5).strokeColor(Color.RED).fillColor(Color.TRANSPARENT));\n // Create and return the polygon\n for (int i=0;i<points.size();i++){\n Log.v(\"DrawCircle\",\"drwaakmdaskfmlsmn\"+points.get(i));\n }\n\n\n\n }", "public void onMapSearch(View view) {\n\n EditText locationSearch = (EditText) findViewById(R.id.arrival);\n String location = locationSearch.getText().toString();\n List<Address>addressList = null;\n\n if (location != null || !location.equals(\"\")) {\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n\n } catch (IOException e) {\n Toast.makeText(this,\"Destination not found\",Toast.LENGTH_SHORT).show();\n\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n MarkerPoints.add(latLng);\n Toast.makeText(MapsActivity.this,\"added position 2 \"+MarkerPoints.size(),Toast.LENGTH_SHORT).show();\n\n mMap.addMarker(new MarkerOptions().position(latLng).draggable(true).title(location+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\").icon(BitmapDescriptorFactory.fromResource(R.drawable.flag)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n //listClients.add(new Client(R.drawable.flag,\"Nasser\",\"client2 requesting cab\",100,address.getLatitude(), address.getLongitude()));\n //Toast.makeText(MapsActivity.this,\"client attended at \"+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\",Toast.LENGTH_SHORT).show();\n\n\n\n /* if (MarkerPoints.size() > 2) {\n // MarkerPoints.clear();\n mMap.clear();\n }*/\n\n\n // Checks, whether start and end locations are captured\n if (MarkerPoints.size() >= 2) {\n LatLng origin = MarkerPoints.get(0);\n LatLng dest = MarkerPoints.get(MarkerPoints.size()-1);\n\n // Getting URL to the Google Directions API\n String url = getUrl(origin, dest);\n Log.d(\"onMapClick\", url.toString());\n FetchUrl FetchUrl = new FetchUrl();\n\n // Start downloading json data from Google Directions API\n FetchUrl.execute(url);\n //move map camera\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(origin));\n //mMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n build_retrofit_and_get_response(\"driving\");\n\n final View mapView = getSupportFragmentManager().findFragmentById(R.id.map).getView();\n if (mapView.getViewTreeObserver().isAlive()) {\n mapView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @SuppressLint(\"NewApi\")\n @Override\n public void onGlobalLayout() {\n LatLngBounds.Builder bld = new LatLngBounds.Builder();\n for (int i = 0; i < MarkerPoints.size(); i++) {\n LatLng ll = new LatLng(MarkerPoints.get(i).latitude, MarkerPoints.get(i).longitude);\n bld.include(ll);\n }\n LatLngBounds bounds = bld.build();\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 70));\n mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n\n }\n });\n }\n }\n\n }\n }", "private void drawMarkers () {\n // Danh dau chang chua di qua\n boolean danhDauChangChuaDiQua = false;\n // Ve tat ca cac vi tri chang tren ban do\n for (int i = 0; i < OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().size(); i++) {\n\n TourTimesheet timesheet = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().get(i);\n // Khoi tao vi tri chang\n LatLng position = new LatLng(timesheet.getmBuildingLocation().latitude, timesheet.getmBuildingLocation().longitude);\n // Thay doi icon vi tri chang\n MapNumberMarkerLayoutBinding markerLayoutBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.map_number_marker_layout, null, false);\n // Thay doi so thu tu timesheet\n markerLayoutBinding.number.setText(String.valueOf(i + 1));\n // Thay doi trang thai markup\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, thay doi mau sac markup thanh xam\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n } else if (dateEqual == 1) {\n // Tour chua dien ra, thay doi mau sac markup thanh vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\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(timesheet.getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheet.getmEndTime());\n if(srcStartEqual == 1){\n // Chang chua di qua\n if (danhDauChangChuaDiQua == true) {\n // Neu la chang sau chang sap toi thi chuyen thanh mau mau vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Neu la chang ke tiep thi giu nguyen mau do\n danhDauChangChuaDiQua = true;\n }\n } else if(srcStartEqual == -1 && srcEndEqual == 1){\n // Chang dang di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);\n } else{\n // Chang da di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n }\n }\n // Marker google map\n View markerView = markerLayoutBinding.getRoot();\n // Khoi tao marker\n MarkerOptions markerOptions = new MarkerOptions()\n .draggable(false)\n .title(timesheet.getmBuildingName() + '-' + timesheet.getmClassroomName())\n .position(position)\n .icon(BitmapDescriptorFactory.fromBitmap(getMarkerBitmapFromView(markerView)));\n if (timesheet.getmClassroomNote() != null && !timesheet.getmClassroomNote().equals(\"\") && !timesheet.getmClassroomNote().equals(\"null\")) {\n markerOptions.snippet(timesheet.getmClassroomNote());\n }\n mMap.addMarker(markerOptions);\n // add marker to the array list to display on AR Camera\n markerList.add(markerOptions);\n // Goi su kien khi nhan vao tieu de marker\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n // TODO: Chuyen sang man hinh thong tin chang khi nhan vao tieu de chang\n openTimesheetInfo(marker.getTitle());\n }\n });\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n //Get our mapManager singleton and give it the context\n mapManager = new MapManager(getActivity(), mMap);\n /*mapManager.drawAllTrainLines();\n mapManager.setMap(mMap);*/\n\n //Set up gpsManager with context\n gpsManager = GPSManager.getInstance();\n //Get the location manager service\n locationManager = (LocationManager) getActivity().getSystemService(getActivity().LOCATION_SERVICE);\n\n //Get the permissions for the location service if needed\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PermissionConstants.LOCATION_TrackerFragment.getValue());\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, gpsManager);\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, gpsManager);\n gpsManager.InitLocationManager(getActivity(), locationManager, mapManager);\n Log.v(\"Tracker\", \"No Permissions Required, hooked up gpsManager\");\n\n }\n mapManager.moveCameraToMe();\n new LoadMapLines(mMap, mapManager).execute();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "public void createPolygonMap(){\n Log.d(\"POLYGON MAP\",\"SETTING\");\n PolygonManager.getIstance().putPolygonRegion(gMap);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.i(\"MapWorks\", \"The map works\");\n mMap = googleMap;\n //center camera at her stuff\n //add pins\n // Add a marker in Sydney and move the camera\n LatLng currentLoc = new LatLng(myLat, myLong);\n mMap.addMarker(new MarkerOptions().position(currentLoc).title(\"Your Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLoc));\n// locs[1] = new LatLng(34, 119);\n// locs[2] = new LatLng(20, 130);\n if(null != locs) {\n Log.i(\"size of message: \", \" \"+ size);\n for (int i = 0; i < size; i++) {\n LatLng l = locs[i];\n mMap.addMarker(new MarkerOptions().position(l).title(names[i] + \" is a meteor of mass \" +\n masses[i] + \" that landed here in \" + years[i]));\n }\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n List<Marker> markerList = new ArrayList<>();\n\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// This displays the different map type styles\n// mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n// mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n\n mBoston = mMap.addMarker(new MarkerOptions()\n .position(BOSTON).title(\"Boston\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mBoston.setTag(0);\n markerList.add(mBoston);\n\n mDallas = mMap.addMarker(new MarkerOptions()\n .position(DALLAS).title(\"Dallas\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n mBoston.setTag(0);\n markerList.add(mDallas);\n\n mNYC = mMap.addMarker(new MarkerOptions()\n .position(NYC).title(\"NYC\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mBoston.setTag(0);\n markerList.add(mNYC);\n\n mMap.setOnMarkerClickListener(this);\n\n for(Marker m : markerList){\n LatLng latLng = new LatLng(m.getPosition().latitude, m.getPosition().longitude);\n mMap.addMarker(new MarkerOptions().position(latLng));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n }\n\n\n\n // Add a marker in Sydney and move the camera\n LatLng boston = new LatLng(42.3140089, -71.2504676);\n mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\"));\n// To change the marker color\n// mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\")\n// .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(boston));\n// To enter the Zoom on the map\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(boston, 20));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /* Wie bekomme ich die map daten vom anderen handy?\n erstmal nur copy paste..\n */\n LatLng westpark = new LatLng(50.771758, 6.068255);\n LatLng freundin = new LatLng(50.785474, 6.052972);\n\n Polyline polyline1 = mMap.addPolyline(new PolylineOptions()\n .clickable(true)\n .add(\n westpark,\n freundin));\n polyline1.setStartCap(new RoundCap());\n polyline1.setEndCap(new RoundCap());\n polyline1.setColor(R.color.colorPrimary);\n\n mMap.addMarker(new MarkerOptions().position(westpark).title(\"Westpark\"));\n mMap.addMarker(new MarkerOptions().position(freundin).title(\"Freundin\"));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westpark));\n mMap.moveCamera(CameraUpdateFactory.zoomTo(15));\n }", "private void getMarkers() {\n StringRequest strReq = new StringRequest(Request.Method.POST, Config.URL_GET_ALL_DEALER_SVC, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.e(\"Response: \", response);\n\n try {\n JSONObject jObj = new JSONObject(response);\n String getObject = jObj.getString(Config.TAG_JSON_ARRAY);\n JSONArray jsonArray = new JSONArray(getObject);\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n coy_dealer = jsonObject.getString(Config.MAPS_COY_DEALER);\n kd_dealer = jsonObject.getString(Config.MAPS_KD_DEALER);\n title = jsonObject.getString(Config.MAPS_NAMA_DEALER);\n description = jsonObject.getString(Config.MAPS_ALAMAT_DEALER);\n latLng = new LatLng(Double.parseDouble(jsonObject.getString(Config.MAPS_LAT)),\n Double.parseDouble(jsonObject.getString(Config.MAPS_LNG)));\n nview = jsonObject.getString(Config.MAPS_NVIEW);\n naccess = jsonObject.getString(Config.MAPS_NACCESS);\n\n // Menambah data marker untuk di tampilkan ke google map\n addMarker(latLng, title, description, kd_dealer, coy_dealer, nview, naccess);\n }\n\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error: \", error.getMessage());\n Toast.makeText(ListDealerMaps.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n\n AppController.getInstance().addToRequestQueue(strReq, Config.TAG_JSON_OBJ);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"startMap\");\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n mMap = googleMap;\n requestLocationPermision();\n requestMarkers();\n Log.d(TAG, \"Map listo\");\n }", "protected abstract void setMarkers();", "@Override\n public void onResume() {\n super.onResume();\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity.isConnectedToNetwork()) {\n setUpMapIfNeeded();\n }\n if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) {\n //starts the mainActivity monitoring geofences\n mainActivity.getGeofenceMonitor().startGeofenceMonitoring();\n isMonitoringGeofences = true;\n }\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n if(needToCallUpdateGeofences) {\n updateGeofences();\n }\n }", "private void showPoints() {\n\t\tMarkerOptions options = new MarkerOptions();\n\n\t\tfor (Integer i = 0; i < markerPoints.size(); i++) {\n\t\t\tLatLng point = markerPoints.get(i);\n\n\t\t\t// Setting the position of the marker\n\t\t\toptions.position(point);\n\n\t\t\t// Setting title for the MarkerOptions\n\t\t\toptions.title(names.get(i));\n\t\t\t// Setting snippet for the MarkerOptions\n\t\t\toptions.snippet(\"Latitude:\" + point.latitude + \",Longitude: \"\n\t\t\t\t\t+ point.longitude);\n\n\t\t\tif (statusVal == 0) {\n\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n\n\t\t\t} else {\n\t\t\t\toptions.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n\t\t\t}\n\n\t\t\t// Add new marker to the Google Map Android API V2\n\t\t\tgMmap.addMarker(options);\n\n\t\t\t// Creating CameraUpdate object for position\n\t\t\tCameraUpdate updatePosition = CameraUpdateFactory.newLatLngZoom(\n\t\t\t\t\tpoint, 15);\n\n\t\t\t// Applying zoom to the marker position\n\t\t\tgMmap.animateCamera(updatePosition);\n\t\t}\n\n\t}", "public void registerGeofences(List<LBAction> actions){\n for(LBAction act:actions){\n registerGeofence(act);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\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}", "private void updateMyMarkers(List<MarkerOptions> markers) {\n if(myGoogleMap == null) return;\n\n myGoogleMap.clear();\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (MarkerOptions m : markers) {\n myGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(m.getPosition(), 15), 1000, null);\n myGoogleMap.addMarker(new MarkerOptions()\n .position(m.getPosition())\n .title(m.getTitle())/*.snippet(m.getSnippet())*/.icon(m.getIcon()));\n builder.include(m.getPosition());\n }\n\n LatLngBounds bounds = builder.build();\n int padding = 0; // offset from edges of the map in pixels\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);\n myGoogleMap.animateCamera(cu);\n }", "public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<LatLng> cluster = (ArrayList<LatLng>)intent.getSerializableExtra(\"cluster\");\n Log.i(\"cluster\", \"Got cluster: \" + cluster.size());\n for(LatLng center : cluster) {\n drawGeofence(center);\n }\n }", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "@Override\n public void onMapClick( LatLng latLng ) {\n googleMap.clear();\n Log.d( \"LAT/LONG\", latLng.toString() );\n googleMap.addCircle( new CircleOptions()\n .center( latLng )\n .radius( 10000 )\n .strokeColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.colorLightPurple ) )\n .fillColor( ContextCompat.getColor( Objects.requireNonNull( getContext() ), R.color.transparentcolorLightPurple ) ) );\n\n googleMap.addMarker( new MarkerOptions().position( latLng )\n .icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory.HUE_VIOLET ) ) );\n googleMap.moveCamera( CameraUpdateFactory.newLatLngZoom( latLng, 10.0f ) );\n cLocate = latLng;\n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }" ]
[ "0.7627845", "0.6985864", "0.65373707", "0.65079224", "0.6486823", "0.6435145", "0.6427536", "0.63426584", "0.6274068", "0.62357414", "0.6185849", "0.6172695", "0.6130096", "0.6031238", "0.5998671", "0.59968066", "0.59808135", "0.5975515", "0.59485203", "0.5944535", "0.5907169", "0.58881134", "0.5862579", "0.5797483", "0.57939166", "0.5782522", "0.5777991", "0.5773244", "0.5761398", "0.5760745", "0.57560146", "0.5753406", "0.57387894", "0.57291234", "0.57266337", "0.5713618", "0.57008123", "0.569868", "0.56704336", "0.56647474", "0.56450224", "0.56367445", "0.5635032", "0.5630707", "0.5617501", "0.5585182", "0.55669034", "0.55563104", "0.5555758", "0.5542507", "0.553322", "0.5531939", "0.55285597", "0.5528346", "0.55175656", "0.5499809", "0.5499663", "0.54995215", "0.5485229", "0.54783446", "0.547819", "0.54757917", "0.54704714", "0.54701275", "0.5449194", "0.5439341", "0.54369265", "0.54336625", "0.54336", "0.54194224", "0.54116327", "0.5394736", "0.5389798", "0.53839904", "0.538275", "0.5381243", "0.537515", "0.53727293", "0.5371122", "0.53689545", "0.53629535", "0.53556013", "0.53489906", "0.5333251", "0.5323714", "0.53229284", "0.5309575", "0.5309497", "0.530141", "0.5287409", "0.5276443", "0.5270332", "0.5259063", "0.5258598", "0.5256072", "0.5256029", "0.52555907", "0.52266395", "0.5226459", "0.5225511" ]
0.5802652
23
Shows a popover to display nearby memories
private void showMemoriesPopover(){ RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); relLayoutTutorial.setVisibility(View.GONE); FragmentManager fm = getActivity().getSupportFragmentManager(); RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(this); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom); fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, "RecyclerViewPopoverFragment"); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n showMemoriesPopover();\n }", "public void showAddMemoriesPopover(){\n Log.i(logMessages.MEMORY_MONITORING, \"HistoryFragment : showAddMemoriesPopover called\");\n FragmentManager fm = getActivity().getSupportFragmentManager();\n AddMemoryFragment addMemoryFragment = AddMemoryFragment.newInstance();\n\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom);\n fragmentTransaction.replace(R.id.fragment_container, addMemoryFragment, \"AddMemoriesFragment\");\n\n fragmentTransaction.commit();\n }", "private void show() {\n\t\tdouble position = rootNode.getLayoutY();\n\n\t\tif (position >= -OFFSET && isPopping) {\n\t\t\trootNode.setLayoutY(position + SPEED);\n\t\t\tif (position + SPEED >= 40) {\n\t\t\t\tisPopping = false;\n\t\t\t}\n\n\t\t} else {\n\t\t\trootNode.setLayoutY(position - SPEED);\n\t\t\tif (position - SPEED <= -OFFSET) {\n\t\t\t\tcurrentPopUp = null;\n\t\t\t\trootNode.setLayoutY(-OFFSET);\n\t\t\t}\n\t\t}\n\t}", "private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject);\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name);\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "public void showOPanel(Point p) {\r\n \r\n \t}", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void show() {\n\t\tsetLocation(\n\t\t\tgetOwner().getX() + (getOwner().getWidth() - getWidth()) / 2, \n\t\t\tgetOwner().getY() + (getOwner().getHeight() - getHeight()) / 2 );\n\n\t\tsuper.show();\n\t}", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "public void showTipDialog() {\n this.controller.showTipModal(C7251R.string.lys_dls_photo_tip_title, C7251R.string.lys_dls_photo_tip_text, NavigationTag.LYSAddPhotosTip);\n }", "void showTooltip();", "public void showObject(){\n Resources res = getResources();\r\n Bitmap drag1Bitmap = BitmapFactory.decodeResource(res , R.drawable.drag1);\r\n Bitmap drag2Bitmap = BitmapFactory.decodeResource(res , R.drawable.drag2);\r\n Bitmap yandexBitmap = BitmapFactory.decodeResource(res , R.drawable.yandex);\r\n\r\n // Create a layer of objects for the map\r\n DragAndDropOverlay overlay = new DragAndDropOverlay(mMapController);\r\n\r\n // Create an object for the layer\r\n DragAndDropItem drag1Item = new DragAndDropItem(new GeoPoint(55.752004 , 37.617017), drag1Bitmap);\r\n // Set offsets of the image to match the balloon tail with the specified GeoPoint\r\n drag1Item.setOffsetX(7);\r\n drag1Item.setOffsetY(-23);\r\n // Make the object draggable\r\n drag1Item.setDragable(true);\r\n\r\n // Create a balloon model for the object\r\n BalloonItem balloonDrar1 = new BalloonItem(drag1Item.getGeoPoint(), null);\r\n balloonDrar1.setText(getString(R.string.drag));\r\n // Set the additional balloon offset\r\n balloonDrar1.setOffsetX(-10);\r\n // Add the balloon model to the object\r\n drag1Item.setBalloonItem(balloonDrar1);\r\n // Add the object to the layer\r\n overlay.addOverlayItem(drag1Item);\r\n\r\n\r\n // Create an object for the layer\r\n DragAndDropItem drag2Item = new DragAndDropItem(new GeoPoint(55.734029 , 37.588499), drag2Bitmap);\r\n // Set offsets of the image to match the balloon tail with the specified GeoPoint\r\n drag2Item.setOffsetX(7);\r\n drag2Item.setOffsetY(-23);\r\n // Make the object draggable\r\n drag2Item.setDragable(true);\r\n\r\n // Create the balloon model for the object\r\n BalloonItem balloonDrag2 = new BalloonItem(drag2Item.getGeoPoint(), yandexBitmap);\r\n balloonDrag2.setText(getString(R.string.drag));\r\n balloonDrag2.setAlign(BalloonRender.ALIGN_BOTTOM | BalloonRender.ALIGN_CENTER);\r\n // Set the additional balloon offset\r\n balloonDrag2.setOffsetX(-10);\r\n // Add the balloon model to the object\r\n drag2Item.setBalloonItem(balloonDrag2);\r\n // Add the object to the layer\r\n overlay.addOverlayItem(drag2Item);\r\n\r\n // Add the layer to the map\r\n mOverlayManager.addOverlay(overlay);\r\n }", "public void actualShowWorldChest(){\n\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"WorldChest\");\n\t\tel.show();\n\t\tfor(Item it : screenManager.getInventoryManager().getOpenWorldChest()){\n\t\t\tif(it.getInventoryPosition() != null){\n\t\t\t\tElement toHide = nifty.getScreen(\"hud\").findElementByName(\"hoverstats-\"+it.getId());\n\t\t\t\tif(toHide!=null){\n\t\t\t\t\ttoHide.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMouseOver(MouseOverEvent event) {\n popup.setPositionAndShow(event);\n }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void show() {\n visible=true;\n }", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "public void showBoomKeyTip() {\n }", "protected void displayPopulation() {\n \n /**/println(\"\\nDisplaying population:\", 0);\n for(int i = 0; i < population_size; i++) {\n println(\"i = \" + i, 1);\n if(population[i] == null) {\n //System.exit(0);\n }\n displayChromosome(population[i], 0);\n }\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "static void showOverlay() {\n\t\ti1.setOverlay(OL);\n\t}", "public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void show() {\n numberList.show();\n }", "public ShowWarehouseMore(UserMenu um) {\n initComponents();\n view=ViewLogic.getInstance();\n this.um=um;\n icon_plus.setVisible(false);\n icon_remove.setVisible(false);\n partsTableLayeredPane.setVisible(false);\n vehicleLayeredPane.setVisible(false);\n Add_btn1.setVisible(false);\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void show() {\n if (mPopupWindow.isShowing()) return;\n\n mRectProvider.startObserving(this);\n\n updatePopupLayout();\n showPopupWindow();\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "public boolean shown();", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "public void showWarningPopup() {\n\t\ttv_popupTitle.setText(\"Power Warning\");\n\t\ttv_popupInfo.setText(R.string.warning);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "private void updatePopupPosition() {\n // get the annotation's screen coordinates\n SKScreenPoint screenPoint = mapView.coordinateToPoint(selectedAnnotation.getLocation());\n // change the popup's (screen) position\n mapPopup.changePosition(screenPoint.getX(), screenPoint.getY(), 65);\n }", "@Override\r\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "private void inspectShelterAt(Point p)\n {\n // Ignore clicks outside the actual grid of shelters\n int col = (int) p.getX();\n if ( col < 0 ) return;\n if ( col >= shelters.getGridWidth() ) return;\n \n int row = (int) p.getY();\n if ( row < 0 ) return;\n if ( row >= shelters.getGridHeight() ) return;\n \n Shelter s = shelters.getShelterAt( col, row );//shelterGrid[col][row];\n\n if (s != null)\n {\n // use hash map to see if the window is already created, and if so,\n // just focus; otherwise, create a new inspector window\n double time = simulation.getTime();\n String id = s.getRow() + \",\" + s.getCol() + \" \" + time;\n ShelterInspector window = ShelterInspector.windowList.get(id);\n if (window == null)\n {\n window = new ShelterInspector(s, time, id);\n ShelterInspector.windowList.put(id, window);\n }\n window.setVisible(true);\n }\n }", "void show_info() {\n\t\tsetAlwaysOnTop(false);\n\n\t\tString msg = \"<html><ul><li>Shortcuts:<br/>\"\n\t\t\t\t+ \"(\\\") start macro<br/>\"\n\t\t\t\t+ \"(esc) exit<br/><br/>\"\n\t\t\t\t+ \"<li>Author: <b>Can Kurt</b></ul></html>\";\n\n\t\tJLabel label = new JLabel(msg);\n\t\tlabel.setFont(new Font(\"arial\", Font.PLAIN, 15));\n\n\t\tJOptionPane.showMessageDialog(null, label ,\"Info\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\tsetAlwaysOnTop(true);\n\t}", "@Override\n\tpublic void move(Herbivore h, Plant p) {\n\t\tif(Flatland.distance(myX, myY, h.getX(), h.getY()) < 50){\n\t\t\tisHidden = false;\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmyColor = StdDraw.RED;\n\t\t}\n\t\telse{\n\t\t\tisHidden = true;\n\t\t\tmyX = myX;\n\t\t\tmyY = myY;\n\t\t\tmyColor = StdDraw.GREEN;\n\t\t}\n\t\t//if moved off screen, predator shows up on other side\n\t\tif(myX < 0){\n\t\t\tmyX = 1000;\n\t\t}\n\t\tif(myX > 1000){\n\t\t\tmyX = 0;\n\t\t}\n\t\tif(myY < 0){\n\t\t\tmyY = 1000;\n\t\t}\n\t\tif(myY > 1000){\n\t\t\tmyY = 0;\n\t\t}\n\t}", "void showCustomizer();", "public void showMyLocation() {\n if (myLocationoverlay.getLastFix() == null) return;\n\n boolean r = isMyLocationVisible(); // whether the current location is visible\n if (!r) {\n GeoPoint cl = new GeoPoint(myLocationoverlay.getLastFix());\n showLocation(cl.getLatitude(), cl.getLongitude());\n }\n }", "public void displayInformation(View view) {\n layoutInflater = (LayoutInflater) getApplicationContext().getSystemService(LAYOUT_INFLATER_SERVICE);\r\n ViewGroup container = (ViewGroup) layoutInflater.inflate(R.layout.question_mark_popup,null);\r\n\r\n// popupWindow = new PopupWindow(container,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,true);\r\n// popupWindow.showAtLocation(view, Gravity.NO_GRAVITY,100,1300);\r\n\r\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\r\n popupWindow = new PopupWindow(container, width, height, true);\r\n\r\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\r\n\r\n container.setOnTouchListener(new View.OnTouchListener(){\r\n @Override\r\n public boolean onTouch(View view, MotionEvent motionEvent){\r\n popupWindow.dismiss();\r\n return true;\r\n }\r\n });\r\n\r\n }", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "public void show() {\n\t\tshown = true;\n\t\t\n\t\tfor(CustomScoreboardEntry entry : entries)\n\t\t\tentry.show();\n\t}", "public void show() {\r\n\t\tif (getSpawnLocation() == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (!checkItem()) {\r\n\t\t\titem \t= getWorld().dropItem(getSpawnLocation(), getItemStack());\r\n\t\t\titem.setVelocity(new Vector(0, 0.1, 0));\r\n\t\t\titem.setPickupDelay(1000);\r\n\t\t\t\r\n\t\t}\r\n\t\tisVisible \t= true;\r\n\t}", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\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}", "@Override\n public void show() {\n }", "private void showMessage(int position) {\n // Open Bottom sheet and show details\n }", "private void showPanel()\n {\n currentPanel = this;\n isLiked = thisIsLiked;\n currentActivityId = thisActivityId;\n viewAll.setVisible(false);\n avatarPanel.clear();\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"top\", likeCountLink.getAbsoluteTop() + \"px\");\n DOM.setStyleAttribute(usersWhoLikedPanelWrapper.getElement(), \"left\", likeCountLink.getAbsoluteLeft() + \"px\");\n \n for (PersonModelView liker : likers)\n {\n avatarPanel.add(new AvatarLinkPanel(EntityType.PERSON, liker.getUniqueId(), liker.getId(), liker\n .getAvatarId(), Size.VerySmall, liker.getDisplayName()));\n }\n \n if (likeCount > MAXLIKERSSHOWN)\n {\n viewAll.setVisible(true);\n }\n likedLabel.setText(likeCount + \" people liked this\");\n innerLikeCountLink.setText(likeCount.toString());\n }", "public void showPile() {\n Nodo rounded = lastIn;\n while (rounded != null) {\n List += rounded.info + \"\\n\";\n rounded = rounded.next;\n }\n JOptionPane.showMessageDialog(null, List);\n List = \"\";\n }", "public void showOpponentMap(Admiral admiral) {\r\n\t\tint[] mapGrid = returnOpponent(admiral).getMapGrid();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The map of admiral: \"\r\n\t\t\t\t+ returnOpponent(admiral).getAdmiralName());\r\n\t\tSystem.out.print(\" \");\r\n\t\tfor (int i = 0; i < Constants.COLUMNS_TITLES.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + Constants.COLUMNS_TITLES[i]);\r\n\t\t}\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tfor (int j = 0; j < Constants.ROW_LENGTH; j++) {\r\n\t\t\tif (j < 9) {\r\n\t\t\t\tSystem.out.print(j + 1 + \" \");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.print(j + 1);\r\n\t\t\t}\r\n\t\t\tfor (int k = 0; k < Constants.ROW_LENGTH; k++) {\r\n\t\t\t\tString cell = null;\r\n\t\t\t\tif (mapGrid[j * Constants.ROW_LENGTH + k] == 0\r\n\t\t\t\t\t\t|| mapGrid[j * Constants.ROW_LENGTH + k] == 1) {\r\n\t\t\t\t\tcell = \" \" + \"0\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == -1) {\r\n\t\t\t\t\tcell = \" \" + \"*\";\r\n\t\t\t\t} else if (mapGrid[j * Constants.ROW_LENGTH + k] == 2) {\r\n\t\t\t\t\tcell = \" \" + \"X\";\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(cell);\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "@Override\n\tpublic void shown() {\n\n\t}", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}", "private void showPopupMenu(MouseEvent event) {\n boolean isPointClick = drawnX1.equals(drawnX2) && drawnY1.equals(drawnY2);\n\n\n miEditStaircaseGroup.setEnabled(false);\n\n\n if (isPointClick) {\n miAddRoom.setEnabled(false);\n miAddLink.setEnabled(false);\n miAddStaircase.setEnabled(false);\n if (current.selected() != null && !current.selected().isEmpty()) {\n miRemoveSelection.setEnabled(true);\n miRenameArea.setEnabled(true);\n }\n if (current.selected().size() > 1) {\n miRenameArea.setEnabled(false);\n }\n if (current.isGroupCreatePossible()) {\n miCreateGroup.setEnabled(true);\n } else {\n miCreateGroup.setEnabled(false);\n }\n if (current.isGroupRemovePossible()) {\n miRemoveGroup.setEnabled(true);\n } else {\n miRemoveGroup.setEnabled(false);\n }\n if (this.hoveringOverStaircaseId != null) miEditStaircaseGroup.setEnabled(true);\n } else {\n miAddRoom.setEnabled(true);\n miAddLink.setEnabled(true);\n miAddStaircase.setEnabled(true);\n miRemoveSelection.setEnabled(false);\n miRenameArea.setEnabled(false);\n miCreateGroup.setEnabled(false);\n miRemoveGroup.setEnabled(false);\n }\n\n //update the floors\n mSwitchToFloor.removeAll();\n floorItems = null;\n ButtonGroup group = new ButtonGroup();\n if (Database.getInstance().getNumberOfFloors() > 0)\n\n {\n floorItems = new HashSet<JRadioButtonMenuItem>();\n for (int i = 0; i < current.numberOfFloors(); ++i) {\n JRadioButtonMenuItem item = new JRadioButtonMenuItem(\"Floor #\" + i);\n item.addActionListener(this);\n mSwitchToFloor.add(item);\n\n floorItems.add(item);\n group.add(item);\n }\n mSwitchToFloor.setEnabled(true);\n\n } else\n\n {\n mSwitchToFloor.setEnabled(false);\n }\n\n\n popupMenu.show(event.getComponent(), drawnX2, drawnY2);\n }", "public void openPharmacyPanel(){\n\t\tpanel.setVisible(true);\n\t}", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t}", "public void show() {\n hidden = false;\n }", "private void showPopUpMenu() {\n\t\tPopupMenu popup = new PopupMenu(getActivity(), moreButton);\n\t\tpopup.getMenuInflater().inflate(R.menu.popup_menu, popup.getMenu());\n\n\t\tpopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\n\t\t\t\tif (item.getTitle().equals(\"About\")) {\n\t\t\t\t\tUtils.startActivity(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\tcom.allpoint.activities.tablet.AboutActivity_.class,\n\t\t\t\t\t\t\tfalse, false, false);\n\t\t\t\t} else {\n\t\t\t\t\tshowSettingFrag();\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tpopup.show();// showing popup menu\n\t}", "public void show() {\n\t\thidden = false;\n\t}", "@Override\n public void onClickBeyondarObject(ArrayList<BeyondarObject> beyondarObjects) {\n if (beyondarObjects.size() > 0) {\n Toast.makeText(this, \"Clicked on: \" + beyondarObjects.get(0).getId(), Toast.LENGTH_LONG).show();\n if(mPlaceDetail!=null)\n {\n if(currentDisplayMode!=DISPLAY_PLACE_DETAIL)\n {\n if(!mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getName().equals(mPlaceDetail.get(0).getName()))\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n }\n else\n {\n generateWorld(mWorld,mPlaceDetail,viewSetting,true);\n previousDisplayMode=currentDisplayMode;\n currentDisplayMode=DISPLAY_PLACE_DETAIL;\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);\n }\n }\n else\n {\n performPlaceDetailSearch(mPlaceListMain.get((int)beyondarObjects.get(0).getId()).getPlace_id());\n\n }\n }\n }", "@Override\n\tpublic void showItems(JZMatchBean bean, LinearLayout parent_layout) {\n\t\t\n\t}" ]
[ "0.68409836", "0.616995", "0.60707116", "0.5902692", "0.58571774", "0.58503467", "0.57764995", "0.5771913", "0.5694098", "0.5623028", "0.5504711", "0.5465601", "0.5436312", "0.5425514", "0.5414868", "0.54069775", "0.53985417", "0.53372216", "0.530614", "0.52899295", "0.5242694", "0.52263737", "0.5207597", "0.519695", "0.5177288", "0.5167021", "0.5159521", "0.5153387", "0.5141566", "0.51396036", "0.51396036", "0.51396036", "0.5136088", "0.51348203", "0.5133821", "0.51221883", "0.51063496", "0.5099567", "0.50953275", "0.5094044", "0.5081527", "0.50813013", "0.5073008", "0.5073008", "0.5068491", "0.50645703", "0.5062602", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.50566244", "0.5045164", "0.503698", "0.5035777", "0.5029018", "0.502824", "0.50277716", "0.50276333", "0.50276333", "0.50276333", "0.50276333", "0.50276333", "0.50276333", "0.50276333", "0.50276333", "0.50271714", "0.5014722", "0.5013158", "0.5006484", "0.50021005", "0.5002059", "0.49958935", "0.49955413", "0.49917135", "0.498872", "0.4988202", "0.49796438", "0.49796438", "0.4977052", "0.49684793", "0.49657494", "0.49584928", "0.4952646", "0.4952646", "0.49515796", "0.49493265", "0.49482822", "0.49451596", "0.49440205" ]
0.65095043
1
shows a popover for user to add a memory
public void showAddMemoriesPopover(){ Log.i(logMessages.MEMORY_MONITORING, "HistoryFragment : showAddMemoriesPopover called"); FragmentManager fm = getActivity().getSupportFragmentManager(); AddMemoryFragment addMemoryFragment = AddMemoryFragment.newInstance(); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom); fragmentTransaction.replace(R.id.fragment_container, addMemoryFragment, "AddMemoriesFragment"); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n showMemoriesPopover();\n }", "private void showMemoriesPopover(){\n\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(this);\n\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "private void addMoreAddress() {\n toolbar.setTitle(R.string.deliver_address);\n DeliveryAddressFragment deliveryAddressFragment = new DeliveryAddressFragment();\n displaySelectedFragment(deliveryAddressFragment);\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n public void show() {\n }", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t}", "void add(String prompt, UIMenuAction action);", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "@FXML\n void displayPD() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPD = company.printByDepartment();\n generalTextArea.appendText(employeeListPD);\n }", "public GUIMemoryView(EventManager eventManager) {\r\n super(\"Memory View\");\r\n\r\n this.eventManager = eventManager;\r\n\r\n setup();\r\n\r\n // add events to listen to\r\n EventManager.EVENT[] events = {\r\n EventManager.EVENT.MEMORY_CHANGE,\r\n EventManager.EVENT.EMULATOR_CLEAR,\r\n EventManager.EVENT.EMULATOR_READY\r\n };\r\n\r\n this.eventManager.addEventObserver(events, this);\r\n\r\n // trigger an update\r\n eventManager.sendEvent(EventManager.EVENT.MEMORY_REQUEST_UPDATE);\r\n }", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "public void show() {\n numberList.show();\n }", "public void startActionsViewMemory() {\n\t\tGridBagConstraints cb;\n\t\tcb = new GridBagConstraints();\n\t\tcb.insets = new Insets(5, 5, 5, 5);\n\t\t\n\t\tString[] choices = null;\n\t\tint i = 0;\n\t\tDefaultListModel<String> listModel = new DefaultListModel<>();\n\n\t\tPatlist = new JList<>();\n\t\tPatlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tPatlist.setLayoutOrientation(JList.VERTICAL);\n\t\tPatlist.setVisibleRowCount(-1);\n\n\t\tIPlist = new JList<>();\n\t\tIPlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tIPlist.setLayoutOrientation(JList.VERTICAL);\n\t\tIPlist.setVisibleRowCount(-1);\n\n\t\tlist = new JList<>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t\tlist.setVisibleRowCount(-1);\n\n\t\tPatlistScroller = new JScrollPane(Patlist);\n\t\tPatlistScroller.setPreferredSize(new Dimension(250, 250));\n\t\tPatlistScroller.setBackground(Color.WHITE);\n\n\t\tIPlistScroller = new JScrollPane(IPlist);\n\t\tIPlistScroller.setPreferredSize(new Dimension(250, 250));\n\t\tIPlistScroller.setBackground(Color.WHITE);\n\n\t\tlistScroller = new JScrollPane(list);\n\t\tlistScroller.setPreferredSize(new Dimension(550, 250));\n\t\tlistScroller.setBackground(Color.WHITE);\n\n\t\tcb = new GridBagConstraints();\n\t\tcb.insets = new Insets(5, 5, 5, 5);\n\n\t\tJLabel title = new JLabel(\n\t\t\t\t\"Choose from list of registered machines to view updated malicious ips/patterns for this machine\");\n\t\tcb.gridx = 0;\n\t\tcb.gridy = 0;\n\t\tcb.gridwidth = 4;\n\t\tpanel.add(title, cb);\n\t\tcb.gridwidth = 1;\n\n\t\tlistlabel = new JLabel(\"Registered Machines\");\n\t\tcb.gridx = 0;\n\t\tcb.gridy = 2;\n\t\tpanel.add(listlabel, cb);\n\n\t\tiplabel = new JLabel(\"Malicious IPs\");\n\t\tcb.gridx = 2;\n\t\tcb.gridy = 2;\n\t\tpanel.add(iplabel, cb);\n\n\t\tpatlabel = new JLabel(\"Malicious Patterns\");\n\t\tcb.gridx = 3;\n\t\tcb.gridy = 2;\n\t\tpanel.add(patlabel, cb);\n\n\t\tcb.gridx = 0;\n\t\tcb.gridy = 3;\n\t\tpanel.add(listScroller, cb);\n\n\t\tcb.gridx = 2;\n\t\tcb.gridy = 3;\n\t\tpanel.add(IPlistScroller, cb);\n\n\t\tcb.gridx = 3;\n\t\tcb.gridy = 3;\n\t\tpanel.add(PatlistScroller, cb);\n\n\t\tprintB = new JButton(\"Print >>\");\n\t\tcb.gridx = 1;\n\t\tcb.gridy = 3;\n\t\tpanel.add(printB, cb);\n\t\tgui.validate();\n\t\tgui.repaint();\n\t\tMap<String, MaliciousPatterns> mem = Memory.getMem();\n\t\tif (!mem.keySet().isEmpty()) {\n\t\t\tchoices = new String[mem.keySet().size()];\n\t\t\tfor (String temp : mem.keySet()) {\n\t\t\t\tchoices[i] = temp;\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t\tfor (String temp : choices) {\n\t\t\t\tlistModel.addElement(temp);\n\t\t\t}\n\t\t\tDisplayDataEvent event = new DisplayDataEvent(gui, Memory, list,\n\t\t\t\t\tIPlist, Patlist);\n\t\t\tprintB.addActionListener(event);\n\n\t\t}\n\n\t}", "private void createCardsEditingItem()\n {\n cardsEditing = new JMenuItem(\"Zobrazení a úprava karet\");\n cardsEditing.setMnemonic('Z');\n cardsEditing.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e)\n {\n cards.setVisible(true);\n }\n });\n add(cardsEditing);\n }", "@FXML\n void displayPA() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPA = company.print();\n generalTextArea.appendText(employeeListPA);\n\n }", "private static void showMemoList() {\n\t\t\n\t}", "@FXML\n\tprivate void handleAdd() {\n\t\tshowCustomerInfoDialog(null);\t\n\t}", "@Override\n\t\tpublic void postShow() {\n\t\t\tif (bmoRequisition.getSupplierId().toInteger() > 0)\n\t\t\t\tsetFormatEmailTo(bmoRequisition.getBmoSupplier().getEmail().toString(), bmoRequisition.getBmoSupplier().getName().toString());\n\n\t\t\tif (!newRecord)\n\t\t\t\tbuttonPanel.add(lifeCycleShowButton);\n\t\t\t// Mostrar boton cuando NO tenga un recibo(en parcial/total) y tenga un pagos de anticipo\n\t\t\tif (enableCheekingCostTravelExpense(false))\n\t\t\t\tbuttonPanel.add(verifyTravelExpenseShowButton);\n\t\t\telse {\n\t\t\t\tbuttonPanel.add(copyRequisitionDialogButton);\n\t\t\t}\n\n\t\t\tgetBmoOrderType(((BmoFlexConfig)getSFParams().getBmoAppConfig()).getDefaultOrderTypeId().toInteger());\t\n\t\t}", "@Override\n\tpublic void actionPerformed(final ActionEvent event) {\n\t\tshowNew();\n\t}", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "@Override\n public void show() {\n \n }", "@FXML\n public void newMedico() {\n new MedicoPaneCadastroController().abrirJanela(\"./View/MedicoPaneCadastro.fxml\", \"Novo Médico\", null);\n populaTabela();\n\n }", "@FXML\n void displayPH() {\n generalTextArea.clear();\n clearEverything();\n String employeeListPH = company.printByDate();\n generalTextArea.appendText(employeeListPH);\n\n }", "public void show() {\n }", "public void show()\r\n {\r\n\tshow(\"\");\r\n }", "public void act_newPerson(ActionEvent actionEvent) {\n try {\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"newPersonGUI.fxml\"));\n Stage stage = new Stage();\n stage.setTitle(\"New Person\");\n stage.setScene(new Scene(root, 400, 300));\n stage.setResizable(false);\n stage.show();\n stage.setOnHiding(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent event) {\n event.consume();\n fillCombobox();\n }\n });\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void checkToMyDetail() {\n toolbar.setTitle(R.string.my_detail);\n MyDetailFragment myDetailFragment = new MyDetailFragment();\n displaySelectedFragment(myDetailFragment);\n }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "private void showInstructions() {\n Alert popUp = new Alert(Alert.AlertType.INFORMATION);\n popUp.setTitle(\"Instructions\");\n popUp.setContentText(\"The size field in the bottom let controls the board demensions.\" \n + \"The coord field in the bottom right controls the starting point of the tour \" \n + \"where 0 <= x, y < size. \"\n + \"Press enter with the text field in focus to submit changes. \"\n + \"Changes submitted to the coordinate field will start a new tour. \"\n + \"Depending on the conditions it could take a while!\");\n\n popUp.showAndWait();\n }", "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "public void show();", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject);\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name);\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "@FXML\n private void copyAdd() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(ADD_MESSAGE);\n clipboard.setContent(url);\n }", "private void addBotionActionPerformed(ActionEvent e) {\n new AddUser().setVisible(true);\n this.dispose();\n }", "public void show() {\r\n show(\"\");\r\n }", "private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "public show_medicine() {\n initComponents();\n upDateDB();\n this.setLocationRelativeTo(null);\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "public void showStoreButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.SHOW_STORE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public void updateDetailWindow();", "@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 }", "void show() {\r\n System.out.println(\"regno:\"+regno + \"\\n name\"+ name + \"\\n marks :\" + m1+\",\"+m2+\",\"+m3);\r\n }", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "public dlgSelectiveAllocate( java.awt.Frame parent, boolean modal, abPlaceable p ) {\n super(parent, modal);\n initComponents();\n setTitle( \"Selective Allocation\" );\n setResizable( false );\n Parent = (ifMechForm) parent;\n Item = p;\n CurLoadout = Parent.GetMech().GetLoadout();\n InitializeSingle();\n }", "void showCustomizer();", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "protected void addMemorySpacesPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_MemoryPartition_memorySpaces_feature\"),\r\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_MemoryPartition_memorySpaces_feature\", \"_UI_MemoryPartition_type\"),\r\n\t\t\t\t SW_ConcurrencyPackage.Literals.MEMORY_PARTITION__MEMORY_SPACES,\r\n\t\t\t\t true,\r\n\t\t\t\t false,\r\n\t\t\t\t true,\r\n\t\t\t\t null,\r\n\t\t\t\t null,\r\n\t\t\t\t null));\r\n\t}", "public void memoGui() {\n HBox memos = new HBox();\n Label memoLabel = new Label(\"Add to memo\");\n ChoiceBox<Object> memoChoice = new ChoiceBox<>();\n memoChoice.getItems().addAll(mSys.getListOfMemo().toArray());\n memos.getChildren().addAll(memoLabel, memoChoice);\n\n Button button = new Button();\n if (isNew) {\n button.setText(\"Add Event to Memo\");\n } else {\n button.setText(\"Remove Event From Memo\");\n }\n\n button.setOnMouseClicked(e -> {\n if (isNew) {\n if (memoChoice.getValue() == null) {\n return;\n }\n memo = (Memo) memoChoice.getValue();\n mSys.addEventToMemo(memo, event.getId());\n } else {\n mSys.removeEventInMemo(event.getId());\n }\n stage.close();\n });\n\n VBox vBox = new VBox();\n if (isNew) {\n vBox.getChildren().addAll(memos, button);\n } else {\n vBox.getChildren().addAll(button);\n }\n\n Scene scene = new Scene(vBox, 500, 400);\n scene.getStylesheets().add(Theme.getInstance().getStylesheet());\n stage.setScene(scene);\n stage.showAndWait();\n }", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "public org.openxmlformats.schemas.presentationml.x2006.main.CTCustomShowId addNewCustShow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTCustomShowId target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTCustomShowId)get_store().add_element_user(CUSTSHOW$10);\n return target;\n }\n }", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "public void actionPerformed(ActionEvent e){\n \tString nomButton=e.getActionCommand();\n\n\n \tif(nomButton.equals(\"Retour\")){\n \t\tnewMeuble.dispose();\n \t\tMeuble meuble = new Meuble();\n \t\tmeuble.setVisible(true); \n \t}\n \telse if(nomButton.equals(\"Enregistrer\")){\n \t\tMeubleBd app = new MeubleBd();\n \t\tboolean detachable = this.newMeuble.getIsRemovableBox();\n\n String name = this.newMeuble.getName();\n String description = this.newMeuble.getDescription();\n String piece = (String)this.newMeuble.getPieceComboBox().getSelectedItem();\n\n int number = 1;\n int volumeAv = 0;\n int volumeAp = 0;\n int numberDetachable = 0;\n\n try{\n number = Integer.parseInt(this.newMeuble.getNumberText()); \n volumeAv = Integer.parseInt(this.newMeuble.getVolume());\n volumeAp = Integer.parseInt(this.newMeuble.getVolumeAfterTexT().getText());\n numberDetachable = Integer.parseInt(this.newMeuble.getDetachableText());\n }catch(NumberFormatException exception){;}\n\n String img = this.newMeuble.getImg();\n\n if(!name.equals(\"\") && !description.equals(\"\")){\n app.insert(name,volumeAv,number,piece,detachable,numberDetachable,volumeAp,description,img);\n ListMeuble.donnees = app.getMeubles();\n this.newMeuble.dispose();\n Meuble meuble = new Meuble();\n meuble.setVisible(true);\n new PopUpValid(1,\"Insertion du meuble reussie.\");\n\n \n }else{\n new PopUpValid(2,\"Veuillez remplir les champs indiquer par (*).\");\n }\n ListMeuble.donnees = app.getMeubles();\n\n }\n\n}", "public void show() {\n super.show();\n }", "public void showInstructions()\n {\n //make the instructions window visible\n instructionScreen.setVisible(true);\n }", "public void showProcesses() {\n\t\tList<RunningAppProcessInfo> infos=am.getRunningAppProcesses();\n\t\tadapter.clear();\n\t\t\n\t\t\n\t\tProcessesListCellData data;\n\t\t\n\t\tfor (RunningAppProcessInfo info : infos) {\n\t\t\t\n\t\t\tdata=new ProcessesListCellData(this,info);\n\t\t\tif (data.appName!=null&&!data.appName.equals(\"\")) {\n\t\t\t\tadapter.addCellData(data);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tMemoryInfo memInfo=new MemoryInfo();\n\t\tam.getMemoryInfo(memInfo);\n\t\tsetTitle(\"进程管理器,可用内存:\"+memInfo.availMem/1024/1024+\"M\");\n\t}", "public void show() {\n\t\thidden = false;\n\t}", "@FXML\n\tpublic void add(ActionEvent event) {\n\t\tBrand brand = new Brand();\n\t\tbrand.setLabel(nameTF.getText());\n\t\t\n\n\t\t\n\t\tBrandDelegate.addBrand(brand);\n\t\tJOptionPane.showMessageDialog(null, \"Ajout effectué avec succés\");\n\t}", "public void clickedPresentationNew() {\n\t\t\n\t}", "private void displayUserDelegation() {\r\n userDelegationForm = new UserDelegationForm(mdiForm,true);\r\n userDelegationForm.display();\r\n }", "@FXML\n public void addHospital() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingHospital(0, 0));\n }", "public void show(){\n initializeTouchpad();\n initializeButtons();\n initializeShieldBar();\n }", "@FXML\n\t private void loadaddmember(ActionEvent event) throws IOException {\n\t \tloadwindow(\"views/addmember.fxml\", \"Add new Member\");\n\t }" ]
[ "0.6372831", "0.59155583", "0.5736473", "0.5736473", "0.5736473", "0.57022357", "0.566013", "0.566013", "0.56319857", "0.56183463", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.5608136", "0.55947655", "0.55721235", "0.5547282", "0.5547282", "0.55463123", "0.5528507", "0.5528507", "0.55268604", "0.55268604", "0.5509843", "0.5465005", "0.54645354", "0.5453673", "0.5445974", "0.5438099", "0.5432151", "0.5425037", "0.54102665", "0.5403347", "0.54008144", "0.53938264", "0.5379127", "0.5372301", "0.5363814", "0.53622556", "0.5340381", "0.53272283", "0.53039116", "0.527828", "0.52620226", "0.5258865", "0.5258165", "0.5257134", "0.525498", "0.52522945", "0.5233897", "0.52221715", "0.52149343", "0.5204487", "0.52026445", "0.5201735", "0.5196139", "0.5191561", "0.5186075", "0.51847076", "0.51773036", "0.51741517", "0.5173839", "0.51733094", "0.5172478", "0.5161805", "0.5157391", "0.51488423", "0.5145409", "0.51413584", "0.51270765", "0.51265806", "0.51194483", "0.51183665", "0.51173556", "0.5117056", "0.5115819", "0.51147354", "0.5107358", "0.50968146", "0.5096385", "0.50962704" ]
0.7024334
0
recherche et retourne le noeud parent du noeud new_node
public FuzzyNode ParentNode( FuzzyNode new_node ) throws Exception { for( int i=0 ; i<this.Nodes.size() ; i++ ) // parmis tous les noeud enregistrés if( ((FuzzyNode)this.Nodes.elementAt(i)).Node() == new_node.Parent() ) return (FuzzyNode)this.Nodes.elementAt(i); throw new Exception( LocaleKBCT.GetString("ParentNode") + ": " + Integer.toString(new_node.Parent()) + " " + LocaleKBCT.GetString("NotFoundForNode") + ": " + Integer.toString(new_node.Node()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void findNewParent() {\n\t\t\tif (parent != null)\n\t\t\t\tparent.children.remove(this);\n\t\t\tNodeLayout[] predecessingNodes = node.getPredecessingNodes();\n\t\t\tparent = null;\n\t\t\tfor (int i = 0; i < predecessingNodes.length; i++) {\n\t\t\t\tTreeNode potentialParent = (TreeNode) owner.layoutToTree\n\t\t\t\t\t\t.get(predecessingNodes[i]);\n\t\t\t\tif (!children.contains(potentialParent)\n\t\t\t\t\t\t&& isBetterParent(potentialParent))\n\t\t\t\t\tparent = potentialParent;\n\t\t\t}\n\t\t\tif (parent == null)\n\t\t\t\tparent = owner.superRoot;\n\n\t\t\tparent.addChild(this);\n\t\t}", "Node findParent(Node N, Node R){\n Node P = null;;\n if( N!=R ){\n P = R;\n while( P.left != N && P.right !=N ){\n if(N.item.key.compareToIgnoreCase(P.item.key)<0)\n P = P.left;\n else\n P = P.right;\n }\n }\n return P;\n }", "public SearchTreeNode getParent() { return parent; }", "public TreeNode getParentNode();", "Node<T> parent();", "public TreeNode getParent() { return par; }", "public SearchNode<S, A> getParent() {\r\n\t\treturn parent;\r\n\t}", "public Node getParent();", "public TreeNode getParent ()\r\n {\r\n return parent;\r\n }", "public IRNode getParent(IRNode node);", "@Override\n\tpublic WhereNode getParent() {\n\t\treturn parent;\n\t}", "CoreParentNode coreGetParent();", "TreeNode<T> getParent();", "protected LambdaTerm getParent() { return parent; }", "public Node getParent(){\n return parent;\n }", "public void setParent(SearchNode<S, A> parent) {\r\n\t\tthis.parent = parent;\r\n\t}", "private TreePath findEmptyGroup(JTree tree, TreePath parent) {\r\n TreeNode node = (TreeNode)parent.getLastPathComponent();\r\n if (node != null && (node.getChildCount() <= 0 && node.getAllowsChildren())){\r\n return new TreePath( new Integer( 0 ) );\r\n \r\n }else{\r\n Object o = node;\r\n if (node.getChildCount() >= 0) {\r\n for (Enumeration e=node.children(); e.hasMoreElements(); ) {\r\n TreeNode n = (TreeNode)e.nextElement();\r\n TreePath path = parent.pathByAddingChild(n);\r\n TreePath result = findEmptyGroup(tree, path);\r\n if(result!=null)\r\n return result;\r\n // Found a match\r\n }\r\n }\r\n }\r\n return null;\r\n }", "@Override\n public final ObjectNode findParent(String fieldName) {\n return null;\n }", "public void findParent(TreeNode node){\n if(node!=null){\n if(hs.contains(node.val)){\n findParent(node.left);\n findParent(node.right);\n }\n else checkNode(node, true);\n }\n }", "public PageTreeNode getParent() {\n return parent;\n }", "public RBNode<T> parentOf(RBNode<T> node) {\n return node != null? node.parent : null;\r\n }", "private int parent ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "public ParseTreeNode getParent() {\r\n return _parent;\r\n }", "public String getParent(String anItem) { return null; }", "public String getParent(String anItem) { return null; }", "private RBNode<T, E> grandPNode(RBNode<T, E> node) {\r\n\t\tRBNode<T, E> p = node.parent;\r\n\t\t// check if the node exist first\r\n\t\tif (search(node)) {\r\n\t\t\t// Checking if Parent of the node exist\r\n\t\t\tif (p != nillLeaf) {\r\n\t\t\t\t// checking if the grandparent of the node exist\r\n\t\t\t\tif (p.parent != nillLeaf) {\r\n\t\t\t\t\treturn p.parent;\r\n\t\t\t\t}\r\n\t\t\t\t// else there's no grandparent\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn nillLeaf;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Else if no parent no Grand Parent\r\n\t\t\telse {\r\n\t\t\t\treturn nillLeaf;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Else don't even bother searching for the node Grand Parent\r\n\t\telse {\r\n\t\t\treturn nillLeaf;\r\n\t\t}\r\n\t}", "Object getParent();", "public T getParent(T anItem) { return null; }", "public void setParent(Node newParent) {\r\n\t\t\tparent = newParent;\r\n\t\t}", "public static Node find(Node a){\n\t\tif(a.parent == null) return a;\n\t\treturn find(a.parent);\n\t}", "private void changeParent(Node item, Parent newParent) {\n Parent oldParent = item.getParent();\n try {\n Method oldNode = oldParent.getClass().getMethod(\"getChildren\");\n Object ob = oldNode.invoke(oldParent);\n Collection<Node> cnOld = ((Collection<Node>) ob);\n cnOld.remove(item);\n Method newNode = newParent.getClass().getMethod(\"getChildren\");\n Object nb = newNode.invoke(newParent);\n Collection<Node> cnNew = ((Collection<Node>) nb);\n cnNew.add(item);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n }", "@JsProperty\n Node getParentNode();", "@Override\n public Node getParentNode() {\n return null;\n }", "public TreeNode getParent() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic TreeNode getParent() {\n\t\treturn parent;\r\n\t}", "Genome chooseParent();", "java.lang.String getParent();", "java.lang.String getParent();", "TMNodeModelComposite getParent() {\n return parent;\n }", "MenuEntry getParent();", "@Override\r\n\t\tpublic Node getParentNode()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public abstract T getParent(T anItem);", "public KDNode CompNode() {\n\t\t\n\t\tKDNode ptr = this;\n\t\twhile(ptr.parent_ptr != null) {\n\t\t\t\n\t\t\tif(ptr.is_node_set == true) {\n\t\t\t\treturn ptr;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t\t\n\t\treturn ptr;\n\t}", "@Override\n\tpublic TreeNode getParent() {\n\t\treturn this.parent ;\n\t}", "public Node getTB(String id,Node parent){\n try{\n HashMap hash= (HashMap)client.execute(\"getResource\", new Object[]{id});\n String path = hash.get(\"path\").toString();\n String name = path.split(\"/\")[path.split(\"/\").length-1];\n byte type = 1;\n if(path.indexOf(\"/\")==-1){\n type = 0;\n }\n Node node = new Node(id,path,name,parent,null,type);\n Object[] children = (Object[])hash.get(\"children\");\n for(Object o:children){\n node.addChild(o.toString(), null);\n }\n HashMap meta = (HashMap)hash.get(\"meta\");\n if(meta!=null&&meta.size()!=0){\n Set keys = meta.keySet();\n Iterator iter = keys.iterator();\n while(iter.hasNext()){\n String n = iter.next().toString();\n if(n.equals(\"_epnames_\"+RunnerRepository.user)){\n node.setEPs(meta.get(n).toString());\n continue;\n }\n node.addProperty(n, meta.get(n).toString());\n }\n }\n return node;\n }catch(Exception e){\n System.out.println(\"requested id: \"+id);\n try{System.out.println(\"server respons: \"+client.execute(\"getResource\", new Object[]{id}));}\n catch(Exception ex){ex.printStackTrace();}\n e.printStackTrace();\n return null;\n }\n }", "private QuadTree[] findChild(QuadTree parent) {\n double point1_lon = parent.ullon;\n double point1_lat = parent.ullat;\n double point2_lon = (parent.lrlon + parent.ullon) / 2;\n double point2_lat = parent.ullat;\n double point3_lon = parent.ullon;\n double point3_lat = (parent.ullat + parent.lrlat) / 2;\n double point4_lon = (parent.lrlon + parent.ullon) / 2;\n double point4_lat = (parent.ullat + parent.lrlat) / 2;\n double point5_lon = (parent.lrlon + parent.ullon) / 2;\n double point5_lat = parent.lrlat;\n double point6_lon = parent.lrlon;\n double point6_lat = parent.lrlat;\n double point7_lon = parent.lrlon;\n double point7_lat = (parent.ullat + parent.lrlat) / 2;\n QuadTree ul, ur, ll, lr;\n if (parent.name.equals(\"root\")) {\n ul = new QuadTree(\"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(\"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(\"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(\"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n } else {\n ul = new QuadTree(parent.name + \"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(parent.name + \"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(parent.name + \"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(parent.name + \"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n }\n QuadTree[] child = new QuadTree[4];\n child[0] = ul;\n child[1] = ur;\n child[2] = ll;\n child[3] = lr;\n return child;\n }", "TreeNodeValueModel<T> parent();", "private boolean FindNode(int num, TreeNodeWrapper parent, TreeNodeWrapper child) {\r\n\t\t//set parent node of TreeNodeWrapper as Root\r\n\t\tparent.Set(Root);\r\n\t\t//set child node as TreeNode Wrapper as Root\r\n\t\tchild.Set(Root);\r\n\t\t//if root is null, tree is empty\r\n\t\tif(Root == null) //tree is empty\r\n\t\t\treturn true;\r\n\t\t//while loop which searches tree until empty child node is found\r\n\t\twhile(child.Get() != null)\r\n\t\t{ if(child.Get().Data == num) // node found\r\n\t\t\treturn true;\r\n\t\t\t//if node not found use TreeNodeWrapper search remaining nodes\r\n\t\t else {\r\n\t\t\tparent.Set(child.Get());\r\n\t\t\tif(num < child.Get().Data)\r\n\t\t\t\tchild.Set(child.Get().Left);\r\n\t\t\telse\r\n\t\t\t\tchild.Set(child.Get().Right);\r\n\t\t }\t\r\n\t\t}\r\n\t\t//return false if node not found\r\n\t\treturn false;\r\n\t}", "RegistryNode getParentNode() {\n return parentNode;\n }", "public String getParentNode()\r\n\t{\r\n\t\tif (roadBelongingType.equals(\"inbound\"))\r\n\t\t{\r\n\t\t\treturn endNode;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn startNode;\r\n\t\t}\r\n\t}", "public int getParent();", "public VisualLexiconNode getParent() {\n \t\treturn parent;\n \t}", "public ResultSet leesParentIdLijst() {\n String sql = \"select distinct f2.id parent_id\\n\" +\n \" from bookmarkfolders f1\\n\" +\n \" join bookmarkfolders f2 on f1.parent_id = f2.id\\n\" +\n \" order by f2.id;\";\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }", "DendrogramNode<T> getParent();", "@VTID(7)\r\n void getParent();", "private BTreeNode<T> findParent(BTreeNode<T> possibleParent, BTreeNode<T> child) {\n BTreeNode<T> parent = null;\n for (int i = 0; i < 6; i++) {\n BTreeNode<T> tempChild = possibleParent.getChild(i);\n if (possibleParent.getChild(i) == child) {\n parent = possibleParent;\n }\n if (tempChild != null) {\n if (parent == null) {\n parent = findParent(possibleParent.getChild(i), child);\n }\n }\n }\n return parent;\n }", "private Node locatePrevNode(K key) { \n\t\tNode p = null; \n\t\tNode current = first; \n\t\twhile (current != null && current.getData().getKey().compareTo(key) < 0) {\n\t\t\tp = current; \n\t\t\tcurrent = current.getNext(); \n\t\t}\n\t\treturn p; \n\t}", "public void registerParent(){\n \t\tparent = manager.getList(parentName);\n \t}", "public Node getNewNode(){\n for (Node n:nodes) {\n if(n.isNewTag()){\n return n;\n }\n }\n return null;\n }", "private Node<E> findParent(Node<E> currentParent, E findingParentValue) {\n Node<E> foundParent = null;\n\n if (currentParent.getValue().compareTo(findingParentValue) == 0) {\n foundParent = currentParent;\n } else {\n for (Node<E> node : currentParent.getChilden()) {\n foundParent = findParent(node, findingParentValue);\n if (foundParent != null) {\n break;\n }\n }\n }\n\n return foundParent;\n }", "public XMLElement getParent()\n/* */ {\n/* 323 */ return this.parent;\n/* */ }", "public TestResultTable.TreeNode getParent() {\n return parent;\n }", "public int findParent(int[] parent, int u) {\n\t\tif (parent[u] == -1) { // matlab u khud ka parent hai/godfather/leader/founder\n\t\t\treturn u;\n\t\t}\n\t\treturn findParent(parent, parent[u]);\n\t}", "public static Node rightAncestor(Node node) {\n\n\n if(node.parent!=null){\n if(node.key>node.parent.key){ // หา parent ตัวแรกี่มีคค่ามากกว่า\n return rightAncestor(node.parent);\n }\n else {return node.parent;}\n }else{return null;}//////\n }", "public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }", "public void selectParents() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }", "private Node getGrandparent(Node n) {\n return n.mParent.mParent;\n }", "@Override\r\n\tpublic TreeNode getParent() {\n\t\treturn this.parent;\r\n\t}", "public TreeNode getParent()\n {\n return mParent;\n }", "private Node<TokenAttributes> findFirst(Node<TokenAttributes> current_node) {\n if (current_node.getParent() != null && current_node.getParent().getChildren().size() == 1) {\n return findFirst(current_node.getParent());\n }\n if (current_node.getParent() == null) {\n return current_node;\n }\n return current_node;\n }", "public SqlFromSubSelect getParent() {\n return parent;\n }", "public RBNode<T, E> searchRoot(RBNode<T, E> node) {\r\n\t\tRBNode<T, E> c = node;\r\n\t\tRBNode<T, E> p = node.parent;\r\n\t\t// While the parent of the current node is not null move up.\r\n\t\twhile (p != nillLeaf) {\r\n\t\t\tc = c.parent;\r\n\t\t}\r\n\t\t// c must be the root of the node being entered\r\n\t\t// return c which is the root.\r\n\t\treturn c;\r\n\t}", "private OntologyTerm searchParent(OntologyTerm term, TreeMap<OntologyTerm, TreeMap> m, OntologyTerm root)\n\t{\n\tif(m==null)\treturn null;\n\tif(m.containsKey(term))\n\t\treturn root;\n\telse\n\t\t{\n\t\tfor(OntologyTerm ot:m.keySet())\n\t\t\t{\n\t\t\tOntologyTerm parent=searchParent(term, m.get(ot), ot);\n\t\t\tif(parent!=null)\treturn parent;\n\t\t\t}\n\t\treturn null;\n\t\t}\n\t}", "private void setParent(Node<T> parent) {\n this.parent = parent;\n }", "private Node serchNode(E input, Node current) {\n Node node = null;\n if (current.value.equals(input)) {\n node = current;\n } else {\n List<Node> children = current.children;\n for (Node child : children) {\n node = serchNode(input, child);\n if (node != null) {\n break;\n }\n }\n }\n return node;\n }", "Node commonAncestor(Node one, Node two);", "public Node find(Node node) {\n while (node.getParent().getParent() != node.getParent()) {\n Node t = node.getParent().getParent();\n node.setParent(t);\n node = t;\n }\n\n return node.getParent();\n }", "private static INodePO findNode(INodePO ownerNode,\n INodePO selectecNode) {\n Iterator childIt = ownerNode.getNodeListIterator();\n while (childIt.hasNext()) {\n INodePO child = (INodePO)childIt.next();\n if (child.getId().equals(selectecNode.getId())) {\n return child;\n }\n }\n return null;\n }", "private void backToParent(){\n\t\tList<Node> tmp = new ArrayList<Node>();\n\t\t\n\t\tfor(int i = 0; i < r.size(); i++){\n\t\t\tif(r.get(i).getNodeType() == Node.ATTRIBUTE_NODE){\n\t\t\t\tNode localNode = ((Attr)r.get(i)).getOwnerElement();\n\t\t\t\tif(localNode != null)\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t} else {\n\t\t\t\tNode localNode = r.get(i).getParentNode();\n\t\t\t\tif(localNode != null && localNode.getNodeType() != Node.DOCUMENT_NODE && !listContainsElement(tmp, localNode)){\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tr = tmp;\n\t}", "@Override\n\tpublic void setParent(WhereNode parent) {\n\t\tthis.parent = parent;\n\t}", "public Node findSet(Node node ){\n Node parent = node.parent;\n //it means no one is parent\n if( parent == node ){\n return parent;\n }\n //do compression\n node.parent = findSet( parent );\n return node.parent;\n }", "public Node simpleExpression(Node n_parent) {\r\n\r\n if(token.get(lookAheadPossition).contains(\"ident(\")||token.get(lookAheadPossition).contains(\"num(\")||token.get(lookAheadPossition).contains(\"boollit(\")||token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: simpleExpression::if \"+n_parent.getData());\r\n Node makeown = new Node (\"makeown\");\r\n Node n_factor = this.term(makeown);\r\n //if (!(n_parent==null)) {n_parent.setNodeChild(n_factor); }//simpleExpression(n_factor); }\r\n //if (n_parent.getData().contains(\"-\")) {n_parent.setNodeChild(n_factor); simpleExpression(n_factor); } /////////************add\r\n //addNode = simpleExpressionNode.addChild(\"Add\");\r\n return(this.restSimpleExpression(n_parent,n_factor ));\r\n }\r\n return(null);\r\n }", "public void setParent(Node parent){\n this.parent = parent;\n }", "@Override\n\tpublic TreeNode getParent() {\n\t\treturn this.parent;\n\t}", "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "private TreeNode buildTreeNodeFromParentItem(TreeNode root, TreeNode parent, InventoryBillOfMaterialItem nextBOM) {\n if (root == null) {\n root = new DefaultTreeNode(null, null);\n parent = new DefaultTreeNode(nextBOM, root);\n parent.setExpanded(true);\n parent.setType(nextBOM.getState());\n }\n\n /*\n if (updateSelectedPointer) {\n if (parent.getData() == selectedItemBOMTreeNode.getData()) {\n selectedItemBOMTreeNode = parent; \n updateSelectedPointer = false; \n }\n }\n */\n if (nextBOM.getInventoryItem() != null) {\n List<InventoryBillOfMaterialItem> nextItemBOMList;\n nextItemBOMList = nextBOM.getInventoryItem().getInventoryDomainBillOfMaterialList();\n\n if (nextItemBOMList != null && nextItemBOMList.isEmpty() == false) {\n for (InventoryBillOfMaterialItem iBOM : nextItemBOMList) {\n TreeNode newNode = new DefaultTreeNode(iBOM, parent);\n newNode.setExpanded(true);\n newNode.setType(iBOM.getState());\n buildTreeNodeFromParentItem(root, newNode, iBOM);\n }\n }\n }\n\n return root;\n\n }", "void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }", "public int getParent_id() {\n return this.parent_id;\n }", "public TreeNode getParent()\r\n\t{\r\n\t\treturn m_parent;\r\n\t}", "public String getParent() {\r\n return parent;\r\n }", "public Category getParent(){\r\n return parent;\r\n }", "private Node findNode(Node node, String name) {\n Node temp = node;\n\n if (temp.getNext() != null && name.compareTo(temp.getNext().getState().getName()) > 0) {\n temp = findNode(temp.getNext(), name);\n }\n return temp;\n }", "public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n TreeNode cur = root;\n while (true) {\n if (cur.val > p.val && cur.val > q.val) cur = cur.left;\n else if (cur.val < p.val && cur.val < q.val) cur = cur.right;\n else return cur;\n }\n}", "public void setParent(Node node) {\n parent = node;\n }", "public int indexOf() { return _parent!=null? _parent.indexOfChild(this) : -1; }", "public SelectItem[] parentFils() {\n if (selected.getEtatCommande().getRang() == 0) {\n\n // i will not use request => i will use the parent son instead\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n etatCommandes.addAll(selected.getEtatCommande().getListEtatCommandesFils());\n etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n //return JsfUtil.getSelectItems(ejbFacadeEtatCommande.findAllNative(\" where ( o.ECm_Rang = 1 OR o.ECm_Rang = 0 )\" ), true);\n } else if (selected.getEtatCommande().isDernierRang() == true) {\n // int rangFils = selected.getEtatCommande().getRang() - 1;\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n\n etatCommandes.add(selected.getEtatCommande());\n etatCommandes.add(selected.getEtatCommande().getParent());\n\n //etatCommandes = ejbFacadeEtatCommande.findAllNative(\" where o.ECm_Rang = \" + rangFils + \" OR o.ECm_Id = \"+selected.getEtatCommande().getId());\n etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n } else {\n //int rangParent = selected.getEtatCommande().getRang() + 1;\n //int rangFils = selected.getEtatCommande().getRang() - 1;\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n\n etatCommandes.add(selected.getEtatCommande());// RETURN TO PARENT\n etatCommandes.add(selected.getEtatCommande().getParent());// STAY\n etatCommandes.addAll(selected.getEtatCommande().getListEtatCommandesFils()); //GO TO SUN\n\n //etatCommandes = ejbFacadeEtatCommande.findAllNative(\" where ( o.ECm_Rang = \" + rangParent + \" OR o.ECm_Rang = \" + rangFils + \" OR o.ECm_Id = \"+selected.getEtatCommande().getId()+\" )\");\n // etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n }\n }", "public Node getParent() {\n return parent;\n }", "public Node getParent() {\n return parent;\n }", "public HuffmanNode getParentNode()\n\t{\n\t\treturn parent;\n\t}", "public static TreeNode getNodeFromData(final TreeNode parent, final Object data) {\n\t\tif (parent.getData().equals(data)) {\n\t\t\treturn parent;\n\t\t}\n\n\t\tfor (TreeNode node : parent.getChildren()) {\n\t\t\tTreeNode node2 = getNodeFromData(node, data);\n\t\t\tif (node2 != null) {\n\t\t\t\treturn node2;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}" ]
[ "0.70486903", "0.6875729", "0.6761636", "0.6559619", "0.6527358", "0.65085053", "0.63644207", "0.6353561", "0.63293535", "0.6236284", "0.6231873", "0.61973995", "0.6174963", "0.6143882", "0.6114219", "0.6103558", "0.6070226", "0.6056039", "0.602394", "0.59917533", "0.5986297", "0.5957028", "0.59290916", "0.59217024", "0.59217024", "0.5918946", "0.5907741", "0.5904818", "0.5895449", "0.587997", "0.58706313", "0.58597666", "0.5856843", "0.5852084", "0.5848662", "0.5846217", "0.5842083", "0.5842083", "0.5827658", "0.5825359", "0.5821939", "0.58144355", "0.5811102", "0.57877815", "0.5784589", "0.57834023", "0.57811004", "0.5777627", "0.57526594", "0.5726259", "0.5719034", "0.57057637", "0.57038593", "0.5698321", "0.5698202", "0.5693426", "0.56906766", "0.5673883", "0.5670465", "0.5654679", "0.56490266", "0.5647958", "0.56387", "0.5638158", "0.5633695", "0.56322235", "0.56300795", "0.562912", "0.5609064", "0.55922383", "0.559072", "0.55819887", "0.5578943", "0.5571864", "0.5564454", "0.5563191", "0.55574834", "0.5550744", "0.55505127", "0.55497897", "0.55340004", "0.55267984", "0.5524703", "0.55139554", "0.5513804", "0.55061126", "0.549381", "0.54906607", "0.5486985", "0.54797214", "0.5478868", "0.54788095", "0.5476667", "0.54759413", "0.54747814", "0.5474607", "0.54745597", "0.54745597", "0.54694843", "0.5468298" ]
0.73806024
0
retourne le numero du noeud parent
public int Parent() { return this.Parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getParentCounter(){\r\n\t\tint returning = parentCounter;\r\n\t\tparentCounter++;\r\n\t\treturn returning;\r\n\t}", "public Integer getnParentid() {\n return nParentid;\n }", "public int getParent();", "public int getParent_id() {\n return this.parent_id;\n }", "public static int size_parentId() {\n return (16 / 8);\n }", "public java.lang.Integer getParentId();", "private int parent(int index) {\n // Formula to calculate the index of the parent node\n return Math.floorDiv(index - 1, d);\n }", "public static int size_parent() {\n return (8 / 8);\n }", "public Integer getParentid() {\n\t\treturn parentid;\n\t}", "public int getParentEntryCount() {\n if (parent != null) {\n return parent.getEntryCount();\n }\n return 1;\n }", "private int parent(int pos)\n {\t\n return (int)Math.ceil((double)Math.max(0, pos-2)/2);\n }", "public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "public int getParentID() {\n\t\treturn _parentID;\n\t}", "private int parent ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "public static int offset_parentId() {\n return (64 / 8);\n }", "public int getParentID() {\n\t\treturn parentID;\n\t}", "private int parent(int i)\n {\n return (i-1)/d;\n }", "public int getChildNum() {\n return childNum;\n }", "int getParentIdCount();", "public int get_parentId() {\n return (int)getUIntBEElement(offsetBits_parentId(), 16);\n }", "protected static int parent(int i){\n return (i-1)/2;\n }", "private int parent(int i) {\n double d = (double) i;\n d = Math.floor((d - 1) / 2);\n return (int) d;\n\n }", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();", "protected int parent(int i) { return (i - 1) / 2; }", "public Integer getParentTid() {\r\n return parentTid;\r\n }", "public int setParent(PathNode2d parent) {\n depth = parent.depth + 1;\n this.parent = parent;\n\n return depth;\n }", "@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();", "public int parentInode() { return ROOT_INODE; }", "private int parent(int index) {\n return index / 2;\n }", "private int parent(int index) {\n return index / 2;\n }", "public int getAncestorCount() { return _parent!=null? getParent().getAncestorCount() + 1 : 0; }", "public static int offset_parent() {\n return (40 / 8);\n }", "public int getParentType() {\r\n return parent_type;\r\n }", "protected int parent(int i) {\n return (i - 1) >> 1;\n }", "private static int chooseParent() {\n\t\tint parent = 0;\n\t\tChromosome thisChromo = null;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\t// Randomly choose an eligible parent.\n\t\t\tparent = getRandomNumber(0, population.size() - 1);\n\t\t\tthisChromo = population.get(parent);\n\t\t\tif (thisChromo.selected() == true) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\n\t\treturn parent;\n\t}", "private int parent(int i){return (i-1)/2;}", "public long getParentId()\n {\n return parentId;\n }", "public int getChildNum() {\r\n\t\treturn childNum;\r\n\t}", "public IntColumn getParentId() {\n return delegate.getColumn(\"parent_id\", DelegatingIntColumn::new);\n }", "public long getParentCode() {\n return parentCode;\n }", "public int parent(int i){\n\t\tif(i == 0) return Integer.MIN_VALUE;\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}", "static int parent(int i)\n {\n return (i-1)/2;\n }", "private static int parent(int i) {\n\t\treturn (i - 1) / 2;\n\t}", "public Integer getParentId() {\n return parentId;\n }", "public Integer getParentId() {\n return parentId;\n }", "public Integer getParentId() {\n return parentId;\n }", "private int parentIdx(int idx) {\r\n // TODO\r\n return -1;\r\n }", "private int parent(int index) {\n return (index - 1) / 2; // 2 = binary heap\n }", "public int getParentNode(){\n\t\treturn parentNode;\n\t}", "private int parent(int child) {\n\t\treturn (child-1)/2;\n\t}", "public void setChildNum(int value) {\n this.childNum = value;\n }", "@Override\n @Transient\n public Integer getParentId()\n {\n return parentTblId;\n }", "public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }", "public int getParentId() {\r\n\t\treturn parentId;\r\n\t}", "@Override\r\n\tpublic int getChildCount(Object parent) {\r\n\t\r\n\t\treturn 0;\r\n\t}", "private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}", "public abstract int getNumChildren();", "private int Parent(int position) {\r\n\t\treturn position/2;\r\n\t}", "public void setnParentid(Integer nParentid) {\n this.nParentid = nParentid;\n }", "public void setParentCode(long value) {\n this.parentCode = value;\n }", "public int\tgetChildCount(Object parent) {\n \tif (! (parent instanceof IdentityBranch)) return -1;\n \tIdentityBranch ibParent = (IdentityBranch)parent;\n \treturn ibParent.getChildCount();\n }", "private Node parent(int i) {\n return heap[parentIndex(i)];\n }", "public void setParent(int id);", "public void setParent(Node parent) {\r\n//\t\tdepth = parent.depth + 1;\r\n\t\tthis.parent = parent;\r\n\t\t//return depth;\r\n\t\t\r\n\t}", "private int parent(int i) {\r\n\t\tif (i % 2 == 0) {\r\n\t\t\treturn i / 2 - 1;\r\n\t\t}\r\n\t\treturn i / 2;\r\n\t}", "private static int parentIndex(int index) {\n\t\treturn (index - 1) / 2;\n\t}", "private int parentIndex(int i) {\n return i / 2;\n }", "public short get_parent() {\n return (short)getUIntElement(offsetBits_parent(), 8);\n }", "private int getParentOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn i / 2;\n \t}", "public Integer getParent(Integer e){\n\t\ttry{\n\t\t\treturn searchNodeRef(e).father.element;\n\t\t} catch (Exception exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Long getParentId() {\n return this.parentId;\n }", "public void setORM_Parent(orm.Nomenclature value) {\r\n\t\tthis.parent = value;\r\n\t}", "int getChildCount();", "public final int child ()\r\n {\r\n return _value.child();\r\n }", "public int getChildCount() { return 0; }", "public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }", "public int getChildCount();", "public int getParentTwo()\n\t{\n\t\treturn parentSetTwo;\n\t}", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "public Long getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "public String getParentId() {\n return parentId;\n }", "@Test\n\tpublic void testGetParent() {\n\t\tassertEquals(3, testArrayList.get(Heap.getParent(4)).intValue());\n\t}", "public int getFakeParentId()\n {\n return fakeParentId;\n }", "public BigDecimal getWtIdParent() {\r\n\t\tif (oldEntrust != null) {\r\n\t\t\treturn oldEntrust.getEntrustId();\r\n\t\t}\r\n\t\treturn wtIdParent;\r\n\t}", "public BinomialTree<KEY, ITEM> parent()\n\t{\n\t\treturn _parent;\n\t}", "@VTID(7)\r\n void getParent();" ]
[ "0.75537616", "0.7492954", "0.7303945", "0.7224561", "0.7182937", "0.7177423", "0.71321154", "0.71264297", "0.7091544", "0.6969355", "0.69649416", "0.6943481", "0.6919506", "0.6888873", "0.68871397", "0.6865244", "0.6843176", "0.68371063", "0.68045413", "0.67929655", "0.6786581", "0.6771854", "0.67527926", "0.6738552", "0.6728847", "0.67204773", "0.6704962", "0.6701226", "0.66883737", "0.6683924", "0.6683924", "0.6673641", "0.6658168", "0.6637677", "0.66295314", "0.66173077", "0.6613333", "0.66083527", "0.6605627", "0.660404", "0.6589887", "0.6584245", "0.6582073", "0.6582073", "0.658146", "0.6560922", "0.65495163", "0.6544146", "0.6544146", "0.6544146", "0.65435106", "0.6518522", "0.6517089", "0.651438", "0.64753395", "0.6464333", "0.6463622", "0.6449415", "0.6426306", "0.64210916", "0.63721836", "0.6337938", "0.6335017", "0.633031", "0.6309009", "0.63021016", "0.630197", "0.63003176", "0.62912613", "0.62911224", "0.6287584", "0.6282159", "0.6279556", "0.6273222", "0.62715477", "0.6269585", "0.62685347", "0.6253378", "0.6248619", "0.62410796", "0.6210015", "0.62051195", "0.619977", "0.619977", "0.619977", "0.619977", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.61978567", "0.6181292", "0.6176817", "0.6172697", "0.61349535", "0.6131538" ]
0.70561165
9
retourne le numero du noeud
public int Node() { return this.Node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumNudo() {\n return numNudo;\n }", "private int getNumero() {\n\t\treturn numero;\n\t}", "int generarNumeroNota();", "public int getNumero() {\n return numero;\n }", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}", "public String getPremierNumeroLibre() {\n\t\tString requete_s = \"SELECT id from LIVRES\";\n\t\tint i = 0;\n\t\tboolean egalite = true;\n\t\t\n\t\ttry{\n\t\t\trequete.execute(requete_s);\n\t\t\t\n\t\t\tResultSet rs = requete.getResultSet();\n\t\t\t\n\t\t\tdo{\n\t\t\t\ti++;\n\t\t\t\trs.next();\n\t\t\t\tegalite = (i ==((Integer) rs.getObject(1)));\n\t\t\t}while(egalite);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString s = \"\" + i;\n\t\t\n\t\treturn s;\n\t}", "public int getIdNoeud() {\n return idNoeud;\n }", "int obtenerNumeroMovimiento();", "public int getNumero() {\n return dado1;\n }", "public int getNumero() { return this.numero; }", "public int getNombreNoeud()\t{\r\n \treturn this.noeuds.size();\r\n }", "Integer getNLNDreu();", "public int getNiveau() {\r\n return niveau;\r\n }", "public int getNumeroMur() {\n\t\treturn numeroMur;\n\t}", "public int getNumero()\r\n/* 190: */ {\r\n/* 191:202 */ return this.numero;\r\n/* 192: */ }", "public void setNUMARGEO(int value) {\n this.numargeo = value;\n }", "private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}", "int getNo() {\n\t\treturn no;\n\t}", "public long getnNum() {\n return nNum;\n }", "public int getNUMARGEO() {\n return numargeo;\n }", "public int getNumero() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNumero() - start\");\n\t\t}\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNumero() - end\");\n\t\t}\n\t\treturn numero;\n\t}", "public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }", "java.lang.String getNume();", "java.lang.String getNume();", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public int rekisteroi() {\n this.tunnusNro = seuraavaNro;\n Tuote.seuraavaNro++;\n return tunnusNro;\n }", "public int getNo() {\n return no;\n }", "public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }", "private int getNum(EngClass ec) {\n\t\treturn engClassService.getStuNum(ec);\n\t}", "public int getNr() {\n return nr;\n }", "public int getNunFigli() {\n\t\tint numFigli = 0;\n\t\tfor (Nodo_m_ario figlio : figli) {\n\t\t\tif (figlio != null) {\n\t\t\t\tnumFigli += 1;\n\t\t\t}\n\t\t}\n\t\treturn numFigli;\n\t}", "public int calculerKgsNourritureParJour(){\r\n\t\treturn noms.size() * 10;\r\n\t}", "public int getNumeroInicial()\r\n/* 180: */ {\r\n/* 181:194 */ return this.numeroInicial;\r\n/* 182: */ }", "public int computeNbEtudiant() {\n\t\treturn 0;\n\t}", "public String generaNumPatente() {\n String numeroPatente = \"\";\r\n try {\r\n int valorRetornado = patenteActual.getPatCodigo();\r\n StringBuffer numSecuencial = new StringBuffer(valorRetornado + \"\");\r\n int valRequerido = 6;\r\n int valRetorno = numSecuencial.length();\r\n int valNecesita = valRequerido - valRetorno;\r\n StringBuffer sb = new StringBuffer(valNecesita);\r\n for (int i = 0; i < valNecesita; i++) {\r\n sb.append(\"0\");\r\n }\r\n numeroPatente = \"AE-MPM-\" + sb.toString() + valorRetornado;\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n return numeroPatente;\r\n }", "private int getN()\n\t{\n\t\tint numberN = Integer.parseInt(field1.getText()) ;\n\t\treturn numberN;\n\t\t\n\t}", "public int getNumber() {\n\t\treturn 666;\n\t}", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "public void setNumero(int numero) { this.numero = numero; }", "public int getNumeroGiocatori() {\n return 0;\r\n }", "public int getNum()\n {\n return num;\n }", "public int getNum()\n {\n return num;\n }", "public String getNo() {\n return no;\n }", "BigInteger getNumRegistro();", "public int getNumer()\n\t{\n\t\treturn numer;\n\t}", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "public int getNum() {\r\n return num;\r\n }", "public int getNum() {\n\treturn this.n;\n }", "public int getNumeroAgnelli() {\n\t\treturn numeroAgelli;\n\t}", "public int getNumeroMontoni() {\n\t\treturn numMontoni;\n\t}", "public void registriereNummer (int nr) {\n this.nr = nr;\n }", "public int getLongueur()\n\t{\n\t\treturn longueur_;\n\t}", "public int getNum() { return Num;}", "public int getNumNucleiToRemove() {\n return 0 - numNucleiToRemove;\n }", "private int getNum() {\r\n int i = currentNum.incrementAndGet();\r\n if (i < 0)\r\n i = -i;\r\n return i % n;\r\n }", "public int getNum();", "public java.lang.Long getPeti_numero();", "public java.lang.Long getPeti_numero();", "public void generarNumeroFacura(){\n try{\n FacturaDao facturaDao = new FacturaDaoImp();\n //Comprobamos si hay registros en la tabla Factura de la BD\n this.numeroFactura = facturaDao.numeroRegistrosFactura();\n \n //Si no hay registros hacemos el numero de factura igual a 1\n if(numeroFactura <= 0 || numeroFactura == null){\n numeroFactura = Long.valueOf(\"1\");\n this.factura.setNumeroFactura(this.numeroFactura.intValue());\n this.factura.setTotalVenta(new BigDecimal(0));\n }else{\n //Recuperamos el ultimo registro que existe en la tabla Factura\n Factura factura = facturaDao.getMaxNumeroFactura();\n //Le pasamos a la variable local el numero de factura incrementado en 1\n this.numeroFactura = Long.valueOf(factura.getNumeroFactura() + 1);\n this.factura.setNumeroFactura(this.numeroFactura.intValue());\n this.factura.setTotalVenta(new BigDecimal(0));\n }\n \n \n }catch(Exception e){\n e.printStackTrace();\n }\n \n }", "public int numerico(String n){\n if(n.equals(\"Limpieza\")){\r\n tipon=1;\r\n }\r\n if(n.equals(\"Electrico\")){\r\n tipon=2;\r\n } \r\n if(n.equals(\"Mecanico\")){\r\n tipon=3;\r\n } \r\n if(n.equals(\"Plomeria\")){\r\n tipon=4;\r\n } \r\n if(n.equals(\"Refrigeracion\")){\r\n tipon=5;\r\n }\r\n if(n.equals(\"Carpinteria\")){\r\n tipon=6;\r\n }\r\n if(n.equals(\"Area Verde\")){\r\n tipon=7;\r\n } \r\n if(n.equals(\"Preventivo\")){\r\n tipon=8;\r\n } \r\n if(n.equals(\"Pintura\")){\r\n tipon=9;\r\n } \r\n if(n.equals(\"TI\")){\r\n tipon=10;\r\n }\r\n return tipon; \r\n }", "public static int getNumeroId(){\r\n idConsecutivo++;\r\n return idConsecutivo;\r\n }", "public int getPhoneNuber() {\r\n return phoneNuber;\r\n }", "public void setNumero(int numero) {\n this.dado1 = numero;\n }", "public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }", "public void setNUMSECFO(int value) {\n this.numsecfo = value;\n }", "public int geraNumeroUnico()\r\n {\r\n Random numero = new Random();\r\n numUnico = numero.nextInt(99999);\r\n numUnico = numUnico + 1000;\r\n \r\n if(conjNumeros.contains(numUnico) == true)\r\n isUnico = false;\r\n else \r\n isUnico = true;\r\n \r\n while(isUnico == false)\r\n { \r\n numUnico = numero.nextInt(99999);\r\n numUnico = numUnico + 1000;\r\n \r\n if(conjNumeros.contains(numUnico) == true)\r\n isUnico = false;\r\n else\r\n isUnico = true;\r\n } \r\n conjNumeros.add(numUnico);\r\n \r\n return numUnico;\r\n }", "public int obtenerSiguienteNumeroOrden() {\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return controlOC.obtenerSiguienteNumeroOrden();\n }", "private static void obterNumeroLugar(String nome) {\n\t\tint numero = gestor.obterNumeroLugar(nome);\n\t\tif (numero > 0)\n\t\t\tSystem.out.println(\"O FUNCIONARIO \" + nome + \" tem LUGAR no. \" + numero);\n\t\telse\n\t\t\tSystem.out.println(\"NAO EXISTE LUGAR de estacionamento atribuido a \" + nome);\n\t}", "public int GetLastnumero()\r\n throws SQLException{\r\n int code = 0;\r\n ResultSet result = null;\r\n \r\n result = RequeteSelect(result,\"select max(CodeFiche) from Travaux\");\r\n while (result.next()){\r\n if(result.getString(1) == null)\r\n code = 0;\r\n else code = Integer.parseInt(new String(result.getString(1)))+1;\r\n }\r\n \r\n Close();\r\n result.close();\r\n \r\n return code;\r\n }", "public int getNum() {\n\t\treturn num;\n\t}", "void nuevo(int numero);", "public String getNum() {\r\n return num;\r\n }", "public void setMozzarella(double countNo) {\n mozzarella = countNo;\r\n }", "public int getLongueur() {\n return longueur;\n }", "public int getNickel () {\n return NNickel;\n }", "public long getN() {\n return n;\n }", "public int getLongueur() {\r\n return longueur;\r\n }", "public int calcola_num_assegnamenti(String id_autista,Calendar cal){\n\t AssegnamentiDao ass=new AssegnamentiDao(); //gią assegnati all'autista per scegliere\n\t int n=ass.get_num_assegnamenti(id_autista,cal); //l'ora del prossimo assegnamento \n\t if(n>4)\n\t\t n++; //CONTA L'ORA DI SPACCO\n\t return n;\n }", "public int getNumPrimo()\n {\n return numPrimo;\n\n }", "public int getNum() {\n return this.num;\n }", "public void setNiveau(int niveau) {\r\n this.niveau = niveau;\r\n }", "public int getNumber(){\n\t\treturn number;\n\t}", "public String getNum() {\n return num;\n }", "public String getNum() {\n return num;\n }", "public int usaAtaque() {\n\t\treturn dano;\n\t}", "public int getNumeroEstudio() { return this.numeroEstudio; }", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "public int obtenerUltimoIDUsuLib() {\r\n Connection con = Conexion.getConnection();\r\n PreparedStatement ps;\r\n ResultSet rs;\r\n int ultimo = 0;\r\n String sql = \"select idusuario from usuarioxlibro order by idusuario desc limit 1\";\r\n try {\r\n ps = con.prepareStatement(sql);\r\n rs = ps.executeQuery();\r\n ultimo = rs.getInt(1);\r\n if (ultimo == 0) {\r\n ultimo = 0;\r\n }\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return ultimo;\r\n }", "public int getN() {\n return n;\n }", "public static int generarNumeroAleatorio(int limite){ //Entre 0 y limite - 1\n return (int) (Math.random()*limite);\n }", "public int getNumero(int index){\r\n\t\treturn numeros.get(index);\r\n\t}", "public void Nouvelleligne() {\n int maxEleve = retourneMaxNumber() + 1;\n try {\n Connector1.statement.executeUpdate(\"Insert INTO eleve(id_el) VALUES (\" + maxEleve + \")\");\n Object[] val = {maxEleve, \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"};\n effaceTable(jTable2, mode);\n mode.addRow(val);\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n\n }\n\n }", "public int getNUMSECFO() {\n return numsecfo;\n }", "public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }", "public int getNumeroAnterior()\r\n/* 200: */ {\r\n/* 201:210 */ return this.numeroAnterior;\r\n/* 202: */ }", "java.lang.String getNumber();", "java.lang.String getNumber();", "java.lang.String getNumber();", "public int getLongueur() {\n\t\treturn this.longueur;\n\t}" ]
[ "0.73512226", "0.73351806", "0.69819546", "0.6973108", "0.6959032", "0.6959032", "0.6959032", "0.69193566", "0.6910129", "0.68740475", "0.6871815", "0.68370163", "0.6823871", "0.67610645", "0.66672707", "0.66120064", "0.6611613", "0.66031975", "0.6601585", "0.6598183", "0.657511", "0.65188503", "0.65132385", "0.6508462", "0.64943284", "0.64943284", "0.64675677", "0.64508194", "0.64302075", "0.6413127", "0.6397709", "0.6386597", "0.6363744", "0.63575935", "0.63509387", "0.63315016", "0.6329831", "0.632945", "0.63153315", "0.6291339", "0.62895447", "0.628276", "0.6281419", "0.6281419", "0.62771976", "0.62730986", "0.6263623", "0.6243152", "0.6236653", "0.623259", "0.6222563", "0.62224734", "0.61905986", "0.61843187", "0.61824495", "0.6173526", "0.61729276", "0.61720026", "0.61690384", "0.61690384", "0.61643904", "0.6161368", "0.61465275", "0.6144061", "0.61403656", "0.6121217", "0.6107897", "0.61064327", "0.61022925", "0.61016726", "0.6094148", "0.6076857", "0.60515124", "0.6046545", "0.60396034", "0.6035223", "0.6034436", "0.60272694", "0.6023517", "0.6023038", "0.60208464", "0.6016353", "0.60154015", "0.60151166", "0.60102123", "0.60102123", "0.60095406", "0.5978118", "0.59745157", "0.59739655", "0.59727144", "0.5972454", "0.5964871", "0.59617347", "0.5946062", "0.5939148", "0.59387726", "0.5931633", "0.5931633", "0.5931633", "0.592974" ]
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { display_variables.add(new DisplayVariableGroup(new String("Samples"))); display_variables.add(new DisplayVariableGroup(new String("Entropie"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void displayVariables(TextArea textArea) {\r\n\r\n Enumeration enum1 = variableList.elements() ;\r\n while(enum1.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum1.nextElement() ;\r\n textArea.appendText(\"\\n\" + temp.name + \" value = \" + temp.value) ;\r\n }\r\n }", "public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }", "public String getVariablesInternal() {\n StringBuilder b = new StringBuilder();\n JTable table = m_table.getTable();\n int numRows = table.getModel().getRowCount();\n\n for (int i = 0; i < numRows; i++) {\n String paramName = table.getValueAt(i, 0).toString();\n String paramValue = table.getValueAt(i, 1).toString();\n if (paramName.length() > 0 && paramValue.length() > 0) {\n b.append(paramName).append(SetVariables.SEP2).append(paramValue);\n }\n if (i < numRows - 1) {\n b.append(SetVariables.SEP1);\n }\n }\n\n return b.toString();\n }", "public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}", "public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n display_variables.add(new DisplayVariableGroup(new String(\"Mean\")));\n display_variables.add(new DisplayVariableGroup(new String(\"StandardDeviation\")));\n }", "public void showAssignments(){\n\t\tIterator it = this.clauses.iterator();\n\t\tint numVar = this.getVocabulary().getMaxVariableId();\n\t\tint[] assign = new int[numVar*2+1]; \n\n\t\twhile (it.hasNext()) {\n\t\t\tSystem.out.println(\"___________________________\");\n IClause cl = (IClause) it.next();\n Iterator litIterator = cl.literalIterator();\n while (litIterator.hasNext()){\n \tILiteral lit = (ILiteral) litIterator.next();\n \tint idx = lit.getId();\n \tif (idx<0) \n \t\tidx = numVar - idx;\n \tassign[idx] = lit.value();\n }\n }\n\t\t\n\t\tfor (int i=1;i<assign.length;i++){\n\t\t\tint k = i;\n\t\t\tif (i>numVar)\n\t\t\t\tk = numVar - i;\n\t\t\tSystem.out.print(k + \"|\" + assign[i] + \";\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public Map<String, I18nizableText> getVariablesDescriptions();", "public void print(){\r\n\r\n\r\n System.out.println(\"File: \" + file.getName());\r\n Set<String> keys = getDataMap().keySet();\r\n System.out.println(\"Die Variablen in diesem File: \" + keys);\r\n System.out.println(\"Geben Sie eine Variable an: \");\r\n\r\n Scanner wert = new Scanner(System.in);\r\n String wert1 = wert.nextLine();\r\n\r\n DataContainer dc = getDataMap().get(wert1);\r\n\r\n if (dc != null) {\r\n System.out.println(wert1 + \":\" + dc.getValues());\r\n }\r\n /*System.out.println(\"File: \" + file.getName());\r\n\r\n\r\n if (dc1 != null && dc2 != null) {\r\n System.out.println(dc1.getVariableName() + \": \" + dc1.getValues());\r\n System.out.println(dc2.getVariableName() + \": \" + dc2.getValues());*/\r\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }", "private void drawModelElements_PlainVariables_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 237: */ {\n/* 238:320 */ if (!_publicOnly) {\n/* 239:321 */ drawPlainVariable(_panel, _g, 20, 50, 10, 0, \"mapPanel\", this.mapPanel, false);\n/* 240: */ }\n/* 241: */ }", "List<IVariableDef> getVariables();", "public Map<String, Object> getVariables();", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par sef sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), (String)params.elementAt(0));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName((String)params.elementAt(i));\n\n display_variables.add(new_dv);\n }", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par classe sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), Integer.toString(1));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName(Integer.toString(i+1));\n\n display_variables.add(new_dv);\n }", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}", "private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}", "public void addViewVariables (Map<String, Object> vars)\n {\n if (vars != null)\n {\n _viewVariables.putAll (vars);\n }\n }", "@Override\n public List<String> getVariables()\n {\n return null;\n }", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "static void dumpVariablesInOrder( PrintWriter pw ) {\n try {\n for ( int i=0; i<Vtable.size(); i++ ) {\n int v = i+1;\n String varname = findVar(v);\n variable var = find(varname);\n if (var.userVisible)\n pw.println( \"c u \" + v + \" \" + varname );\n else\n pw.println( \"c c \" + v + \" \" + varname );\n }\n }\n catch ( Exception e ) {\n Util.fatalError( \"dumpVariablesInOrder Exception \" +\n e.getMessage() );\n }\n }", "void display(String w[][]){\r\n System.out.println(\"\\nGambaran dari area (world) yang di buat\\n\");\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\");\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print(w[i][j]+ \"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n }", "protected ArrayList<String> getVariableNames() {\n ArrayList<String> varNames = new ArrayList<String>();\n \n Element ncElement = getNetcdfElement();\n List<Element> vars = ncElement.getChildren(\"variable\", ncElement.getNamespace()); \n for (Element element : vars) {\n String name = getVariableName(element);\n varNames.add(name);\n }\n\n return varNames;\n }", "public void displayData(String[] str);", "public void display(){\n int n = nb_instructions;\n System.out.println(\"There are \" + n + \" key_words\");\n for(int i = 0; i<n;i++){\n System.out.println(\"\\tKey_word \" + (i+1) + \": \" + key_words.get(i));\n }\n }", "@Override\n public List<String> getVariables() {\n return super.getVariables();\n }", "public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\n\t}", "void printValues(Vector Vect){\n\t\tint index;\n\t\tfor(index=0;index< Vect.size(); index++){\t\n\t\t\tSystem.out.println(\"Element \" + Vect.elementAt(index));\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "String getVariableDefinition();", "void display()\r\n\t {\n\t System.out.println(\"a = \" + a + \" b = \" + b);\r\n\t }", "public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }", "public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}", "public String getVariable();", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "public void dispAll(){\n System.out.println(\"HISTORY :\");\n for(int i=0;i<history.size();i++)\n System.out.print(history.get(i) + \" | \");\n System.out.println(\"\\nSTACK :\");\n Stack <Object> acc = new Stack<>();\n while (!stack.isEmpty())acc.push(stack.pop());\n while (!acc.isEmpty()){\n System.out.print(acc.peek()+ \" | \");\n stack.push(acc.pop());\n }\n System.out.println(\"\\nVariables Stockes : \" + variables.toString());\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 String groundVars(String s, HashMap<String,String> vars, Call c)\n {\n String assignments = \"\";\n boolean first = true;\n for (HashMap.Entry<String, String> entry : vars.entrySet()) \n {\n String key = entry.getKey();\n Object value = entry.getValue();\n if(!first)\n {\n assignments = assignments + \",\";\n } else first = false;\n assignments = assignments + key + \"=\" + value;\n }\n return s.replace(c.callString,assignments);\n }", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "public ImmutableList<String> getVariableNames() {\n return members.stream().map(m -> m.getShortName()).collect(ImmutableList.toImmutableList());\n }", "public VariableView getVarView() {\n \t\treturn this.varView;\n \t}", "public List<String> getVariables() {\r\n List<String> newList = new ArrayList<String>();\r\n newList.addAll(e1.getVariables());\r\n return newList;\r\n }", "public void separateVariables() {\n\t\tsquareVariables = app.split(shapes, \" \");\n\t\t\n\t\t//Going through the array and turning the strings into numbers, for the values of the variables (based on position)\n\t\tfor (int i = 0; i < squareVariables.length; i++) {\n\t\t\tsize = Integer.parseInt(squareVariables[1]);\n\t\t\tposX = Integer.parseInt(squareVariables[2]);\n\t\t\tposY = Integer.parseInt(squareVariables[3]);\n\t\t\tdir1 = Integer.parseInt(squareVariables[4]);\n\t\t\tdir2 = Integer.parseInt(squareVariables[4]);\n\t\t\tvalue = Integer.parseInt(squareVariables[5]);\n\t\t}\n\t}", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "public String toString () {\n return nameOfVar;\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public List<String> getMainVariableNames(TOSCAPlan plan) {\n\t\tList<String> names = new ArrayList<String>();\n\t\tNodeList childNodes = plan.getBpelProcessVariablesElement().getChildNodes();\n\t\tfor (int i = 0; i < childNodes.getLength(); i++) {\n\t\t\tNode child = childNodes.item(i);\n\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tString varName = child.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tnames.add(varName);\n\t\t\t}\n\t\t}\n\t\treturn names;\n\t}", "Variables createVariables();", "public java.util.List<Object> generateControlVars();", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public List<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private static void showValues(Derived derived) {\n\t\tSystem.out.println(\"\\n\\tX = \" + derived.getX()\n\t\t+ \";\\tY = \" + derived.getY() + \";\\tZ = \"\n\t\t+ derived.getZ() + \";\\tThe Largest Value Is : \"\n\t\t+ derived.getLargestValue());\n\t}", "public StringSet freeVars() {\n\treturn argument.freeVars();\n }", "public void display() {System.out.println(skaitlis);}", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "public Vector Display() \n\t{\n\t\treturn v;\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list.add(this.variable);\r\n return list;\r\n }", "public void setTotalVariables( int totalVars ) ;", "public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }", "public String replaceVars(Map<String, String> vars) {\n if (this.value == null) {\n return null;\n }\n StringBuffer sb = new StringBuffer();\n Matcher matcher = VARS_RE.matcher(this.value);\n while (matcher.find()) {\n String name = matcher.group(1);\n String val = vars.get(name);\n if (val != null) {\n matcher.appendReplacement(sb, val);\n } else {\n matcher.appendReplacement(sb, name);\n }\n }\n matcher.appendTail(sb);\n return sb.toString();\n }", "public abstract void addToDisplay(String key, Object...values);", "public void addViewVariable (String name, Object value)\n {\n _viewVariables.put (name, value);\n }", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void displayCurrentValues() {\r\n currentX.setText(Float.toString(deltaX));\r\n currentY.setText(Float.toString(deltaY));\r\n currentZ.setText(Float.toString(deltaZ));\r\n }", "public void displayCleanValues() {\r\n currentX.setText(\"0.0\");\r\n currentY.setText(\"0.0\");\r\n currentZ.setText(\"0.0\");\r\n }", "String getVariable();", "private void updateVars()\n {\n\n }", "public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }", "public ArrayList<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private void getUsefulVariables(Iterable toIter)\n {\n String visualRepresentation = null;\n String name = null;\n String description = null;\n\n try {\n visualRepresentation = (String)toIter.getClass().getMethod(\"getVisualRepresentation\").invoke(toIter);\n name = (String)toIter.getClass().getMethod(\"getName\").invoke(toIter);\n description = (String)toIter.getClass().getMethod(\"getDescription\").invoke(toIter);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n this.infos.add(new String[]{visualRepresentation, name, description});\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\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}", "private static void Display()\n\t{\n\t\tStringBuilder memoryValues = new StringBuilder();\n\t\tSystem.out.println(\"\\nPipleline Stages: \");\n\t\tif (stages.get(\"F\") != null)\n\t\t\tSystem.out.println(\"--------Fetch-----------> \" + stages.get(\"F\").getContent());\n\t\tif (stages.get(\"D\") != null)\n\t\t\tSystem.out.println(\"--------Decode----------> \" + stages.get(\"D\").getContent());\n\t\tif (stages.get(\"E\") != null)\n\t\t\tSystem.out.println(\"--------Execution1------> \" + stages.get(\"E\").getContent());\n\t\tif (stages.get(\"E2\") != null)\n\t\t\tSystem.out.println(\"--------Execution2------> \" + stages.get(\"E2\").getContent());\n\t\tif (stages.get(\"B1\") != null)\n\t\t\tSystem.out.println(\"--------Branch----------> \" + stages.get(\"B1\").getContent());\n\t\tif (stages.get(\"Dly\") != null)\n\t\t\tSystem.out.println(\"--------Delay-----------> \" + stages.get(\"Dly\").getContent());\n\t\tif (stages.get(\"M\") != null)\n\t\t\tSystem.out.println(\"--------Memory----------> \" + stages.get(\"M\").getContent());\n\t\tif (stages.get(\"W\") != null)\n\t\t\tSystem.out.println(\"--------Writeback-------> \" + stages.get(\"W\").getContent());\n\n\t\tSystem.out.println(\"\\nRegister File Details: \\n\");\n\t\tfor (Entry<String, Integer> register : registerFile.entrySet())\n\t\t{\n\t\t\tSystem.out.print(register.getKey() + \" : \" + register.getValue() + \"|\\t|\");\n\t\t}\n\t\tSystem.out.println(\"Special Register X:\" + specialRegister);\n\t\tSystem.out.println(\"\\n0 to 99 Memory Address Details: \");\n\t\tfor (int i = 0; i < 100; i++)\n\t\t{\n\t\t\tmemoryValues.append(\" [\" + i + \" - \" + memoryBlocks[i] + \"] \");\n\t\t\tif (i > 0 && i % 10 == 0)\n\t\t\t\tmemoryValues.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(memoryValues);\n\n\t}", "public void displayCleanValues() {\n currentX.setText(\"0.00\");\n currentY.setText(\"0.00\");\n currentZ.setText(\"0.00\");\n }", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }", "public void storeTitle(final String variableName);", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }" ]
[ "0.7844046", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.60275507", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.5757543", "0.57511294", "0.57302964", "0.5684172", "0.5638305", "0.56062293", "0.55669403", "0.55558926", "0.5548193", "0.5545033", "0.55361456", "0.5514248", "0.550128", "0.5487074", "0.54834485", "0.5432715", "0.5425987", "0.5423505", "0.5419004", "0.5406737", "0.54045105", "0.540069", "0.53991485", "0.5384839", "0.5384361", "0.5360469", "0.5357224", "0.5352903", "0.535157", "0.53453356", "0.5343216", "0.5335405", "0.5333899", "0.53252774", "0.5322926", "0.5322497", "0.5319454", "0.5316853", "0.5313266", "0.53021985", "0.5299921", "0.5295497", "0.52854455", "0.52691036", "0.52637005", "0.52580816", "0.5257108", "0.5256446", "0.52543664", "0.5251036", "0.5250009", "0.52484196", "0.5235578", "0.52246916", "0.52227384", "0.52128726", "0.5212035", "0.5211899", "0.52116245", "0.52102005", "0.5209476", "0.51895064", "0.5185456", "0.51851326", "0.5179755", "0.5174719", "0.51587725", "0.5140486", "0.5135366", "0.5117871", "0.5116288", "0.51148087", "0.51146084", "0.51137644", "0.511354", "0.5112861", "0.5108261", "0.5106111", "0.5103105", "0.5081686", "0.5080384" ]
0.65636903
1
nombre de classes pour la classif
public FuzzyNodeClassif( String buffer, int nb_class ) throws Exception { super( buffer ); this.nb_class = nb_class; // lecture du noeud this.Variables.add(new Integer(st.nextToken().trim()) ); // lecture de la classe majoritaire for( int i=0 ; i<nb_class ; i++ ) this.Variables.add(new Double(st.nextToken().trim())); // lecture des effectifs par classe }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClazzName();", "public String getClassName();", "String getClassName();", "String getClassName();", "String getClassName();", "public int getNumOfClasses();", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}", "java.lang.String getClassName();", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "public String getName_Class() {\n\t\treturn name;\n\t}", "boolean hasClassname();", "abstract String getClassName();", "public abstract String getClassName();", "Object getClass_();", "Object getClass_();", "public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}", "public String getClassname() {\n return classname;\n }", "java.lang.String getClass_();", "java.lang.String getClass_();", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "public String getClassname() {\n\t\treturn classname;\n\t}", "String getInstanceOfClass();", "public int getClasses(){\r\n\t\treturn this.classes;\r\n\t}", "public String getClassName(){\n\t\treturn classname;\n\t}", "public abstract Class<?>[] getCoClasses();", "public String getClassName() { return className; }", "private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}", "@Test\n public void testGetClasses() throws Exception {\n for (Class clazz : TestClass.class.getClasses()) {\n System.out.println(clazz.getName());\n }\n }", "public String getClassname()\r\n {\r\n return m_classname;\r\n }", "String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }", "public String getClazz();", "public int getNumberOfClasses() {\n return 200;\n }", "public String getClassName () { return _className; }", "public ArrayList<String> getNamesOfClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<String> classes = new ArrayList<String>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add( cls.getIRI().getFragment() );\n\t\t\t\n\t\treturn classes;\n\t}", "protected String getClassName() {\n return getDescriptedClass().getName();\n }", "public String getClassName()\n {\n return _className;\n }", "default String getClassName() {\n return declaringType().getClassName();\n }", "public String getName() {\n return className;\n }", "@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@NotNull\n List<? extends ClassInfo> getClasses();", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }", "public String getType() {\n\t\treturn \"class\";\n\t}", "public String getClassName()\n {\n return className;\n }", "@DISPID(-2147417111)\n @PropGet\n java.lang.String className();", "String getClazz();", "public String getClassName() {\n return className;\n }", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "public String getClassName()\n {\n return this.className;\n }", "int getClasspathCount();", "int getClasspathCount();", "public String getClassName() {\r\n return className;\r\n }", "public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}", "public static String getClassName(EditorInfo info) {\n\t\tif (info.inputType==InputType.TYPE_NULL) return \"NULL\"; //inputType==0 is a common case...\n\t\tint i = info.inputType & InputType.TYPE_MASK_CLASS;\n\t\tfor (Field f : InputType.class.getFields())\n\t\t\ttry {\n\t\t\t\tif (f.getName().startsWith(\"TYPE_CLASS_\")\n\t\t\t\t\t\t&& f.getInt(null)==i)\n\t\t\t\t\treturn f.getName().substring(\"TYPE_CLASS_\".length());\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t//Shouldn't happen, but hope some other field matches!\n\t\t\t\tandroid.util.Log.d(\"DasherIME\",\"Couldn't read field \"+f.getName()+\", skipping...\", e);\n\t\t\t}\n\t\tthrow new IllegalArgumentException(\"InputType class \"+info.inputType+\" not found\");\n\t}", "public static String getClassName() {\n return CLASS_NAME;\n }", "public abstract Class getDescriptedClass();", "public final int getMaxClasses()\r\n\t{\r\n\t\treturn maxClasses;\r\n\t}", "private String m56637b(Class cls) {\n return cls.getName();\n }", "public abstract List<String> scanAllClassNames();", "@Override\n\tpublic String typeKey() {\n\t return \"class\";\n\t}", "String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }", "String getClassName() {\n return this.className;\n }", "public String getClassName() {\n return super.getClassName();\n }", "public String toString() {return classSimpleName+\"#\"+name;}", "public String getClassName(){\n\t\treturn targetClass.name;\n\t}", "protected String getClassName(Object o) {\n\t\tString classString = o.getClass().getName();\n\t\tint dotIndex = classString.lastIndexOf(\".\");\n\n\t\treturn classString.substring(dotIndex + 1);\n\t}", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public String getName() {\n\t\treturn className;\n\t}", "@Test\n public void testGetDecalredClasses() {\n for (Class clazz : TestClass.class.getDeclaredClasses()) {\n System.out.println(clazz.getName());\n }\n }", "public String getClassName() {\n return this.className;\n }", "public String getClassName() {\n return this.className;\n }", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}", "int getSuperClassesCount();", "public List<String> getClassList() {\n return classlist;\n }", "String getGeneratedClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "List memberClasses();", "private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }", "public String getClassName(String path);", "public String[] readClasses();", "ClassType memberClassNamed(String name);", "char[] getSuperclassName();", "@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepo.findAll();\n\t}", "public String getClassification() {\n return classification;\n }", "protected String getClassName() {\r\n return newName.getText();\r\n }", "public String getElementClass ();", "public String getClassName() {\n\t\treturn className;\n\t}", "public String getClassName() {\n\t\treturn className;\n\t}", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "public String getClassification() {\n return classification;\n }", "public String getClassification() {\n return classification;\n }", "public String getCurrentClassName () {\n String currentClass = getCurrentElement(ElementKind.CLASS);\n if (currentClass == null) return \"\";\n else return currentClass;\n }" ]
[ "0.745797", "0.73111176", "0.72620255", "0.72620255", "0.72620255", "0.7186412", "0.7148621", "0.7092385", "0.70412844", "0.6911607", "0.69111824", "0.6905573", "0.6877526", "0.6859231", "0.68451774", "0.6777167", "0.6777167", "0.6763394", "0.6736492", "0.67231286", "0.67231286", "0.66644603", "0.6659965", "0.6627405", "0.6587631", "0.65843683", "0.65818095", "0.6569229", "0.65536785", "0.65255606", "0.6519471", "0.6509362", "0.65078056", "0.6499832", "0.64925206", "0.6480211", "0.64682657", "0.6443211", "0.6416283", "0.6410178", "0.6409227", "0.6384569", "0.6373563", "0.63701636", "0.63678354", "0.63651687", "0.6351884", "0.63485897", "0.6331413", "0.63313925", "0.6305379", "0.630487", "0.630487", "0.6296674", "0.6283997", "0.6271425", "0.62669426", "0.6263019", "0.6258779", "0.6255747", "0.625496", "0.6246321", "0.623331", "0.622025", "0.62152916", "0.6210756", "0.62013805", "0.61985433", "0.6197337", "0.6197337", "0.6197337", "0.6197337", "0.6197337", "0.6197337", "0.6189233", "0.61890584", "0.61847955", "0.61709267", "0.61709267", "0.6166183", "0.61660683", "0.6144741", "0.6124722", "0.6124722", "0.6124722", "0.61206716", "0.6109623", "0.6093303", "0.60897344", "0.6086647", "0.60859096", "0.60704297", "0.6059361", "0.60466135", "0.6045605", "0.60439605", "0.60439605", "0.6043374", "0.6039214", "0.6039214", "0.60227156" ]
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes display_variables.add(new DisplayVariableGroup(new String("MajorityClass"), new String("Majority\nClass"))); // les effectifs par classe sont gérés par un groupe de variables ClassEffectif DisplayVariableGroup new_dv = new DisplayVariableGroup(new String("ClassEffectif"), Integer.toString(1)); for( int i=1 ; i<this.nb_class ; i++ ) new_dv.AddVariableName(Integer.toString(i+1)); display_variables.add(new_dv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void InitVariablesGroups( Vector display_variables, Vector params ) {\n display_variables.add(new DisplayVariableGroup(new String(\"Samples\")));\n display_variables.add(new DisplayVariableGroup(new String(\"Entropie\")));\n }", "public void displayVariables(TextArea textArea) {\r\n\r\n Enumeration enum1 = variableList.elements() ;\r\n while(enum1.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum1.nextElement() ;\r\n textArea.appendText(\"\\n\" + temp.name + \" value = \" + temp.value) ;\r\n }\r\n }", "public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }", "public String getVariablesInternal() {\n StringBuilder b = new StringBuilder();\n JTable table = m_table.getTable();\n int numRows = table.getModel().getRowCount();\n\n for (int i = 0; i < numRows; i++) {\n String paramName = table.getValueAt(i, 0).toString();\n String paramValue = table.getValueAt(i, 1).toString();\n if (paramName.length() > 0 && paramValue.length() > 0) {\n b.append(paramName).append(SetVariables.SEP2).append(paramValue);\n }\n if (i < numRows - 1) {\n b.append(SetVariables.SEP1);\n }\n }\n\n return b.toString();\n }", "public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}", "public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n display_variables.add(new DisplayVariableGroup(new String(\"Mean\")));\n display_variables.add(new DisplayVariableGroup(new String(\"StandardDeviation\")));\n }", "public void showAssignments(){\n\t\tIterator it = this.clauses.iterator();\n\t\tint numVar = this.getVocabulary().getMaxVariableId();\n\t\tint[] assign = new int[numVar*2+1]; \n\n\t\twhile (it.hasNext()) {\n\t\t\tSystem.out.println(\"___________________________\");\n IClause cl = (IClause) it.next();\n Iterator litIterator = cl.literalIterator();\n while (litIterator.hasNext()){\n \tILiteral lit = (ILiteral) litIterator.next();\n \tint idx = lit.getId();\n \tif (idx<0) \n \t\tidx = numVar - idx;\n \tassign[idx] = lit.value();\n }\n }\n\t\t\n\t\tfor (int i=1;i<assign.length;i++){\n\t\t\tint k = i;\n\t\t\tif (i>numVar)\n\t\t\t\tk = numVar - i;\n\t\t\tSystem.out.print(k + \"|\" + assign[i] + \";\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public Map<String, I18nizableText> getVariablesDescriptions();", "public void print(){\r\n\r\n\r\n System.out.println(\"File: \" + file.getName());\r\n Set<String> keys = getDataMap().keySet();\r\n System.out.println(\"Die Variablen in diesem File: \" + keys);\r\n System.out.println(\"Geben Sie eine Variable an: \");\r\n\r\n Scanner wert = new Scanner(System.in);\r\n String wert1 = wert.nextLine();\r\n\r\n DataContainer dc = getDataMap().get(wert1);\r\n\r\n if (dc != null) {\r\n System.out.println(wert1 + \":\" + dc.getValues());\r\n }\r\n /*System.out.println(\"File: \" + file.getName());\r\n\r\n\r\n if (dc1 != null && dc2 != null) {\r\n System.out.println(dc1.getVariableName() + \": \" + dc1.getValues());\r\n System.out.println(dc2.getVariableName() + \": \" + dc2.getValues());*/\r\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }", "private void drawModelElements_PlainVariables_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 237: */ {\n/* 238:320 */ if (!_publicOnly) {\n/* 239:321 */ drawPlainVariable(_panel, _g, 20, 50, 10, 0, \"mapPanel\", this.mapPanel, false);\n/* 240: */ }\n/* 241: */ }", "List<IVariableDef> getVariables();", "public Map<String, Object> getVariables();", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par sef sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), (String)params.elementAt(0));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName((String)params.elementAt(i));\n\n display_variables.add(new_dv);\n }", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}", "private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}", "public void addViewVariables (Map<String, Object> vars)\n {\n if (vars != null)\n {\n _viewVariables.putAll (vars);\n }\n }", "@Override\n public List<String> getVariables()\n {\n return null;\n }", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "static void dumpVariablesInOrder( PrintWriter pw ) {\n try {\n for ( int i=0; i<Vtable.size(); i++ ) {\n int v = i+1;\n String varname = findVar(v);\n variable var = find(varname);\n if (var.userVisible)\n pw.println( \"c u \" + v + \" \" + varname );\n else\n pw.println( \"c c \" + v + \" \" + varname );\n }\n }\n catch ( Exception e ) {\n Util.fatalError( \"dumpVariablesInOrder Exception \" +\n e.getMessage() );\n }\n }", "void display(String w[][]){\r\n System.out.println(\"\\nGambaran dari area (world) yang di buat\\n\");\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\");\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print(w[i][j]+ \"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n }", "protected ArrayList<String> getVariableNames() {\n ArrayList<String> varNames = new ArrayList<String>();\n \n Element ncElement = getNetcdfElement();\n List<Element> vars = ncElement.getChildren(\"variable\", ncElement.getNamespace()); \n for (Element element : vars) {\n String name = getVariableName(element);\n varNames.add(name);\n }\n\n return varNames;\n }", "public void displayData(String[] str);", "public void display(){\n int n = nb_instructions;\n System.out.println(\"There are \" + n + \" key_words\");\n for(int i = 0; i<n;i++){\n System.out.println(\"\\tKey_word \" + (i+1) + \": \" + key_words.get(i));\n }\n }", "@Override\n public List<String> getVariables() {\n return super.getVariables();\n }", "public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\n\t}", "void printValues(Vector Vect){\n\t\tint index;\n\t\tfor(index=0;index< Vect.size(); index++){\t\n\t\t\tSystem.out.println(\"Element \" + Vect.elementAt(index));\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "String getVariableDefinition();", "void display()\r\n\t {\n\t System.out.println(\"a = \" + a + \" b = \" + b);\r\n\t }", "public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }", "public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}", "public String getVariable();", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "public void dispAll(){\n System.out.println(\"HISTORY :\");\n for(int i=0;i<history.size();i++)\n System.out.print(history.get(i) + \" | \");\n System.out.println(\"\\nSTACK :\");\n Stack <Object> acc = new Stack<>();\n while (!stack.isEmpty())acc.push(stack.pop());\n while (!acc.isEmpty()){\n System.out.print(acc.peek()+ \" | \");\n stack.push(acc.pop());\n }\n System.out.println(\"\\nVariables Stockes : \" + variables.toString());\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 String groundVars(String s, HashMap<String,String> vars, Call c)\n {\n String assignments = \"\";\n boolean first = true;\n for (HashMap.Entry<String, String> entry : vars.entrySet()) \n {\n String key = entry.getKey();\n Object value = entry.getValue();\n if(!first)\n {\n assignments = assignments + \",\";\n } else first = false;\n assignments = assignments + key + \"=\" + value;\n }\n return s.replace(c.callString,assignments);\n }", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "public ImmutableList<String> getVariableNames() {\n return members.stream().map(m -> m.getShortName()).collect(ImmutableList.toImmutableList());\n }", "public VariableView getVarView() {\n \t\treturn this.varView;\n \t}", "public List<String> getVariables() {\r\n List<String> newList = new ArrayList<String>();\r\n newList.addAll(e1.getVariables());\r\n return newList;\r\n }", "public void separateVariables() {\n\t\tsquareVariables = app.split(shapes, \" \");\n\t\t\n\t\t//Going through the array and turning the strings into numbers, for the values of the variables (based on position)\n\t\tfor (int i = 0; i < squareVariables.length; i++) {\n\t\t\tsize = Integer.parseInt(squareVariables[1]);\n\t\t\tposX = Integer.parseInt(squareVariables[2]);\n\t\t\tposY = Integer.parseInt(squareVariables[3]);\n\t\t\tdir1 = Integer.parseInt(squareVariables[4]);\n\t\t\tdir2 = Integer.parseInt(squareVariables[4]);\n\t\t\tvalue = Integer.parseInt(squareVariables[5]);\n\t\t}\n\t}", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "public String toString () {\n return nameOfVar;\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public List<String> getMainVariableNames(TOSCAPlan plan) {\n\t\tList<String> names = new ArrayList<String>();\n\t\tNodeList childNodes = plan.getBpelProcessVariablesElement().getChildNodes();\n\t\tfor (int i = 0; i < childNodes.getLength(); i++) {\n\t\t\tNode child = childNodes.item(i);\n\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tString varName = child.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tnames.add(varName);\n\t\t\t}\n\t\t}\n\t\treturn names;\n\t}", "Variables createVariables();", "public java.util.List<Object> generateControlVars();", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public List<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private static void showValues(Derived derived) {\n\t\tSystem.out.println(\"\\n\\tX = \" + derived.getX()\n\t\t+ \";\\tY = \" + derived.getY() + \";\\tZ = \"\n\t\t+ derived.getZ() + \";\\tThe Largest Value Is : \"\n\t\t+ derived.getLargestValue());\n\t}", "public StringSet freeVars() {\n\treturn argument.freeVars();\n }", "public void display() {System.out.println(skaitlis);}", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "public Vector Display() \n\t{\n\t\treturn v;\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list.add(this.variable);\r\n return list;\r\n }", "public void setTotalVariables( int totalVars ) ;", "public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }", "public String replaceVars(Map<String, String> vars) {\n if (this.value == null) {\n return null;\n }\n StringBuffer sb = new StringBuffer();\n Matcher matcher = VARS_RE.matcher(this.value);\n while (matcher.find()) {\n String name = matcher.group(1);\n String val = vars.get(name);\n if (val != null) {\n matcher.appendReplacement(sb, val);\n } else {\n matcher.appendReplacement(sb, name);\n }\n }\n matcher.appendTail(sb);\n return sb.toString();\n }", "public abstract void addToDisplay(String key, Object...values);", "public void addViewVariable (String name, Object value)\n {\n _viewVariables.put (name, value);\n }", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void displayCurrentValues() {\r\n currentX.setText(Float.toString(deltaX));\r\n currentY.setText(Float.toString(deltaY));\r\n currentZ.setText(Float.toString(deltaZ));\r\n }", "public void displayCleanValues() {\r\n currentX.setText(\"0.0\");\r\n currentY.setText(\"0.0\");\r\n currentZ.setText(\"0.0\");\r\n }", "String getVariable();", "private void updateVars()\n {\n\n }", "public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }", "public ArrayList<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private void getUsefulVariables(Iterable toIter)\n {\n String visualRepresentation = null;\n String name = null;\n String description = null;\n\n try {\n visualRepresentation = (String)toIter.getClass().getMethod(\"getVisualRepresentation\").invoke(toIter);\n name = (String)toIter.getClass().getMethod(\"getName\").invoke(toIter);\n description = (String)toIter.getClass().getMethod(\"getDescription\").invoke(toIter);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n this.infos.add(new String[]{visualRepresentation, name, description});\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\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}", "private static void Display()\n\t{\n\t\tStringBuilder memoryValues = new StringBuilder();\n\t\tSystem.out.println(\"\\nPipleline Stages: \");\n\t\tif (stages.get(\"F\") != null)\n\t\t\tSystem.out.println(\"--------Fetch-----------> \" + stages.get(\"F\").getContent());\n\t\tif (stages.get(\"D\") != null)\n\t\t\tSystem.out.println(\"--------Decode----------> \" + stages.get(\"D\").getContent());\n\t\tif (stages.get(\"E\") != null)\n\t\t\tSystem.out.println(\"--------Execution1------> \" + stages.get(\"E\").getContent());\n\t\tif (stages.get(\"E2\") != null)\n\t\t\tSystem.out.println(\"--------Execution2------> \" + stages.get(\"E2\").getContent());\n\t\tif (stages.get(\"B1\") != null)\n\t\t\tSystem.out.println(\"--------Branch----------> \" + stages.get(\"B1\").getContent());\n\t\tif (stages.get(\"Dly\") != null)\n\t\t\tSystem.out.println(\"--------Delay-----------> \" + stages.get(\"Dly\").getContent());\n\t\tif (stages.get(\"M\") != null)\n\t\t\tSystem.out.println(\"--------Memory----------> \" + stages.get(\"M\").getContent());\n\t\tif (stages.get(\"W\") != null)\n\t\t\tSystem.out.println(\"--------Writeback-------> \" + stages.get(\"W\").getContent());\n\n\t\tSystem.out.println(\"\\nRegister File Details: \\n\");\n\t\tfor (Entry<String, Integer> register : registerFile.entrySet())\n\t\t{\n\t\t\tSystem.out.print(register.getKey() + \" : \" + register.getValue() + \"|\\t|\");\n\t\t}\n\t\tSystem.out.println(\"Special Register X:\" + specialRegister);\n\t\tSystem.out.println(\"\\n0 to 99 Memory Address Details: \");\n\t\tfor (int i = 0; i < 100; i++)\n\t\t{\n\t\t\tmemoryValues.append(\" [\" + i + \" - \" + memoryBlocks[i] + \"] \");\n\t\t\tif (i > 0 && i % 10 == 0)\n\t\t\t\tmemoryValues.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(memoryValues);\n\n\t}", "public void displayCleanValues() {\n currentX.setText(\"0.00\");\n currentY.setText(\"0.00\");\n currentZ.setText(\"0.00\");\n }", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }", "public void storeTitle(final String variableName);", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }" ]
[ "0.7844046", "0.65636903", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.60275507", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.5757543", "0.57302964", "0.5684172", "0.5638305", "0.56062293", "0.55669403", "0.55558926", "0.5548193", "0.5545033", "0.55361456", "0.5514248", "0.550128", "0.5487074", "0.54834485", "0.5432715", "0.5425987", "0.5423505", "0.5419004", "0.5406737", "0.54045105", "0.540069", "0.53991485", "0.5384839", "0.5384361", "0.5360469", "0.5357224", "0.5352903", "0.535157", "0.53453356", "0.5343216", "0.5335405", "0.5333899", "0.53252774", "0.5322926", "0.5322497", "0.5319454", "0.5316853", "0.5313266", "0.53021985", "0.5299921", "0.5295497", "0.52854455", "0.52691036", "0.52637005", "0.52580816", "0.5257108", "0.5256446", "0.52543664", "0.5251036", "0.5250009", "0.52484196", "0.5235578", "0.52246916", "0.52227384", "0.52128726", "0.5212035", "0.5211899", "0.52116245", "0.52102005", "0.5209476", "0.51895064", "0.5185456", "0.51851326", "0.5179755", "0.5174719", "0.51587725", "0.5140486", "0.5135366", "0.5117871", "0.5116288", "0.51148087", "0.51146084", "0.51137644", "0.511354", "0.5112861", "0.5108261", "0.5106111", "0.5103105", "0.5081686", "0.5080384" ]
0.57511294
21
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); display_variables.add(new DisplayVariableGroup(new String("Mean"))); display_variables.add(new DisplayVariableGroup(new String("StandardDeviation"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void InitVariablesGroups( Vector display_variables, Vector params ) {\n display_variables.add(new DisplayVariableGroup(new String(\"Samples\")));\n display_variables.add(new DisplayVariableGroup(new String(\"Entropie\")));\n }", "public void displayVariables(TextArea textArea) {\r\n\r\n Enumeration enum1 = variableList.elements() ;\r\n while(enum1.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum1.nextElement() ;\r\n textArea.appendText(\"\\n\" + temp.name + \" value = \" + temp.value) ;\r\n }\r\n }", "public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }", "public String getVariablesInternal() {\n StringBuilder b = new StringBuilder();\n JTable table = m_table.getTable();\n int numRows = table.getModel().getRowCount();\n\n for (int i = 0; i < numRows; i++) {\n String paramName = table.getValueAt(i, 0).toString();\n String paramValue = table.getValueAt(i, 1).toString();\n if (paramName.length() > 0 && paramValue.length() > 0) {\n b.append(paramName).append(SetVariables.SEP2).append(paramValue);\n }\n if (i < numRows - 1) {\n b.append(SetVariables.SEP1);\n }\n }\n\n return b.toString();\n }", "public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}", "public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void showAssignments(){\n\t\tIterator it = this.clauses.iterator();\n\t\tint numVar = this.getVocabulary().getMaxVariableId();\n\t\tint[] assign = new int[numVar*2+1]; \n\n\t\twhile (it.hasNext()) {\n\t\t\tSystem.out.println(\"___________________________\");\n IClause cl = (IClause) it.next();\n Iterator litIterator = cl.literalIterator();\n while (litIterator.hasNext()){\n \tILiteral lit = (ILiteral) litIterator.next();\n \tint idx = lit.getId();\n \tif (idx<0) \n \t\tidx = numVar - idx;\n \tassign[idx] = lit.value();\n }\n }\n\t\t\n\t\tfor (int i=1;i<assign.length;i++){\n\t\t\tint k = i;\n\t\t\tif (i>numVar)\n\t\t\t\tk = numVar - i;\n\t\t\tSystem.out.print(k + \"|\" + assign[i] + \";\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public Map<String, I18nizableText> getVariablesDescriptions();", "public void print(){\r\n\r\n\r\n System.out.println(\"File: \" + file.getName());\r\n Set<String> keys = getDataMap().keySet();\r\n System.out.println(\"Die Variablen in diesem File: \" + keys);\r\n System.out.println(\"Geben Sie eine Variable an: \");\r\n\r\n Scanner wert = new Scanner(System.in);\r\n String wert1 = wert.nextLine();\r\n\r\n DataContainer dc = getDataMap().get(wert1);\r\n\r\n if (dc != null) {\r\n System.out.println(wert1 + \":\" + dc.getValues());\r\n }\r\n /*System.out.println(\"File: \" + file.getName());\r\n\r\n\r\n if (dc1 != null && dc2 != null) {\r\n System.out.println(dc1.getVariableName() + \": \" + dc1.getValues());\r\n System.out.println(dc2.getVariableName() + \": \" + dc2.getValues());*/\r\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }", "private void drawModelElements_PlainVariables_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 237: */ {\n/* 238:320 */ if (!_publicOnly) {\n/* 239:321 */ drawPlainVariable(_panel, _g, 20, 50, 10, 0, \"mapPanel\", this.mapPanel, false);\n/* 240: */ }\n/* 241: */ }", "List<IVariableDef> getVariables();", "public Map<String, Object> getVariables();", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par sef sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), (String)params.elementAt(0));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName((String)params.elementAt(i));\n\n display_variables.add(new_dv);\n }", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par classe sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), Integer.toString(1));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName(Integer.toString(i+1));\n\n display_variables.add(new_dv);\n }", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}", "private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}", "public void addViewVariables (Map<String, Object> vars)\n {\n if (vars != null)\n {\n _viewVariables.putAll (vars);\n }\n }", "@Override\n public List<String> getVariables()\n {\n return null;\n }", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "static void dumpVariablesInOrder( PrintWriter pw ) {\n try {\n for ( int i=0; i<Vtable.size(); i++ ) {\n int v = i+1;\n String varname = findVar(v);\n variable var = find(varname);\n if (var.userVisible)\n pw.println( \"c u \" + v + \" \" + varname );\n else\n pw.println( \"c c \" + v + \" \" + varname );\n }\n }\n catch ( Exception e ) {\n Util.fatalError( \"dumpVariablesInOrder Exception \" +\n e.getMessage() );\n }\n }", "void display(String w[][]){\r\n System.out.println(\"\\nGambaran dari area (world) yang di buat\\n\");\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\");\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print(w[i][j]+ \"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n }", "protected ArrayList<String> getVariableNames() {\n ArrayList<String> varNames = new ArrayList<String>();\n \n Element ncElement = getNetcdfElement();\n List<Element> vars = ncElement.getChildren(\"variable\", ncElement.getNamespace()); \n for (Element element : vars) {\n String name = getVariableName(element);\n varNames.add(name);\n }\n\n return varNames;\n }", "public void displayData(String[] str);", "public void display(){\n int n = nb_instructions;\n System.out.println(\"There are \" + n + \" key_words\");\n for(int i = 0; i<n;i++){\n System.out.println(\"\\tKey_word \" + (i+1) + \": \" + key_words.get(i));\n }\n }", "@Override\n public List<String> getVariables() {\n return super.getVariables();\n }", "public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\n\t}", "void printValues(Vector Vect){\n\t\tint index;\n\t\tfor(index=0;index< Vect.size(); index++){\t\n\t\t\tSystem.out.println(\"Element \" + Vect.elementAt(index));\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "String getVariableDefinition();", "void display()\r\n\t {\n\t System.out.println(\"a = \" + a + \" b = \" + b);\r\n\t }", "public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }", "public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}", "public String getVariable();", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "public void dispAll(){\n System.out.println(\"HISTORY :\");\n for(int i=0;i<history.size();i++)\n System.out.print(history.get(i) + \" | \");\n System.out.println(\"\\nSTACK :\");\n Stack <Object> acc = new Stack<>();\n while (!stack.isEmpty())acc.push(stack.pop());\n while (!acc.isEmpty()){\n System.out.print(acc.peek()+ \" | \");\n stack.push(acc.pop());\n }\n System.out.println(\"\\nVariables Stockes : \" + variables.toString());\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 String groundVars(String s, HashMap<String,String> vars, Call c)\n {\n String assignments = \"\";\n boolean first = true;\n for (HashMap.Entry<String, String> entry : vars.entrySet()) \n {\n String key = entry.getKey();\n Object value = entry.getValue();\n if(!first)\n {\n assignments = assignments + \",\";\n } else first = false;\n assignments = assignments + key + \"=\" + value;\n }\n return s.replace(c.callString,assignments);\n }", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "public ImmutableList<String> getVariableNames() {\n return members.stream().map(m -> m.getShortName()).collect(ImmutableList.toImmutableList());\n }", "public VariableView getVarView() {\n \t\treturn this.varView;\n \t}", "public List<String> getVariables() {\r\n List<String> newList = new ArrayList<String>();\r\n newList.addAll(e1.getVariables());\r\n return newList;\r\n }", "public void separateVariables() {\n\t\tsquareVariables = app.split(shapes, \" \");\n\t\t\n\t\t//Going through the array and turning the strings into numbers, for the values of the variables (based on position)\n\t\tfor (int i = 0; i < squareVariables.length; i++) {\n\t\t\tsize = Integer.parseInt(squareVariables[1]);\n\t\t\tposX = Integer.parseInt(squareVariables[2]);\n\t\t\tposY = Integer.parseInt(squareVariables[3]);\n\t\t\tdir1 = Integer.parseInt(squareVariables[4]);\n\t\t\tdir2 = Integer.parseInt(squareVariables[4]);\n\t\t\tvalue = Integer.parseInt(squareVariables[5]);\n\t\t}\n\t}", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "public String toString () {\n return nameOfVar;\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public List<String> getMainVariableNames(TOSCAPlan plan) {\n\t\tList<String> names = new ArrayList<String>();\n\t\tNodeList childNodes = plan.getBpelProcessVariablesElement().getChildNodes();\n\t\tfor (int i = 0; i < childNodes.getLength(); i++) {\n\t\t\tNode child = childNodes.item(i);\n\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tString varName = child.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tnames.add(varName);\n\t\t\t}\n\t\t}\n\t\treturn names;\n\t}", "Variables createVariables();", "public java.util.List<Object> generateControlVars();", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public List<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private static void showValues(Derived derived) {\n\t\tSystem.out.println(\"\\n\\tX = \" + derived.getX()\n\t\t+ \";\\tY = \" + derived.getY() + \";\\tZ = \"\n\t\t+ derived.getZ() + \";\\tThe Largest Value Is : \"\n\t\t+ derived.getLargestValue());\n\t}", "public StringSet freeVars() {\n\treturn argument.freeVars();\n }", "public void display() {System.out.println(skaitlis);}", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "public Vector Display() \n\t{\n\t\treturn v;\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list.add(this.variable);\r\n return list;\r\n }", "public void setTotalVariables( int totalVars ) ;", "public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }", "public String replaceVars(Map<String, String> vars) {\n if (this.value == null) {\n return null;\n }\n StringBuffer sb = new StringBuffer();\n Matcher matcher = VARS_RE.matcher(this.value);\n while (matcher.find()) {\n String name = matcher.group(1);\n String val = vars.get(name);\n if (val != null) {\n matcher.appendReplacement(sb, val);\n } else {\n matcher.appendReplacement(sb, name);\n }\n }\n matcher.appendTail(sb);\n return sb.toString();\n }", "public abstract void addToDisplay(String key, Object...values);", "public void addViewVariable (String name, Object value)\n {\n _viewVariables.put (name, value);\n }", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void displayCurrentValues() {\r\n currentX.setText(Float.toString(deltaX));\r\n currentY.setText(Float.toString(deltaY));\r\n currentZ.setText(Float.toString(deltaZ));\r\n }", "public void displayCleanValues() {\r\n currentX.setText(\"0.0\");\r\n currentY.setText(\"0.0\");\r\n currentZ.setText(\"0.0\");\r\n }", "String getVariable();", "private void updateVars()\n {\n\n }", "public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }", "public ArrayList<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private void getUsefulVariables(Iterable toIter)\n {\n String visualRepresentation = null;\n String name = null;\n String description = null;\n\n try {\n visualRepresentation = (String)toIter.getClass().getMethod(\"getVisualRepresentation\").invoke(toIter);\n name = (String)toIter.getClass().getMethod(\"getName\").invoke(toIter);\n description = (String)toIter.getClass().getMethod(\"getDescription\").invoke(toIter);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n this.infos.add(new String[]{visualRepresentation, name, description});\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\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}", "private static void Display()\n\t{\n\t\tStringBuilder memoryValues = new StringBuilder();\n\t\tSystem.out.println(\"\\nPipleline Stages: \");\n\t\tif (stages.get(\"F\") != null)\n\t\t\tSystem.out.println(\"--------Fetch-----------> \" + stages.get(\"F\").getContent());\n\t\tif (stages.get(\"D\") != null)\n\t\t\tSystem.out.println(\"--------Decode----------> \" + stages.get(\"D\").getContent());\n\t\tif (stages.get(\"E\") != null)\n\t\t\tSystem.out.println(\"--------Execution1------> \" + stages.get(\"E\").getContent());\n\t\tif (stages.get(\"E2\") != null)\n\t\t\tSystem.out.println(\"--------Execution2------> \" + stages.get(\"E2\").getContent());\n\t\tif (stages.get(\"B1\") != null)\n\t\t\tSystem.out.println(\"--------Branch----------> \" + stages.get(\"B1\").getContent());\n\t\tif (stages.get(\"Dly\") != null)\n\t\t\tSystem.out.println(\"--------Delay-----------> \" + stages.get(\"Dly\").getContent());\n\t\tif (stages.get(\"M\") != null)\n\t\t\tSystem.out.println(\"--------Memory----------> \" + stages.get(\"M\").getContent());\n\t\tif (stages.get(\"W\") != null)\n\t\t\tSystem.out.println(\"--------Writeback-------> \" + stages.get(\"W\").getContent());\n\n\t\tSystem.out.println(\"\\nRegister File Details: \\n\");\n\t\tfor (Entry<String, Integer> register : registerFile.entrySet())\n\t\t{\n\t\t\tSystem.out.print(register.getKey() + \" : \" + register.getValue() + \"|\\t|\");\n\t\t}\n\t\tSystem.out.println(\"Special Register X:\" + specialRegister);\n\t\tSystem.out.println(\"\\n0 to 99 Memory Address Details: \");\n\t\tfor (int i = 0; i < 100; i++)\n\t\t{\n\t\t\tmemoryValues.append(\" [\" + i + \" - \" + memoryBlocks[i] + \"] \");\n\t\t\tif (i > 0 && i % 10 == 0)\n\t\t\t\tmemoryValues.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(memoryValues);\n\n\t}", "public void displayCleanValues() {\n currentX.setText(\"0.00\");\n currentY.setText(\"0.00\");\n currentZ.setText(\"0.00\");\n }", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }", "public void storeTitle(final String variableName);", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }" ]
[ "0.7844046", "0.65636903", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.5757543", "0.57511294", "0.57302964", "0.5684172", "0.5638305", "0.56062293", "0.55669403", "0.55558926", "0.5548193", "0.5545033", "0.55361456", "0.5514248", "0.550128", "0.5487074", "0.54834485", "0.5432715", "0.5425987", "0.5423505", "0.5419004", "0.5406737", "0.54045105", "0.540069", "0.53991485", "0.5384839", "0.5384361", "0.5360469", "0.5357224", "0.5352903", "0.535157", "0.53453356", "0.5343216", "0.5335405", "0.5333899", "0.53252774", "0.5322926", "0.5322497", "0.5319454", "0.5316853", "0.5313266", "0.53021985", "0.5299921", "0.5295497", "0.52854455", "0.52691036", "0.52637005", "0.52580816", "0.5257108", "0.5256446", "0.52543664", "0.5251036", "0.5250009", "0.52484196", "0.5235578", "0.52246916", "0.52227384", "0.52128726", "0.5212035", "0.5211899", "0.52116245", "0.52102005", "0.5209476", "0.51895064", "0.5185456", "0.51851326", "0.5179755", "0.5174719", "0.51587725", "0.5140486", "0.5135366", "0.5117871", "0.5116288", "0.51148087", "0.51146084", "0.51137644", "0.511354", "0.5112861", "0.5108261", "0.5106111", "0.5103105", "0.5081686", "0.5080384" ]
0.60275507
10
nombre de classe (en fait nombre de sef dans ce cas)
public FuzzyNodeFuzzyOutput( String buffer, int nb_class ) throws Exception { super( buffer ); this.nb_class = nb_class; // lecture du noeud this.Variables.add(new String(st.nextToken().trim())); // lecture sef majoritaire for( int i=0 ; i<nb_class ; i++ ) this.Variables.add(new Double(st.nextToken().trim())); // lecture de l'effectif par sef }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClazzName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public String getName_Class() {\n\t\treturn name;\n\t}", "@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }", "public String getClassName();", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}", "String getClassName();", "String getClassName();", "String getClassName();", "public abstract String getClassName();", "java.lang.String getClassName();", "abstract String getClassName();", "public String getNomeClasse() {\n\t\treturn jlNomeClasse.getText();\n\t}", "protected String getClassName() {\r\n return newName.getText();\r\n }", "public abstract String getNomClasse();", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "public String getClassname()\r\n {\r\n return m_classname;\r\n }", "public String toString() {return classSimpleName+\"#\"+name;}", "public String getClassName(){\n\t\treturn classname;\n\t}", "public String getClasse() {\n\t\treturn classe;\n\t}", "public String getClassName () { return _className; }", "protected String getClassName() {\n return getDescriptedClass().getName();\n }", "@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public String getClassname() {\n return classname;\n }", "public String getName() {\r\n \treturn this.getClass().getName();\r\n }", "public String getClassname() {\n\t\treturn classname;\n\t}", "public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}", "String typeName();", "public String getStartName() {// TODO remove\n\t\treturn this.getClass().getSimpleName();\n\t}", "public abstract String getTypeName();", "public char getName(){\n\t\treturn tipo;\n\t}", "String getSimpleName();", "String getSimpleName();", "private String m56637b(Class cls) {\n return cls.getName();\n }", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public String getName() {\n return className;\n }", "protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}", "java.lang.String getClass_();", "java.lang.String getClass_();", "String getName() ;", "public abstract Class getDescriptedClass();", "public String getTypeName();", "public String getTypeName();", "public String getClassName() { return className; }", "char[] getSuperclassName();", "default String getClassName() {\n return declaringType().getClassName();\n }", "public String getName()\r\n {\n return \"tan\";\r\n }", "public String getName() {\n\t\treturn \"Object class name\";\n\t}", "public String getName() {\n\t\treturn className;\n\t}", "protected static String getSimpleName(Class<?> c) {\n String name = c.getName();\n return name.substring(name.lastIndexOf(\".\") + 1);\n }", "@Override\n\tpublic String getName() {\n\t\treturn nombre;\n\t}", "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();" ]
[ "0.7567311", "0.7367507", "0.72656536", "0.7132638", "0.7130803", "0.708971", "0.7087832", "0.7087832", "0.7087832", "0.7028404", "0.7027422", "0.7025819", "0.69970053", "0.69635445", "0.68918574", "0.68427336", "0.6842015", "0.6827344", "0.6809138", "0.68017274", "0.67765915", "0.67590123", "0.6723931", "0.67168945", "0.6700195", "0.6685947", "0.66532934", "0.66513985", "0.66378915", "0.66362935", "0.6619603", "0.6597088", "0.65896046", "0.6582423", "0.6582423", "0.6574014", "0.6572475", "0.6571412", "0.655849", "0.6551226", "0.6551226", "0.654403", "0.6538957", "0.6525819", "0.6525819", "0.6504931", "0.6495886", "0.6484302", "0.6457639", "0.64575994", "0.6450532", "0.6440376", "0.64389426", "0.6437816", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006", "0.64370006" ]
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes display_variables.add(new DisplayVariableGroup(new String("MajorityClass"), new String("Majority\nClass"))); // les effectifs par sef sont gérés par un groupe de variables ClassEffectif DisplayVariableGroup new_dv = new DisplayVariableGroup(new String("ClassEffectif"), (String)params.elementAt(0)); for( int i=1 ; i<this.nb_class ; i++ ) new_dv.AddVariableName((String)params.elementAt(i)); display_variables.add(new_dv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void InitVariablesGroups( Vector display_variables, Vector params ) {\n display_variables.add(new DisplayVariableGroup(new String(\"Samples\")));\n display_variables.add(new DisplayVariableGroup(new String(\"Entropie\")));\n }", "public void displayVariables(TextArea textArea) {\r\n\r\n Enumeration enum1 = variableList.elements() ;\r\n while(enum1.hasMoreElements()) {\r\n RuleVariable temp = (RuleVariable)enum1.nextElement() ;\r\n textArea.appendText(\"\\n\" + temp.name + \" value = \" + temp.value) ;\r\n }\r\n }", "public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }", "public String getVariablesInternal() {\n StringBuilder b = new StringBuilder();\n JTable table = m_table.getTable();\n int numRows = table.getModel().getRowCount();\n\n for (int i = 0; i < numRows; i++) {\n String paramName = table.getValueAt(i, 0).toString();\n String paramValue = table.getValueAt(i, 1).toString();\n if (paramName.length() > 0 && paramValue.length() > 0) {\n b.append(paramName).append(SetVariables.SEP2).append(paramValue);\n }\n if (i < numRows - 1) {\n b.append(SetVariables.SEP1);\n }\n }\n\n return b.toString();\n }", "public String variableValues() {\n\t\tif (name.values().size()==0)\n\t\t\treturn \"Symbol table is empty\";\n\t\tString s = \"Variable values\\n\";\n\t\tfor (NameSSA n : name.values()) {\n\t\t\tVariable v = var.get(n.current());\n\t\t\tif (v.isConstant())\n\t\t\t\ts += n.current() + \":\" + v.constantNumber();\n\t\t\telse \n\t\t\t\ts += n.current() + \":\" + \" unknown\";\n\t\t\ts+=\" \";\n\t\t}\n\t\treturn s;\n\t}", "public void afficherVariables() {\n System.out.println\r\n (\"Objet de type GrillePain avec variables d'instance année = \" +\r\n annee + \" et nbTranches = \" + nbTranches);\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n display_variables.add(new DisplayVariableGroup(new String(\"Mean\")));\n display_variables.add(new DisplayVariableGroup(new String(\"StandardDeviation\")));\n }", "public void showAssignments(){\n\t\tIterator it = this.clauses.iterator();\n\t\tint numVar = this.getVocabulary().getMaxVariableId();\n\t\tint[] assign = new int[numVar*2+1]; \n\n\t\twhile (it.hasNext()) {\n\t\t\tSystem.out.println(\"___________________________\");\n IClause cl = (IClause) it.next();\n Iterator litIterator = cl.literalIterator();\n while (litIterator.hasNext()){\n \tILiteral lit = (ILiteral) litIterator.next();\n \tint idx = lit.getId();\n \tif (idx<0) \n \t\tidx = numVar - idx;\n \tassign[idx] = lit.value();\n }\n }\n\t\t\n\t\tfor (int i=1;i<assign.length;i++){\n\t\t\tint k = i;\n\t\t\tif (i>numVar)\n\t\t\t\tk = numVar - i;\n\t\t\tSystem.out.print(k + \"|\" + assign[i] + \";\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public Map<String, I18nizableText> getVariablesDescriptions();", "public void print(){\r\n\r\n\r\n System.out.println(\"File: \" + file.getName());\r\n Set<String> keys = getDataMap().keySet();\r\n System.out.println(\"Die Variablen in diesem File: \" + keys);\r\n System.out.println(\"Geben Sie eine Variable an: \");\r\n\r\n Scanner wert = new Scanner(System.in);\r\n String wert1 = wert.nextLine();\r\n\r\n DataContainer dc = getDataMap().get(wert1);\r\n\r\n if (dc != null) {\r\n System.out.println(wert1 + \":\" + dc.getValues());\r\n }\r\n /*System.out.println(\"File: \" + file.getName());\r\n\r\n\r\n if (dc1 != null && dc2 != null) {\r\n System.out.println(dc1.getVariableName() + \": \" + dc1.getValues());\r\n System.out.println(dc2.getVariableName() + \": \" + dc2.getValues());*/\r\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }", "private void drawModelElements_PlainVariables_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 237: */ {\n/* 238:320 */ if (!_publicOnly) {\n/* 239:321 */ drawPlainVariable(_panel, _g, 20, 50, 10, 0, \"mapPanel\", this.mapPanel, false);\n/* 240: */ }\n/* 241: */ }", "List<IVariableDef> getVariables();", "public Map<String, Object> getVariables();", "public void InitVariablesGroups( Vector display_variables, Vector params ) {\n super.InitVariablesGroups(display_variables, params);\n // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes\n display_variables.add(new DisplayVariableGroup(new String(\"MajorityClass\"), new String(\"Majority\\nClass\")));\n // les effectifs par classe sont gérés par un groupe de variables ClassEffectif\n DisplayVariableGroup new_dv = new DisplayVariableGroup(new String(\"ClassEffectif\"), Integer.toString(1));\n for( int i=1 ; i<this.nb_class ; i++ )\n new_dv.AddVariableName(Integer.toString(i+1));\n\n display_variables.add(new_dv);\n }", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "public void printValues() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tfor (int j = 0; j < 7; j++) {\n\t\t\t\tlblCenter[i][j].setText(\"\" + array.getElement(i, j));\n\t\t\t}\n\t\t\ttfWest[i].setText(\"\" + leftCol.getElement(i));\n\t\t\ttfSouth[i].setText(\"\" + bottomRow.getElement(i));\n\t\t}\n\t}", "private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}", "public void addViewVariables (Map<String, Object> vars)\n {\n if (vars != null)\n {\n _viewVariables.putAll (vars);\n }\n }", "@Override\n public List<String> getVariables()\n {\n return null;\n }", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "static void dumpVariablesInOrder( PrintWriter pw ) {\n try {\n for ( int i=0; i<Vtable.size(); i++ ) {\n int v = i+1;\n String varname = findVar(v);\n variable var = find(varname);\n if (var.userVisible)\n pw.println( \"c u \" + v + \" \" + varname );\n else\n pw.println( \"c c \" + v + \" \" + varname );\n }\n }\n catch ( Exception e ) {\n Util.fatalError( \"dumpVariablesInOrder Exception \" +\n e.getMessage() );\n }\n }", "void display(String w[][]){\r\n System.out.println(\"\\nGambaran dari area (world) yang di buat\\n\");\r\n for (int i = 1; i <= 4; i++) {\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n System.out.print(\"|\\t\");\r\n for (int j = 1; j <= 4; j++) {\r\n System.out.print(w[i][j]+ \"\\t|\\t\");\r\n }\r\n }\r\n\r\n System.out.println(\"\\n-----------------------------------------------------------------\");\r\n }", "protected ArrayList<String> getVariableNames() {\n ArrayList<String> varNames = new ArrayList<String>();\n \n Element ncElement = getNetcdfElement();\n List<Element> vars = ncElement.getChildren(\"variable\", ncElement.getNamespace()); \n for (Element element : vars) {\n String name = getVariableName(element);\n varNames.add(name);\n }\n\n return varNames;\n }", "public void displayData(String[] str);", "public void display(){\n int n = nb_instructions;\n System.out.println(\"There are \" + n + \" key_words\");\n for(int i = 0; i<n;i++){\n System.out.println(\"\\tKey_word \" + (i+1) + \": \" + key_words.get(i));\n }\n }", "@Override\n public List<String> getVariables() {\n return super.getVariables();\n }", "public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\n\t}", "void printValues(Vector Vect){\n\t\tint index;\n\t\tfor(index=0;index< Vect.size(); index++){\t\n\t\t\tSystem.out.println(\"Element \" + Vect.elementAt(index));\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\tDexUtil qualifiedName = new DexUtil();\n\t\tsuper.display();\n\t\n\t\tint dest = ((OneRegisterInstruction) instruction).getRegisterA();\n\t FieldReference f = (FieldReference) ((ReferenceInstruction) instruction).getReference();\n\t \n\t String name= qualifiedName.getQualifiedName(f.getDefiningClass())+\".\"+qualifiedName.getQualifiedName(f.getName());\n\t String type= qualifiedName.getQualifiedName(f.getType());\n\t \n\t \n\t Variable variable=new Variable(null, 0, 0, 0, 0);\n\t \n\t variable.setName(name);\n\t variable.setType(type);\n\t DexMethodDefinition.registerLocals[dest]=variable;\n\t System.out.println(variable.getName());\n\t \n\t}", "String getVariableDefinition();", "void display()\r\n\t {\n\t System.out.println(\"a = \" + a + \" b = \" + b);\r\n\t }", "public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }", "public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}", "public String getVariable();", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}", "public void dispAll(){\n System.out.println(\"HISTORY :\");\n for(int i=0;i<history.size();i++)\n System.out.print(history.get(i) + \" | \");\n System.out.println(\"\\nSTACK :\");\n Stack <Object> acc = new Stack<>();\n while (!stack.isEmpty())acc.push(stack.pop());\n while (!acc.isEmpty()){\n System.out.print(acc.peek()+ \" | \");\n stack.push(acc.pop());\n }\n System.out.println(\"\\nVariables Stockes : \" + variables.toString());\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 String groundVars(String s, HashMap<String,String> vars, Call c)\n {\n String assignments = \"\";\n boolean first = true;\n for (HashMap.Entry<String, String> entry : vars.entrySet()) \n {\n String key = entry.getKey();\n Object value = entry.getValue();\n if(!first)\n {\n assignments = assignments + \",\";\n } else first = false;\n assignments = assignments + key + \"=\" + value;\n }\n return s.replace(c.callString,assignments);\n }", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "public ImmutableList<String> getVariableNames() {\n return members.stream().map(m -> m.getShortName()).collect(ImmutableList.toImmutableList());\n }", "public VariableView getVarView() {\n \t\treturn this.varView;\n \t}", "public List<String> getVariables() {\r\n List<String> newList = new ArrayList<String>();\r\n newList.addAll(e1.getVariables());\r\n return newList;\r\n }", "public void separateVariables() {\n\t\tsquareVariables = app.split(shapes, \" \");\n\t\t\n\t\t//Going through the array and turning the strings into numbers, for the values of the variables (based on position)\n\t\tfor (int i = 0; i < squareVariables.length; i++) {\n\t\t\tsize = Integer.parseInt(squareVariables[1]);\n\t\t\tposX = Integer.parseInt(squareVariables[2]);\n\t\t\tposY = Integer.parseInt(squareVariables[3]);\n\t\t\tdir1 = Integer.parseInt(squareVariables[4]);\n\t\t\tdir2 = Integer.parseInt(squareVariables[4]);\n\t\t\tvalue = Integer.parseInt(squareVariables[5]);\n\t\t}\n\t}", "public void displayStateValues()\n\t{\n\t\tfor (State s : stateSpace)\n\t\t{\n\t\t\tSystem.out.println(s.state + \"\\t\" + this.value.get(s));\n\t\t}\n\t}", "public String toString () {\n return nameOfVar;\n }", "static void showMatrix()\n {\n String sGameField = \"Game field: \\n\";\n for (String [] row : sField) \n {\n for (String val : row) \n {\n sGameField += \" \" + val;\n }\n sGameField += \"\\n\";\n }\n System.out.println(sGameField);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public List<String> getMainVariableNames(TOSCAPlan plan) {\n\t\tList<String> names = new ArrayList<String>();\n\t\tNodeList childNodes = plan.getBpelProcessVariablesElement().getChildNodes();\n\t\tfor (int i = 0; i < childNodes.getLength(); i++) {\n\t\t\tNode child = childNodes.item(i);\n\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tString varName = child.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tnames.add(varName);\n\t\t\t}\n\t\t}\n\t\treturn names;\n\t}", "Variables createVariables();", "public java.util.List<Object> generateControlVars();", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public List<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private static void showValues(Derived derived) {\n\t\tSystem.out.println(\"\\n\\tX = \" + derived.getX()\n\t\t+ \";\\tY = \" + derived.getY() + \";\\tZ = \"\n\t\t+ derived.getZ() + \";\\tThe Largest Value Is : \"\n\t\t+ derived.getLargestValue());\n\t}", "public StringSet freeVars() {\n\treturn argument.freeVars();\n }", "public void display() {System.out.println(skaitlis);}", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "public String display(){\n StringBuilder str = new StringBuilder();\n\n for(int i = 0; i < 3; ++i){\n if( Array[i] != null ) {\n str.append('\\n' + Names[i] + '\\n');\n str.append(Array[i].display());\n }\n }\n return str.toString();\n }", "public Vector Display() \n\t{\n\t\treturn v;\n\t}", "public void display(){\n \tfor(int i=0;i<size;i++){\n \tSystem.out.print(elements[i]+\" \");\n \t}\n\t}", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "public void showNewTableaux() {\n System.out.println(\"Nowa tablica simpleksowa: \");\n DecimalFormat df = new DecimalFormat(\"0.00\");\n for (double[] row : tableaux) {\n for (double element : row) {\n System.out.print(df.format(element) + \"\\t\");\n }\n System.out.println();\n }\n double valueObjectiveFunction = tableaux[numberOfVariables][numberOfConstraints + numberOfVariables];\n System.out.println(\"Wartość funkcji celu = \" + df.format(valueObjectiveFunction));\n for (int i = 0; i < numberOfVariables; i++)\n if (basisVariables[i] < numberOfConstraints)\n System.out.println(\"x\"\n + basisVariables[i]\n + \" = \"\n + df.format(tableaux[numberOfVariables][numberOfConstraints + i]));\n }", "public List<String> getVariables() {\r\n List<String> list = new ArrayList<String>();\r\n list.add(this.variable);\r\n return list;\r\n }", "public void setTotalVariables( int totalVars ) ;", "public void changeVarLabel() {\n if (inHouse.isSelected()) {\n varLabel.setText(\"Machine ID\");\n variableTextField.setPromptText(\"Machine ID...\");\n variableTextField.setMaxLength(9);\n int textLength = partId.getText().length();\n variableTextField.setText(variableTextField.getText().replaceAll(\"[^\\\\d.]\", \"\"));\n variableTextField.positionCaret(textLength);\n } else if (outsourced.isSelected()) {\n varLabel.setText(\"Company Name\");\n variableTextField.setPromptText(\"Company Name...\");\n variableTextField.setMaxLength(26);\n }\n }", "public String replaceVars(Map<String, String> vars) {\n if (this.value == null) {\n return null;\n }\n StringBuffer sb = new StringBuffer();\n Matcher matcher = VARS_RE.matcher(this.value);\n while (matcher.find()) {\n String name = matcher.group(1);\n String val = vars.get(name);\n if (val != null) {\n matcher.appendReplacement(sb, val);\n } else {\n matcher.appendReplacement(sb, name);\n }\n }\n matcher.appendTail(sb);\n return sb.toString();\n }", "public void addViewVariable (String name, Object value)\n {\n _viewVariables.put (name, value);\n }", "public abstract void addToDisplay(String key, Object...values);", "public static void main(String args[]){\n\t\t\t\tbyte variableByte = 126;\n\t\t\t\tshort variableShort = 32767;\n\t\t\t\tint variableInt = 214778;\n\t\t\t\tlong variableLong = 3454656;\n\t\t\t\tchar variableChar = 'a';\n\n\t\t\t\tSystem.out.println(\"Este es una variable byte: \\n\" + variableByte);\n\t\t\t\tSystem.out.println(\"Este es una variable short: \\n\" + variableShort);\n\t\t\t\tSystem.out.println(\"Este es una variable int: \\n\" + variableInt);\n\t\t\t\tSystem.out.println(\"Este es una variable long: \\n\" + variableLong);\n\n\t\t\t\tSystem.out.println(\"La primer letra es \" + variableChar);\n \n\t\t\t//Tipos Boolean \n\t\t\t\tboolean isActive = false ; \n\t\t\t\tSystem.out.println(\"Boolean solo tiene dos valores , tales como true and : \" + isActive);\n\n\n\t\t\t//Tipos REALES \n\n\t\t\t\tfloat variableFlotante = 3.1415f;\n\n\t\t\t\tSystem.out.println(\"Este es un flotante \" + variableFlotante );\n\n\t\t\t\tdouble variableDouble = 343434.234333333;\t\n\t\t\t\tSystem.out.println(\"Este es un double : \" + variableDouble);\t\t\n\n\t}", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "private void display(Object a) {\r\n System.out.print(a.toString());\t\r\n }", "void display() {\n System.out.println(id + \" \" + name);\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void displayCurrentValues() {\r\n currentX.setText(Float.toString(deltaX));\r\n currentY.setText(Float.toString(deltaY));\r\n currentZ.setText(Float.toString(deltaZ));\r\n }", "public void displayCleanValues() {\r\n currentX.setText(\"0.0\");\r\n currentY.setText(\"0.0\");\r\n currentZ.setText(\"0.0\");\r\n }", "String getVariable();", "private void updateVars()\n {\n\n }", "public String getVals(){\n return (\"a: \" + a + \"\\nr: \" + r + \"\\nb: \" + b + \"\\ng: \" + g);\n }", "public ArrayList<Variable> getVariables() {\r\n\t\treturn variables;\r\n\t}", "private void getUsefulVariables(Iterable toIter)\n {\n String visualRepresentation = null;\n String name = null;\n String description = null;\n\n try {\n visualRepresentation = (String)toIter.getClass().getMethod(\"getVisualRepresentation\").invoke(toIter);\n name = (String)toIter.getClass().getMethod(\"getName\").invoke(toIter);\n description = (String)toIter.getClass().getMethod(\"getDescription\").invoke(toIter);\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n this.infos.add(new String[]{visualRepresentation, name, description});\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "private static void Display()\n\t{\n\t\tStringBuilder memoryValues = new StringBuilder();\n\t\tSystem.out.println(\"\\nPipleline Stages: \");\n\t\tif (stages.get(\"F\") != null)\n\t\t\tSystem.out.println(\"--------Fetch-----------> \" + stages.get(\"F\").getContent());\n\t\tif (stages.get(\"D\") != null)\n\t\t\tSystem.out.println(\"--------Decode----------> \" + stages.get(\"D\").getContent());\n\t\tif (stages.get(\"E\") != null)\n\t\t\tSystem.out.println(\"--------Execution1------> \" + stages.get(\"E\").getContent());\n\t\tif (stages.get(\"E2\") != null)\n\t\t\tSystem.out.println(\"--------Execution2------> \" + stages.get(\"E2\").getContent());\n\t\tif (stages.get(\"B1\") != null)\n\t\t\tSystem.out.println(\"--------Branch----------> \" + stages.get(\"B1\").getContent());\n\t\tif (stages.get(\"Dly\") != null)\n\t\t\tSystem.out.println(\"--------Delay-----------> \" + stages.get(\"Dly\").getContent());\n\t\tif (stages.get(\"M\") != null)\n\t\t\tSystem.out.println(\"--------Memory----------> \" + stages.get(\"M\").getContent());\n\t\tif (stages.get(\"W\") != null)\n\t\t\tSystem.out.println(\"--------Writeback-------> \" + stages.get(\"W\").getContent());\n\n\t\tSystem.out.println(\"\\nRegister File Details: \\n\");\n\t\tfor (Entry<String, Integer> register : registerFile.entrySet())\n\t\t{\n\t\t\tSystem.out.print(register.getKey() + \" : \" + register.getValue() + \"|\\t|\");\n\t\t}\n\t\tSystem.out.println(\"Special Register X:\" + specialRegister);\n\t\tSystem.out.println(\"\\n0 to 99 Memory Address Details: \");\n\t\tfor (int i = 0; i < 100; i++)\n\t\t{\n\t\t\tmemoryValues.append(\" [\" + i + \" - \" + memoryBlocks[i] + \"] \");\n\t\t\tif (i > 0 && i % 10 == 0)\n\t\t\t\tmemoryValues.append(\"\\n\");\n\t\t}\n\t\tSystem.out.println(memoryValues);\n\n\t}", "public void displayCleanValues() {\n currentX.setText(\"0.00\");\n currentY.setText(\"0.00\");\n currentZ.setText(\"0.00\");\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}", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "public void display()\n {\n System.out.println(�\\n The elements are�);\n for(int i=0; i<n; i++)\n System.out.println(� �+a[i]);\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}", "public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }", "public void storeTitle(final String variableName);", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }" ]
[ "0.7845234", "0.6562839", "0.6485705", "0.638912", "0.6367465", "0.62249124", "0.61357445", "0.6105265", "0.6063461", "0.6036035", "0.6027151", "0.60169333", "0.60141337", "0.59890544", "0.587315", "0.58456993", "0.5822206", "0.58123636", "0.5810376", "0.5783895", "0.57500106", "0.57318175", "0.56854546", "0.5638669", "0.5606315", "0.5568041", "0.5556144", "0.5548897", "0.55450284", "0.55363435", "0.5514038", "0.55016696", "0.5488135", "0.5485589", "0.54336077", "0.54272246", "0.54254127", "0.5420913", "0.54081315", "0.5405648", "0.5401999", "0.5400438", "0.53851366", "0.53845966", "0.5360354", "0.5357937", "0.5353469", "0.5352465", "0.53450483", "0.53449106", "0.53358686", "0.53350705", "0.532765", "0.5324046", "0.532271", "0.53199255", "0.53163034", "0.5314619", "0.5303697", "0.53005165", "0.52964014", "0.5286404", "0.527071", "0.5265415", "0.52587116", "0.5257569", "0.52567214", "0.5255934", "0.52511615", "0.5250971", "0.5248279", "0.52360195", "0.5225863", "0.5223986", "0.52133054", "0.52132255", "0.5212489", "0.52120626", "0.5211368", "0.52102053", "0.5190496", "0.51865655", "0.518623", "0.518113", "0.5175881", "0.51608264", "0.51420945", "0.5136326", "0.5117938", "0.5117254", "0.51158726", "0.5115064", "0.51149935", "0.51142776", "0.5113858", "0.5108765", "0.5106978", "0.51033145", "0.5082903", "0.50808805" ]
0.5756412
20